/* public/dashboard/dashboard.css */

:root {
    --dash-bg: #0b1020;
    --dash-surface: rgba(255, 255, 255, 0.06);
    --dash-surface2: rgba(255, 255, 255, 0.09);
    --dash-text: #e5e7eb;
    --dash-muted: #a7b0bf;
    --dash-border: rgba(226, 232, 240, 0.14);
    --dash-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
    --dash-primary: #60a5fa;
    --dash-primary2: #3b82f6;
    --dash-danger: #ef4444;
    --dash-radius: 18px;
    --dash-radius-sm: 12px;
}

body.dash {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP",
        "Hiragino Kaku Gothic ProN", "Hiragino Sans", Meiryo, sans-serif;
    color: var(--dash-text);
    line-height: 1.6;
    color-scheme: dark;
    background:
        radial-gradient(900px 500px at 15% -10%, rgba(96, 165, 250, 0.18), transparent 60%),
        radial-gradient(900px 500px at 85% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
        linear-gradient(180deg, var(--dash-bg) 0%, #0f172a 100%);
}


.dash .container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.dash-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(14px);
    background: rgba(11, 16, 32, 0.65);
    border-bottom: 1px solid var(--dash-border);
}

.dash-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 0;
    flex-wrap: wrap;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary2));
    box-shadow: 0 10px 24px rgba(96, 165, 250, 0.25);
}

.dash-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.dash-tab {
    color: var(--dash-muted);
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid transparent;
    text-decoration: none;
}

.dash-tab:hover {
    background: var(--dash-surface);
    border-color: var(--dash-border);
    color: var(--dash-text);
}

.dash-tab.is-active {
    background: var(--dash-surface);
    border-color: var(--dash-border);
    color: var(--dash-text);
}

.hero {
    padding: 24px 0 10px;
}

.hero-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: calc(var(--dash-radius) + 6px);
    padding: 18px;
    box-shadow: var(--dash-shadow);
}

.h1 {
    margin: 0 0 6px;
    font-size: 22px;
    line-height: 1.2;
}

.muted {
    color: var(--dash-muted);
}

.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 0 42px;
}

@media (min-width: 980px) {
    .grid.cols-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.card-grid-2 {
    display: grid;
    gap: 14px;
}

@media (min-width: 980px) {
    .card-grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .card-grid-2 .span-2 {
        grid-column: 1 / -1;
    }
}

.card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    padding: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    position: relative;
}

.card h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.card-link {
    cursor: pointer;
}

.toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    color: var(--dash-text);
    cursor: pointer;
}

.toggle input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 48px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid var(--dash-border);
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.toggle input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease;
}

.toggle input[type="checkbox"]:checked {
    border-color: transparent;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary2));
    box-shadow: 0 10px 20px rgba(96, 165, 250, 0.3);
}

.toggle input[type="checkbox"]:checked::after {
    transform: translateX(20px);
}

.toggle input[type="checkbox"]:focus-visible {
    outline: 2px solid rgba(96, 165, 250, 0.6);
    outline-offset: 3px;
}

.toggle input[type="checkbox"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.card-toggle {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
}

.call-line-list {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.call-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.call-line-text {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

.call-line-meta {
    font-size: 12px;
    color: var(--dash-muted);
    white-space: nowrap;
}

.hr {
    border: 0;
    border-top: 1px solid var(--dash-border);
    margin: 14px 0;
}

.row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary2));
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(96, 165, 250, 0.18);
}

.btn:hover {
    filter: brightness(1.03);
}

.btn.secondary {
    background: transparent;
    color: var(--dash-text);
    border-color: var(--dash-border);
    box-shadow: none;
}

.btn.danger {
    background: linear-gradient(135deg, var(--dash-danger), #dc2626);
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.12);
}

label {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

input[type="text"],
input[type="number"],
select,
textarea {
    background: var(--dash-surface2);
    color: var(--dash-text);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
    min-width: 220px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: rgba(96, 165, 250, 0.65);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
    background: rgba(255, 255, 255, 0.10);
}

select {
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-color: var(--dash-surface2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23a7b0bf' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    padding-right: 42px;
    color-scheme: dark;
}

select[multiple] {
    background-image: none;
    padding-right: 12px;
}

select option,
select optgroup {
    background-color: #0f172a;
    color: var(--dash-text);
}

select:disabled,
input:disabled,
textarea:disabled {
    opacity: .6;
    cursor: not-allowed;
}

/* class="input" を使う箇所（members modal等）を /style.css に依存させない */
.input {
    background: var(--dash-surface2);
    color: var(--dash-text);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    padding: 10px 12px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.input:focus {
    border-color: rgba(96, 165, 250, 0.65);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.12);
    background: rgba(255, 255, 255, 0.10);
}


textarea {
    min-width: 320px;
    min-height: 96px;
    resize: vertical;
    line-height: 1.5;
}


input[type="checkbox"] {
    transform: translateY(1px);
}

.help {
    color: var(--dash-muted);
    font-size: 13px;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--dash-border);
    background: rgba(255, 255, 255, 0.06);
    color: var(--dash-text);
    padding: 8px 10px;
    border-radius: 999px;
    cursor: pointer;
}

.chip small {
    color: var(--dash-muted);
    font-size: 12px;
}

.status {
    min-height: 20px;
    color: var(--dash-muted);
    font-size: 13px;
}


/* ===== Servers / Home UI ===== */

.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    padding: 14px 0 42px;
}

.guild-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px;
    text-decoration: none;
    color: var(--dash-text);
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}

.member-input:focus {
    border-color: rgba(255, 255, 255, 0.20);
}

/* ===== Leaderboard ===== */
.bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.bar>div {
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary2));
}

/* =========================
   Mobile refinements (<=760px)
   - Responsive (レスポンシブ)
   - Tap target 改善
   - はみ出し防止
   ========================= */
@media (max-width: 760px) {

    /* ===== Dashboard: サーバー選択（/dashboard/index.html: body.page-dashboard） ===== */
    @media (max-width: 600px) {
        body.page-dashboard .guild-grid {
            grid-template-columns: 1fr;
            gap: 10px;
        }

        body.page-dashboard .guild-card {
            padding: 14px;
            border-radius: 18px;
            gap: 14px;
        }

        body.page-dashboard .guild-icon {
            width: 52px;
            height: 52px;
            border-radius: 16px;
        }
    }

    /* ===== Dashboard: 各設定ページ（body.dash） ===== */

    /* row を縦積みにして、狭い画面でも要素がはみ出さないようにする */
    body.dash .row {
        flex-direction: column;
        align-items: stretch;
    }

    body.dash .row>* {
        width: 100%;
    }

    /* 入力系の min-width を解除して横スクロールを殺す */
    body.dash input[type="text"],
    body.dash input[type="number"],
    body.dash select,
    body.dash textarea,
    body.dash .input {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.dash textarea {
        min-width: 0;
    }

    /* ボタンは基本フル幅で押しやすく */
    body.dash .btn {
        width: 100%;
        justify-content: center;
    }

    /* Leaderboard: progress の固定幅を解除 */
    body.dash .lb-progress {
        min-width: 0;
        width: 100%;
    }

    /* Modal toolbar: 横並びを縦に */
    body.dash .modal-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    body.dash .modal-toolbar .grow {
        flex: 0 0 auto;
        min-width: 0;
        width: 100%;
    }
}


.lb-rank b {
    font-size: 14px;
    font-weight: 900;
}

.lb-level {
    font-weight: 800;
}

.lb-xp {
    font-variant-numeric: tabular-nums;
}

.lb-user {
    min-width: 160px;
}

.lb-progress {
    min-width: 140px;
}

.table th.lb-col-head {
    text-align: center;
}

.lb-head-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--dash-text);
    font-size: 14px;
    line-height: 1;
}

.table td.lb-metric,
.table td.lb-level {
    text-align: center;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.table td.lb-xp {
    text-align: right;
}

.lb-metric-voice {
    font-size: 12px;
}


.guild-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--dash-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.guild-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.guild-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 26px;
    color: #fff;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary2));
}

.guild-name {
    font-weight: 800;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.guild-sub {
    color: var(--dash-muted);
    font-size: 12px;
    text-align: center;
}

.guild-card.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 0 18px;
}

@media (min-width: 980px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.feature-card {
    display: block;
    padding: 16px;
    text-decoration: none;
    color: var(--dash-text);
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.feature-card:hover {
    background: var(--dash-surface2);
}

.feature-card h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

/* ===== Home: guild grid ===== */
.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.guild-card {
    appearance: none;
    border: 1px solid var(--dash-border);
    background: var(--dash-surface);
    color: var(--dash-text);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.guild-card:hover {
    background: var(--dash-surface2);
}

.guild-card.is-selected {
    outline: 2px solid rgba(96, 165, 250, 0.55);
}

.guild-card.is-disabled,
.guild-card:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.guild-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--dash-border);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.guild-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.guild-icon-placeholder {
    font-weight: 800;
    color: var(--dash-text);
}

.guild-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.guild-name {
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guild-sub {
    color: var(--dash-muted);
    font-size: 12px;
}

.guild-help {
    color: var(--dash-muted);
    font-size: 11px;
}

/* ===== Home: feature cards ===== */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    padding: 14px 0 42px;
}

.feature-card {
    text-decoration: none;
    color: var(--dash-text);
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: var(--dash-radius);
    padding: 16px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.feature-card:hover {
    background: var(--dash-surface2);
}

.feature-title {
    font-weight: 900;
    font-size: 18px;
}

.feature-desc {
    color: var(--dash-muted);
    font-size: 13px;
}

.guild-title {
    font-weight: 900;
    font-size: 14px;
    letter-spacing: 0.2px;
    color: var(--dash-text);
}

/* Dashboard: hero余白を詰める */
body.dash .hero {
    padding: 16px 0 18px;
    /* ここが効く：上下の巨大余白を削減 */
}

body.dash .hero-card {
    padding: 18px 18px;
    /* カード内の余白も少し詰める */
    border-radius: 22px;
}

/* 上部の大きい空箱っぽい領域がある場合に効く */
body.dash .hero-card .row {
    gap: 10px;
}

/* モバイルはさらに詰める */
@media (max-width: 720px) {
    body.dash .hero {
        padding: 12px 0 14px;
    }

    body.dash .hero-card {
        padding: 14px 14px;
    }
}

/* homeだけさらに詰める */
body.dash[data-page="home"] .hero {
    padding-top: 12px;
    padding-bottom: 10px;
}

body.dash[data-page="home"] .feature-grid {
    padding-top: 10px;
}

/* alert-2 (Arcane風) : 変更検知/確認用ポップアップ */
body.dash[data-page="home"] .feature-grid {
    padding-top: 10px;
}


/* hidden属性の確実な非表示（UAスタイルに依存しない） */
[hidden] {
    display: none !important;
}

/* alert-2 (Arcane風) : 変更検知/確認用ポップアップ */
.alert-2 {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 1000;
    width: min(920px, calc(100% - 24px));
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: rgba(20, 24, 34, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(10px);
}

.alert-2__text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.35;
    min-width: 0;
}

.alert-2__actions {
    display: inline-flex;
    gap: 10px;
    flex: 0 0 auto;
}

@media (max-width: 560px) {
    .alert-2 {
        flex-direction: column;
        align-items: stretch;
    }

    .alert-2__actions {
        justify-content: flex-end;
    }


}

/* ===== Level Curve table ===== */
/* ===== Curve Table ===== */
/* HTML: <table class="curve-table"> に合わせて直指定（入れ子前提をやめる） */
.curve-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

.curve-table th,
.curve-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
}

.curve-table thead th {
    color: var(--dash-muted);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.02);
}

.curve-table code {
    font-size: 12px;
    color: #cbd5e1;
}

.curve-radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}


/* ===== Modal (Member management etc.) ===== */
/* JS側で body.classList.toggle("modal-open") する前提 */
body.modal-open {
    overflow: hidden;
}


.modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: none;
}

/* 両対応: `.hidden` / `.is-open`（JSが両方トグルするため） */
.modal.is-open {
    display: block;
}

.modal.hidden {
    display: none !important;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(2px);
}

.modal-dialog {
    position: relative;
    width: min(980px, calc(100% - 24px));
    margin: 40px auto;
    background: rgba(13, 18, 28, 0.96);
    border: 1px solid var(--dash-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    max-height: 88vh;
    overflow: hidden;
    min-height: 0;

}

.modal-body {
    overflow: auto;
    padding: 14px;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.modal-header {
    padding: 16px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--dash-border);
}

.modal-title h2 {
    margin: 0;
    font-size: 18px;
}

.modal-subtitle {
    margin-top: 6px;
    color: var(--dash-muted);
    font-size: 12px;
    line-height: 1.45;
}


.modal-footer {
    padding: 14px 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--dash-border);
    background: rgba(255, 255, 255, 0.02);
}

.modal-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-toolbar .grow {
    flex: 1 1 260px;
    min-width: 220px;
}

.modal-toolbar .btn {
    white-space: nowrap;
}

@media (max-width: 560px) {
    .modal-dialog {
        margin: 18px auto;
        width: calc(100% - 18px);
    }
}

/* ===== Table (shared) ===== */
.table-wrap {
    border: 1px solid var(--dash-border);
    border-radius: 14px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.02);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

.leaderboard-table {
    min-width: 840px;
}

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
    text-align: left;
}

.table thead th {
    position: sticky;
    top: 0;
    background: rgba(15, 19, 29, 0.92);
    color: var(--dash-muted);
    z-index: 1;
    backdrop-filter: blur(6px);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ===== Member cell (shared) ===== */
.member-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.member-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    flex: 0 0 auto;
}

.member-name {
    min-width: 0;
}

.member-name .primary {
    font-weight: 700;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-name .muted {
    font-size: 12px;
    color: var(--dash-muted);
}

/* members modal: row input */
.member-input {
    width: 100%;
    max-width: 200px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid var(--dash-border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--dash-text);
    outline: none;
}

.member-input:focus {
    border-color: rgba(96, 165, 250, 0.85);
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

/* ===== Progress bar (leaderboardでも共用) ===== */
.bar {
    height: 10px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    overflow: hidden;
}

.bar>div {
    height: 100%;
    width: 0;
    background: linear-gradient(135deg, var(--dash-primary), var(--dash-primary2));
}
