* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Segoe UI', system-ui, sans-serif; }
.page-content { max-width: clamp(820px, 55vw, 1200px); margin: 0 auto; padding: 32px 24px; }
h1 { font-size: 1.5rem; color: var(--accent); margin-bottom: 4px; }
.channel { font-size: 0.85rem; color: var(--muted); margin-bottom: 24px; }

/* Personal history */
.my-card { background: var(--card); border-radius: 10px; padding: 18px 20px; margin-bottom: 24px; border-left: 3px solid var(--accent); }
.my-title { font-size: 0.72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.my-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.my-row { display: flex; justify-content: space-between; align-items: center; background: var(--bg); border-radius: 6px; padding: 7px 10px; }
.my-reward { font-size: 0.82rem; color: var(--text); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 8px; }
.my-count { font-size: 0.82rem; font-weight: 700; color: #a970ff; flex-shrink: 0; }
.my-login-cta { font-size: 0.85rem; color: var(--muted); }
.my-login-cta a { color: #a970ff; font-weight: 600; text-decoration: none; }
.my-login-cta a:hover { text-decoration: underline; }
.my-empty { font-size: 0.85rem; color: var(--muted); }

/* Reward cards */
.reward-card { background: var(--card); border-radius: 10px; padding: 20px; margin-bottom: 14px; }
.reward-header { display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; gap: 12px; }
.reward-title { font-size: 1rem; font-weight: 600; flex: 1; }
.reward-total { font-size: 0.875rem; color: var(--muted); flex-shrink: 0; }
.reward-total strong { color: #a970ff; }
.chevron { font-size: 0.7rem; color: var(--muted); transition: transform .2s; flex-shrink: 0; }
.chevron.open { transform: rotate(180deg); }

/* Top section (expand) */
.top-section { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; display: none; }
.top-section.open { display: block; }

/* Podium top-3 cards */
.podium { display: flex; gap: 8px; margin-bottom: 16px; }
.podium-card { flex: 1; background: var(--bg); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px; border-top: 2px solid transparent; min-width: 0; }
.podium-card.rank-1 { border-top-color: var(--gold); }
.podium-card.rank-2 { border-top-color: var(--silver); }
.podium-card.rank-3 { border-top-color: var(--bronze); }
.podium-medal { font-size: 1.2rem; }
.podium-name { font-size: 0.78rem; font-weight: 600; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.podium-count { font-size: 0.82rem; font-weight: 700; color: #a970ff; }

/* Chart */
.chart-wrap { position: relative; }

/* Full list toggle */
.show-all-btn { background: none; border: 1px solid var(--border); border-radius: 6px; color: var(--muted); font-size: 0.78rem; padding: 5px 10px; cursor: pointer; margin-bottom: 12px; transition: color .15s, border-color .15s; }
.show-all-btn:hover { color: var(--text); border-color: var(--accent); }
.full-list { margin-top: 12px; display: none; }
.full-list.open { display: block; }
.list-row { display: flex; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.list-row:last-child { border-bottom: none; }
.list-rank { font-size: 0.72rem; color: var(--muted); width: 24px; text-align: right; flex-shrink: 0; }
.list-name { font-size: 0.82rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-count { font-size: 0.82rem; font-weight: 600; flex-shrink: 0; }

/* Utility */
.msg { color: var(--muted); font-size: 0.82rem; padding: 8px 0; }
.msg-error { color: var(--danger); font-size: 0.82rem; padding: 8px 0; }
#loading { color: var(--muted); padding: 32px 0; text-align: center; }
#error { color: var(--danger); padding: 32px 0; text-align: center; display: none; }
#empty { color: var(--muted); padding: 32px 0; text-align: center; display: none; }
#refresh-label { font-size: 0.72rem; color: var(--muted); margin-top: 20px; text-align: right; }
