/* Material 3 (Material You) theme tokens generated with @material/material-color-utilities from seed #1a73e8 (blue). */
:root[data-theme="light"] {
  --md-sys-color-primary: #005bc0;
  --md-sys-color-on-primary: #ffffff;
  --md-sys-color-primary-container: #d8e2ff;
  --md-sys-color-on-primary-container: #001a41;
  --md-sys-color-secondary: #565e71;
  --md-sys-color-on-secondary: #ffffff;
  --md-sys-color-secondary-container: #dbe2f9;
  --md-sys-color-on-secondary-container: #131b2c;
  --md-sys-color-tertiary: #715574;
  --md-sys-color-error: #ba1a1a;
  --md-sys-color-background: #fefbff;
  --md-sys-color-on-background: #1b1b1f;
  --md-sys-color-surface: #fefbff;
  --md-sys-color-on-surface: #1b1b1f;
  --md-sys-color-surface-variant: #e1e2ec;
  --md-sys-color-on-surface-variant: #44474f;
  --md-sys-color-outline: #74777f;
  --md-sys-color-outline-variant: #c4c6d0;
  --md-sys-color-surface-container-low: #f5f3f7;
  --md-sys-color-surface-container: #efedf1;
  --md-sys-color-surface-container-high: #e9e7ec;
  --md-sys-color-surface-container-highest: #e3e2e6;
}
:root[data-theme="dark"] {
  --md-sys-color-primary: #adc7ff;
  --md-sys-color-on-primary: #002e68;
  --md-sys-color-primary-container: #004493;
  --md-sys-color-on-primary-container: #d8e2ff;
  --md-sys-color-secondary: #bfc6dc;
  --md-sys-color-on-secondary: #283041;
  --md-sys-color-secondary-container: #3f4759;
  --md-sys-color-on-secondary-container: #dbe2f9;
  --md-sys-color-tertiary: #debcdf;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-background: #1b1b1f;
  --md-sys-color-on-background: #e3e2e6;
  --md-sys-color-surface: #1b1b1f;
  --md-sys-color-on-surface: #e3e2e6;
  --md-sys-color-surface-variant: #44474f;
  --md-sys-color-on-surface-variant: #c4c6d0;
  --md-sys-color-outline: #8e9099;
  --md-sys-color-outline-variant: #44474f;
  --md-sys-color-surface-container-low: #1b1b1f;
  --md-sys-color-surface-container: #1f1f23;
  --md-sys-color-surface-container-high: #292a2d;
  --md-sys-color-surface-container-highest: #343538;
}
:root[data-theme="amoled"] {
  --md-sys-color-primary: #adc7ff;
  --md-sys-color-on-primary: #002e68;
  --md-sys-color-primary-container: #004493;
  --md-sys-color-on-primary-container: #d8e2ff;
  --md-sys-color-secondary: #bfc6dc;
  --md-sys-color-on-secondary: #283041;
  --md-sys-color-secondary-container: #3f4759;
  --md-sys-color-on-secondary-container: #dbe2f9;
  --md-sys-color-tertiary: #debcdf;
  --md-sys-color-error: #ffb4ab;
  --md-sys-color-background: #1b1b1f;
  --md-sys-color-on-background: #e3e2e6;
  --md-sys-color-surface: #1b1b1f;
  --md-sys-color-on-surface: #e3e2e6;
  --md-sys-color-surface-variant: #44474f;
  --md-sys-color-on-surface-variant: #c4c6d0;
  --md-sys-color-outline: #8e9099;
  --md-sys-color-outline-variant: #44474f;
  --md-sys-color-surface-container-low: #0a0a0a;
  --md-sys-color-surface-container: #101010;
  --md-sys-color-surface-container-high: #181818;
  --md-sys-color-surface-container-highest: #202020;
  --md-sys-color-background: #000000;
  --md-sys-color-surface: #000000;
}


* { box-sizing: border-box; }
body { margin: 0; font-family: Roboto, system-ui, sans-serif; background: var(--md-sys-color-background); color: var(--md-sys-color-on-background); font-size: 16px; line-height: 1.5; }
a { color: var(--md-sys-color-primary); text-decoration: none; }
.top { display: flex; align-items: center; gap: 8px; height: 64px; padding: 0 16px; background: var(--md-sys-color-surface-container); position: sticky; top: 0; z-index: 5; }
.top .title { font-size: 22px; color: var(--md-sys-color-on-surface); display: flex; align-items: center; gap: 8px; margin-right: 8px; }
.top .who { color: var(--md-sys-color-on-surface-variant); font-size: 14px; }
.toggle { display: inline-flex; border: 1px solid var(--md-sys-color-outline); border-radius: 20px; overflow: hidden; }
.seg { font: 500 14px/1 Roboto, sans-serif; text-transform: capitalize; padding: 0 14px; height: 36px; background: transparent; color: var(--md-sys-color-on-surface); border: 0; border-left: 1px solid var(--md-sys-color-outline); cursor: pointer; }
.seg:first-child { border-left: 0; }
.seg.sel { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
main { max-width: 840px; margin: 0 auto; padding: 24px 16px 64px; }
h1 { font: 400 32px/40px Roboto, sans-serif; margin: 0 0 8px; }
h2 { font: 500 22px/28px Roboto, sans-serif; margin: 32px 0 12px; }
.muted { color: var(--md-sys-color-on-surface-variant); }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.toolbar md-outlined-text-field { flex: 1; min-width: 200px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.card { display: flex; gap: 16px; align-items: center; padding: 16px; margin-bottom: 12px; border-radius: 12px; background: var(--md-sys-color-surface-container-low); border: 1px solid var(--md-sys-color-outline-variant); color: inherit; }
.card:hover { background: var(--md-sys-color-surface-container-high); }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--md-sys-color-primary-container); color: var(--md-sys-color-on-primary-container); display: grid; place-items: center; font-weight: 500; font-size: 18px; }
.card .body { flex: 1; min-width: 0; }
.card .name { font-size: 16px; font-weight: 500; color: var(--md-sys-color-on-surface); }
.card .desc { font-size: 14px; color: var(--md-sys-color-on-surface-variant); margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.score { text-align: right; flex: none; }
.score .n { font-size: 24px; font-weight: 500; color: var(--md-sys-color-primary); }
.score .c { font-size: 12px; color: var(--md-sys-color-on-surface-variant); }
.tags { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.tag { font-size: 12px; padding: 2px 10px; border-radius: 8px; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.star { font-family: 'Material Symbols Outlined'; font-variation-settings: 'FILL' 1; font-size: 20px; vertical-align: middle; color: var(--md-sys-color-outline-variant); }
.star.on { color: var(--md-sys-color-primary); }
.stars { display: inline-flex; }
.panel { background: var(--md-sys-color-surface-container-low); border: 1px solid var(--md-sys-color-outline-variant); border-radius: 12px; padding: 16px; }
.aspect { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.aspect .label { width: 130px; font-size: 14px; color: var(--md-sys-color-on-surface-variant); }
.bar { flex: 1; height: 8px; border-radius: 4px; background: var(--md-sys-color-surface-container-highest); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--md-sys-color-primary); border-radius: 4px; }
.aspect .v { width: 32px; text-align: right; font-size: 14px; }
.review { padding: 16px 0; border-bottom: 1px solid var(--md-sys-color-outline-variant); }
.review .meta { display: flex; justify-content: space-between; font-size: 14px; }
.review .meta b { color: var(--md-sys-color-on-surface); font-weight: 500; }
.review .mini { font-size: 13px; color: var(--md-sys-color-on-surface-variant); display: flex; gap: 16px; flex-wrap: wrap; margin: 4px 0; }
.rate-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.rate-row .label { width: 130px; font-size: 14px; }
.rate-row button { background: none; border: 0; padding: 0; cursor: pointer; }
.rate-row .star { font-size: 28px; }
textarea.md { width: 100%; min-height: 96px; margin-top: 8px; padding: 12px 16px; font: inherit; color: inherit; background: transparent; border: 1px solid var(--md-sys-color-outline); border-radius: 4px; resize: vertical; }
textarea.md:focus { outline: 2px solid var(--md-sys-color-primary); border-color: transparent; }
.actions { display: flex; gap: 8px; margin-top: 12px; justify-content: flex-end; }
.empty { text-align: center; padding: 48px 0; }
/* leaderboard */
.podiums { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 32px 0 8px; }
.podium { flex: 1; max-width: 240px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 8px 0; border-radius: 16px 16px 0 0; color: inherit; background: var(--md-sys-color-surface-container-low); border: 1px solid var(--md-sys-color-outline-variant); border-bottom: 0; }
.podium:hover { background: var(--md-sys-color-surface-container-high); }
.podium .avatar { width: 56px; height: 56px; font-size: 24px; margin-bottom: 8px; }
.podium .pname { font-weight: 500; color: var(--md-sys-color-on-surface); }
.podium .n { font-size: 28px; font-weight: 500; color: var(--md-sys-color-primary); }
.podium .c { font-size: 12px; color: var(--md-sys-color-on-surface-variant); margin-bottom: 12px; }
.podium .step { width: calc(100% + 16px); margin: auto -8px 0; display: grid; place-items: center; font: 500 28px Roboto, sans-serif; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.podium.p1 .step { height: 96px; background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.podium.p2 .step { height: 68px; }
.podium.p3 .step { height: 48px; }
.podium.p1 .avatar { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.rank { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 500; background: var(--md-sys-color-surface-container-highest); color: var(--md-sys-color-on-surface); }

.avatar.logo { object-fit: contain; background: var(--md-sys-color-surface-container-highest); }
.reply { display: flex; gap: 12px; margin: 12px 0 0 16px; padding: 12px; border-radius: 12px; background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
.reply .meta { justify-content: flex-start; gap: 8px; align-items: center; }
.reply .meta b { color: inherit; }
.reply .tag { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
.reply .muted { color: inherit; opacity: .7; }
.replyform { margin: 8px 0 0 16px; }
.replyform textarea.md { min-height: 64px; }
.ownerform { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.pick { flex: 1; min-width: 160px; height: 56px; padding: 0 12px; font: inherit; color: var(--md-sys-color-on-surface); background: transparent; border: 1px solid var(--md-sys-color-outline); border-radius: 4px; }
.pick option { background: var(--md-sys-color-surface); }
img, md-filter-chip { max-width: 100%; }
html { -webkit-text-size-adjust: 100%; }
@media (max-width: 640px) {
  .top { height: auto; min-height: 56px; flex-wrap: wrap; padding: 6px 8px; row-gap: 2px; }
  .top .title { font-size: 18px; margin-right: 0; }
  .top .who { display: none; }
  .top > span[style] { display: none; }
  .top .title { flex: 1 1 auto; }
  .seg { padding: 0 10px; height: 32px; font-size: 13px; }
  main { padding: 16px 12px 48px; }
  h1 { font-size: 28px; line-height: 36px; }
  .toolbar { gap: 8px; }
  .toolbar .chips:last-child, .toolbar > span { flex-basis: 100%; }
  .card { padding: 12px; gap: 12px; }
  .card .name { word-break: break-word; }
  .score .n { font-size: 20px; }
  .star { font-size: 18px; }
  .panel { padding: 12px; }
  .aspect .label, .rate-row .label { width: 92px; font-size: 13px; }
  .rate-row .star { font-size: 30px; }
  .rate-row button { padding: 4px 2px; }
  .review .mini { gap: 4px 12px; }
  .reply, .replyform { margin-left: 4px; }
  .podiums { gap: 6px; margin-top: 16px; }
  .podium { padding: 12px 4px 0; border-radius: 12px 12px 0 0; }
  .podium .avatar { width: 40px !important; height: 40px !important; font-size: 18px !important; }
  .podium .pname { font-size: 13px; word-break: break-word; line-height: 1.2; }
  .podium .n { font-size: 22px; }
  .podium .stars .star { font-size: 14px; }
  .podium .step { font-size: 22px; }
  .podium .c { font-size: 11px; }
  .ownerform { flex-direction: column; align-items: stretch; }
  .ownerform .pick { width: 100%; }
  .actions { flex-wrap: wrap; }
  .tags { gap: 4px; }
}
