
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-weight: 500; }
svg.ic { display: block; flex: none; }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--brand-tint); }
body.drawer-open { overflow: hidden; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); }
.num { font-variant-numeric: tabular-nums; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar {
  width: 36px; height: 36px; border-radius: var(--r-pill); flex: none;
  background: var(--surface-2); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.avatar.me { background: var(--brand-tint); color: var(--brand-600); }
.ic-w { display: inline-flex; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  background: var(--surface-blur);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.topbar-in { height: 56px; display: flex; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand svg { width: 28px; height: 28px; }
.brand .b2 { color: var(--brand-600); }
.brand-slogan { font-size: 11px; font-weight: 400; color: var(--ink-3); margin-left: 2px; }

.search { position: relative; flex: 1; max-width: 240px; }
.search .ic-w { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%; height: 36px; border: 1px solid var(--border); border-radius: var(--r-pill);
  background: var(--surface); padding: 0 14px 0 36px; font: inherit; font-size: 13px; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: 2px solid var(--brand-600); outline-offset: 1px; border-color: transparent; }

.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar .search-toggle { display: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  font-size: 13px; font-weight: 500; white-space: nowrap;
  border: 1px solid transparent;
  transition: background var(--t-micro), color var(--t-micro), border-color var(--t-micro), transform var(--t-micro);
}
.btn:active { transform: scale(.97); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12px; }
.btn-primary { background: var(--brand-solid); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-outline { background: var(--surface); border-color: var(--border-strong); color: var(--ink); }
.btn-outline:hover { background: var(--brand-tint); border-color: var(--brand-600); color: var(--brand-600); }
.btn-ghost { color: var(--brand-600); padding: 0 8px; }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-danger { color: var(--down); border-color: var(--down); background: var(--surface); }
.btn-danger:hover { background: var(--down-tint); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn-icon {
  width: 36px; height: 36px; padding: 0; border-radius: var(--r-sm);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2); border: 1px solid var(--border); background: var(--surface);
  transition: background var(--t-micro), color var(--t-micro), border-color var(--t-micro);
}
.btn-icon:hover { background: var(--brand-tint); color: var(--brand-600); border-color: var(--brand-600); }

.btn-support.is-on { background: var(--brand-solid); color: #fff; border-color: transparent; }
.btn-support.is-on:hover { background: var(--brand-hover); }
.btn-dislike.is-on { background: var(--down-tint); border-color: var(--down); color: var(--down); }
.btn-follow.is-on { background: var(--surface-2); border-color: var(--border-strong); color: var(--ink-2); }
.btn-reserve.is-on { background: var(--brand-hover); }

@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.22); } 100% { transform: scale(1); } }
.cnt { display: inline-block; }
.cnt.bump { animation: bump .4s ease; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; padding-top: 20px; padding-bottom: 48px; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.composer { position: relative; padding: 14px 16px; }
.composer-top { display: flex; gap: 12px; align-items: flex-start; }
.composer-input { flex: 1; min-width: 0; }
.composer-input textarea {
  width: 100%; border: 0; outline: 0; resize: none; background: transparent;
  font: inherit; font-size: 14px; color: var(--ink);
  min-height: 24px; max-height: 120px; padding: 5px 0;
}
.composer-input textarea::placeholder { color: var(--ink-3); }
.composer-toolbar { display: flex; align-items: center; gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.composer-count { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.composer-count.warn { color: var(--accent-ink); }

.composer-bar { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.composer-mode { display: inline-flex; padding: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); }
.cm-opt {
  border: 0; background: none; cursor: pointer;
  padding: 4px 12px; border-radius: var(--r-pill);
  font: 500 12px var(--font-sans); color: var(--ink-2);
  transition: background var(--t-micro, 120ms), color var(--t-micro, 120ms);
}
.cm-opt:hover { color: var(--ink); }
.cm-opt.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-hover); }
.cm-opt[data-mode="official"].is-on { background: var(--brand-solid); color: #fff; box-shadow: none; }
.cm-opt:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.composer-official-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--brand-600); }

.composer-game-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 3px 6px 3px 9px;
  background: var(--brand-tint); color: var(--brand-600);
  border-radius: var(--r-pill); font-size: 12px; font-weight: 500;
}
.composer-game-chip[hidden] { display: none; }
.composer-game-chip .chip-x {
  width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: 50%; color: var(--brand-600); font-size: 15px; line-height: 1;
}
.composer-game-chip .chip-x:hover { background: rgba(0, 0, 0, .08); }
[data-theme="dark"] .composer-game-chip .chip-x:hover { background: rgba(255, 255, 255, .12); }
.composer-game-chip .ic-w { display: inline-flex; }

.img-tray {
  display: grid; gap: 3px; margin-top: 8px;
  border-radius: var(--r-sm); overflow: hidden;
}
.img-tray[hidden] { display: none; }
#composer-imgs, #rv-imgs { max-width: 420px; }
#composer-imgs.is-many, #rv-imgs.is-many,
#composer-imgs.is-four, #rv-imgs.is-four { max-width: 300px; }
#composer-imgs.is-two, #rv-imgs.is-two,
#composer-imgs.is-three, #rv-imgs.is-three { max-width: 360px; }
.img-tray.is-one { grid-template-columns: 1fr; }
.img-tray.is-two { grid-template-columns: 1fr 1fr; }
.img-tray.is-three { grid-template-columns: 1fr 1fr; }
.img-tray.is-three .img-cell:first-child { grid-column: 1 / -1; }
.img-tray.is-four { grid-template-columns: 1fr 1fr; }
.img-tray.is-many { grid-template-columns: repeat(3, 1fr); }

.img-cell {
  position: relative; margin: 0; overflow: hidden;
  background: var(--surface-2); border-radius: 4px;
}
.img-cell img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
#composer-imgs.is-one .img-cell img,
#rv-imgs.is-one .img-cell img,
.post-imgs.is-one .img-cell img { max-height: 320px; object-fit: contain; background: var(--surface-2); }
.is-two .img-cell img,
.is-three .img-cell img,
.is-four .img-cell img,
.is-many .img-cell img { aspect-ratio: 1 / 1; }
.is-three .img-cell:first-child img { aspect-ratio: 16 / 9; }

.img-cell.is-local img,
.img-cell.is-busy img { opacity: .55; }
.img-mask {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .45));
}
.img-prog {
  position: absolute; left: 6px; bottom: 5px; color: #fff;
  font-size: 11px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
.img-err {
  position: absolute; left: 6px; bottom: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; background: var(--down); color: #fff;
  font-size: 11px; font-weight: 700;
}
[data-theme="dark"] .img-err, [data-theme="dark"] .img-retry { color: #431111; }
.img-cell.is-error { outline: 2px solid var(--down); outline-offset: -2px; }

.img-x, .img-retry {
  position: absolute; top: 4px; right: 4px;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, .55); color: #fff;
  border-radius: 50%; font-size: 13px; line-height: 1;
}
.img-x { width: 20px; height: 20px; }
.img-x:hover { background: rgba(0, 0, 0, .78); }
.img-retry {
  top: auto; right: auto; left: 6px; bottom: 4px;
  width: auto; height: auto; border-radius: var(--r-pill);
  padding: 2px 8px; font-size: 11px; font-weight: 600;
  background: var(--down);
}
@media (hover: none) {
  .img-x { background: rgba(0, 0, 0, .68); }
}

.mention {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 20;
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  overflow: hidden; max-height: 320px; overflow-y: auto;
}
.mention-head {
  padding: 7px 12px 5px; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  text-transform: uppercase; color: var(--ink-3); background: var(--surface-2);
}
.mention-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; font-size: 13px; text-align: left; }
.mention-item:hover, .mention-item.is-cursor { background: var(--brand-tint); }
.mention-item .mini-cover { width: 24px; height: 36px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 11px; font-weight: 600; flex: none; }
.mention-item .mini-cover.mini-topic { width: 24px; height: 24px; }
.mention-item .mini-topic { background: var(--brand-solid); }
.mention-item .m-studio { margin-left: auto; font-size: 11px; color: var(--ink-3); }

.tabs { display: flex; align-items: flex-end; gap: 2px; margin-top: 16px; border-bottom: 1px solid var(--border); }
.tab {
  padding: 10px 14px; font-size: 13px; font-weight: 500; color: var(--ink-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color var(--t-micro), border-color var(--t-micro);
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand-600); border-bottom-color: var(--brand-600); }
.tabs-meta { margin-left: auto; display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-3); padding-bottom: 10px; }

.subscribe-row { display: flex; justify-content: flex-end; margin-top: 10px; }
.btn-subscribe.is-on { background: var(--brand-tint); color: var(--brand-600); }

.tagbar {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; padding-bottom: 2px;
  overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
}
.tagbar::-webkit-scrollbar { display: none; }

.tagchip {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  cursor: pointer; white-space: nowrap;
  text-decoration: none;
  transition: background var(--t-micro), border-color var(--t-micro), color var(--t-micro);
}
.tagchip:hover { color: var(--ink); border-color: var(--ink-3); }
.tagchip:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.tagchip.is-active {
  background: var(--brand-solid); border-color: var(--brand-solid); color: #fff;
}
.tagchip-n {
  font-size: 11px; opacity: .65;
  font-variant-numeric: tabular-nums;
}
.tagchip.is-active .tagchip-n { opacity: .85; }

.tag-empty {
  display: none;
  padding: 28px 20px; text-align: center;
  color: var(--ink-3); font-size: 13.5px;
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--r-md);
}
.tag-empty.is-on { display: block; }
.tag-empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

@media (max-width: 720px) {
  .tagbar { margin-top: 10px; gap: 6px; }
  .tagchip { height: 30px; padding: 0 10px; font-size: 12.5px; }
}

.game-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.tab-pane { display: none; }
.tab-pane.is-active { display: flex; flex-direction: column; gap: 10px; }
.game-row.is-hidden, .post.is-hidden { display: none !important; }
.game-row {
  display: grid;
  grid-template-columns: 26px 72px minmax(0, 1fr) auto auto auto;
  gap: 12px; align-items: center;
  padding: 10px 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-md);
  cursor: pointer; text-align: left;
  transition: transform var(--t-micro), border-color var(--t-micro), box-shadow var(--t-micro);
}
.game-row:hover { transform: translateY(-1px); border-color: var(--border-strong); box-shadow: var(--shadow-hover); }

.rank-badge {
  width: 26px; height: 26px; border-radius: var(--r-sm); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
}
.rank-badge.top1 { background: linear-gradient(135deg, #FCE9C4, #F5CE7E); color: var(--gold-ink); }
.rank-badge.top2 { background: linear-gradient(135deg, #EDF1F6, #D5DCE5); color: var(--silver-ink); }
.rank-badge.top3 { background: linear-gradient(135deg, #F6E7D6, #E8C39C); color: var(--bronze-ink); }
[data-theme="dark"] .rank-badge.top1 { background: linear-gradient(135deg, #5C4718, #96742E); }
[data-theme="dark"] .rank-badge.top2 { background: linear-gradient(135deg, #3A3F48, #5A6270); }
[data-theme="dark"] .rank-badge.top3 { background: linear-gradient(135deg, #46331F, #6B5232); }

.game-row { position: relative; }
.game-row.rank-1,
.game-row.rank-2,
.game-row.rank-3 {
  box-shadow: var(--shadow-hover);
}
.game-row.rank-1::before,
.game-row.rank-2::before,
.game-row.rank-3::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; border-radius: 0 3px 3px 0;
}
.game-row.rank-1 { border-color: var(--gold); background: linear-gradient(168deg, var(--gold-tint) 0%, var(--surface) 46%); }
.game-row.rank-1::before { background: var(--gold); }
.game-row.rank-2 { border-color: var(--silver); background: linear-gradient(168deg, var(--silver-tint) 0%, var(--surface) 55%); }
.game-row.rank-2::before { background: var(--silver); }
.game-row.rank-3 { border-color: var(--bronze); background: linear-gradient(168deg, var(--bronze-tint) 0%, var(--surface) 55%); }
.game-row.rank-3::before { background: var(--bronze); }

.game-row.rank-1 { grid-template-columns: 30px 84px minmax(0, 1fr) auto auto auto; }
.game-row.rank-1 .rank-badge { width: 30px; height: 30px; font-size: 15px; }
.game-row.rank-1 .cover { width: 84px; height: 126px; font-size: 30px; }
.game-row.rank-2 { grid-template-columns: 28px 78px minmax(0, 1fr) auto auto auto; }
.game-row.rank-2 .rank-badge { width: 28px; height: 28px; font-size: 14px; }
.game-row.rank-2 .cover { width: 78px; height: 117px; font-size: 27px; }
.game-row.rank-3 .rank-badge { width: 28px; height: 28px; font-size: 14px; }

.game-row.rank-1 .gr-title h3 { font-size: 17px; font-weight: 600; }
.game-row.rank-1 .gr-score b { font-size: 19px; }
.game-row.rank-1 .gr-score .ct { font-size: 12px; }

.champ-chip {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-size: 11px; font-weight: 600; color: var(--gold-ink);
  background: var(--gold-tint); border: 1px solid var(--gold);
  border-radius: var(--r-pill); padding: 2px 8px 2px 6px;
}
.champ-chip .ic { display: block; }

.cover {
  width: 72px; height: 108px; border-radius: var(--r-sm); flex: none;
  background: linear-gradient(135deg, var(--c1, #333), var(--c2, #666));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 26px; font-weight: 600;
}
.mini-cover { background: linear-gradient(135deg, var(--c1, #333), var(--c2, #666)); }

.cover, .mini-cover { position: relative; overflow: hidden; }
.cover img, .mini-cover img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}

.gr-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.gr-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.gr-title h3 { font-size: 16px; font-weight: 500; }
.gr-link { color: inherit; text-decoration: none; }
.gr-link:hover { color: var(--brand-600); text-decoration: underline; }
.gr-title .verified { color: var(--brand); flex: none; }
.gr-sub { color: var(--ink-2); }
.gr-meta { font-size: 11px; color: var(--ink-3); }

.gr-stats { display: flex; flex-direction: column; gap: 5px; align-items: flex-end; min-width: 104px; }
.gr-score { display: flex; align-items: baseline; gap: 4px; }
.gr-score .st { color: var(--accent); align-self: center; }
.gr-score b { font-size: 16px; font-weight: 600; }
.gr-score .ct { font-size: 11px; color: var(--ink-3); }
.pos { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-2); }
.pos-bar { width: 56px; height: 4px; border-radius: 2px; background: var(--surface-2); overflow: hidden; flex: none; }
.pos-bar.big { width: 100%; height: 6px; border-radius: 3px; }
.pos-fill { display: block; height: 100%; background: var(--up); border-radius: inherit; }

.change { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; font-weight: 600; min-width: 52px; justify-content: center; }
.change.up { color: var(--up); }
.change.down { color: var(--down); }
.change.flat { color: var(--ink-3); }
.new-chip {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  color: var(--accent-ink); background: var(--accent-tint);
  padding: 2px 7px; border-radius: var(--r-pill);
}
.rank-badge.top10 {
  box-shadow: inset 0 0 0 1.5px rgba(239, 159, 39, .45);
  color: var(--accent-ink);
}
.game-row:has(> .rank-badge.top10) { background: linear-gradient(90deg, rgba(239,159,39,.06), transparent 30%); }
@keyframes rank-pop {
  0% { transform: scale(.6); opacity: 0; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.rank-badge { animation: rank-pop .45s ease both; }
.game-row:nth-child(2) .rank-badge { animation-delay: .05s; }
.game-row:nth-child(3) .rank-badge { animation-delay: .1s; }
.game-row:nth-child(4) .rank-badge { animation-delay: .15s; }
:root[data-upcolor="red"][data-theme="light"] { --up: #A32D2D; --up-tint: #FCEBEB; --down: #0F6E56; --down-tint: #E1F5EE; }
:root[data-upcolor="red"][data-theme="dark"] { --up: #E08B8B; --up-tint: #4A1A1A; --down: #9FE1CB; --down-tint: #085041; }
.rel-chip {
  font-size: 11px; font-weight: 500; color: var(--accent-ink); background: var(--accent-tint);
  padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap;
}

.gr-actions { display: flex; gap: 8px; align-items: center; }

.load-more-wrap { display: flex; justify-content: center; margin-top: 16px; }
.empty { padding: 40px 20px; text-align: center; color: var(--ink-3); }
.empty b { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.sk-row { display: flex; gap: 12px; align-items: center; padding: 10px 14px; }
.sk { display: block; background: var(--border); border-radius: 6px; animation: sk-pulse 1.2s ease-in-out infinite; }
.sk-badge { width: 26px; height: 26px; border-radius: var(--r-sm); }
.sk-cover { width: 72px; height: 108px; border-radius: var(--r-sm); flex: none; }
.sk-main { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.sk-line { height: 12px; }
.sk-line.w60 { width: 60%; } .sk-line.w40 { width: 40%; }
@keyframes sk-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.feed-tabs { display: flex; gap: 4px; margin: 28px 0 4px; border-bottom: 1px solid var(--border); }
.ft-tab {
  border: 0; background: none; cursor: pointer; padding: 9px 2px; margin-right: 18px;
  font: 600 15px var(--font-sans); color: var(--ink-2); position: relative;
  transition: color var(--t-micro, 120ms);
}
.ft-tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--brand-solid); opacity: 0; transition: opacity var(--t-micro, 120ms);
}
.ft-tab:hover { color: var(--ink); }
.ft-tab.is-on { color: var(--ink); }
.ft-tab.is-on::after { opacity: 1; }
.ft-tab:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 3px; border-radius: 4px; }
.feed-panel[hidden] { display: none; }
.feed-foot { margin-top: 12px; }
.feed-following-empty {
  padding: 30px 6px; text-align: center; color: var(--ink-2);
  font-size: 14px; line-height: 1.65;
}
.feed-following-empty a { color: var(--brand-600); }
.post { display: flex; gap: 12px; padding: 14px 16px; }
.post + .post { margin-top: 10px; }
.post-body { flex: 1; min-width: 0; }
.post-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.post-name { font-size: 13px; font-weight: 500; }
a.avatar-link { display: inline-flex; border-radius: 50%; }
a.avatar-link:hover .avatar { filter: brightness(0.95); }
.post-time { font-size: 11px; color: var(--ink-3); }
.post-time::before { content: "·"; margin-right: 7px; }
.chip-official { background: var(--up-tint); color: var(--up); border-radius: var(--r-pill); padding: 1px 8px; font-size: 11px; font-weight: 500; }
.post-text { margin-top: 3px; color: var(--ink); }
.post-text .tag-btn { color: var(--brand-600); font-weight: 500; padding: 0; }
.post-text .tag-btn:hover { text-decoration: underline; }
.post-text a.tag-btn { text-decoration: none; cursor: pointer; }
.post-text a.tag-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.post-text .mention-link { background: var(--brand-tint); border-radius: var(--r-sm); padding: 0 4px; }
.post-topics { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.post-topics .topic-link {
  font-size: 12px; color: var(--brand-600); background: var(--brand-tint);
  border-radius: var(--r-pill); padding: 2px 10px; text-decoration: none;
}
.post-topics .topic-link:hover { background: var(--brand-solid); color: #fff; }
.post-actions { display: flex; gap: 4px; margin-top: 8px; }
.p-act { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: var(--r-sm); font-size: 11px; color: var(--ink-3); transition: color var(--t-micro), background var(--t-micro); }
.p-act:hover { color: var(--brand-600); background: var(--brand-tint); }
.p-act.is-on { color: var(--brand-600); }

.rail-card { padding: 14px 16px; }
.rail-card h3 { font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.rail-hint { font-size: 11px; font-weight: 400; color: var(--ink-3); }
.rise-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 0; text-align: left; border-radius: var(--r-sm); }
.rise-item:hover .rise-name { color: var(--brand-600); }
.rise-item .mini-cover { width: 32px; height: 48px; border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 600; flex: none; }
.rise-item .mini-cover.mini-topic { width: 32px; height: 32px; }
.rise-item .mini-cover.mini-topic { background: var(--brand-solid); }

.topic-hero { padding: 18px 20px; }
.topic-crumb { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.topic-crumb a { color: var(--brand-600); text-decoration: none; }
.topic-crumb a:hover { text-decoration: underline; }
.topic-title { font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.topic-meta { margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.topic-meta code { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); border-radius: var(--r-sm); padding: 1px 6px; }
.topic-desc { margin-top: 8px; font-size: 14px; line-height: 1.55; color: var(--ink); }

.user-hero { display: flex; gap: 16px; align-items: center; padding: 18px 20px; }
.user-hero .avatar.xl { width: 64px; height: 64px; font-size: 24px; flex: none; }
.user-hero-main { min-width: 0; }
.user-name { font-size: 20px; font-weight: 600; }
.user-bio { margin-top: 4px; font-size: 13px; color: var(--ink-2); }
.user-meta { margin-top: 6px; font-size: 12px; color: var(--ink-3); }

.profile-banner {
  position: relative;
  height: 200px;
  border-radius: var(--r-md) var(--r-md) 0 0;
  overflow: visible;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: 0;
}
.banner-bg {
  position: absolute; inset: 0;
  border-radius: var(--r-md) var(--r-md) 0 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--brand-800) 0%, var(--brand) 50%, var(--brand-600) 100%);
}
.banner-bg::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, .12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, .08) 0%, transparent 45%);
}
[data-theme="dark"] .banner-bg {
  background: linear-gradient(135deg, #0C2440 0%, #1A3A5C 50%, #2563A0 100%);
}
.banner-avatar {
  position: absolute;
  left: 20px;
  bottom: -48px;
  z-index: 2;
}
.profile-avatar {
  width: 96px; height: 96px;
  font-size: 36px; font-weight: 600;
  border-radius: var(--r-pill);
  border: 4px solid var(--surface);
  background: var(--surface-2);
  color: var(--brand-600);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
[data-theme="dark"] .profile-avatar {
  border-color: var(--surface);
}

.profile-info {
  border-top: 0;
  border-radius: 0 0 var(--r-md) var(--r-md);
  padding: 56px 20px 0;
  position: relative;
}
.profile-info-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.profile-info-main { min-width: 0; flex: 1; }
.profile-name {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.profile-handle {
  font-size: 13px; color: var(--ink-3);
  margin-top: 2px;
}
.profile-bio {
  margin-top: 10px;
  font-size: 14px; line-height: 1.55;
  color: var(--ink);
}
.profile-meta-row {
  display: flex; flex-wrap: wrap; gap: 16px;
  margin-top: 12px;
  font-size: 12px; color: var(--ink-3);
}
.profile-meta-item {
  display: inline-flex; align-items: center; gap: 5px;
}
.profile-meta-item .ic-w { color: var(--ink-3); }
.profile-meta-item a { color: var(--brand-600); }

.profile-actions { flex: none; padding-top: 4px; }
.profile-follow-btn .follow-label { transition: opacity var(--t-micro); }
.profile-follow-btn.is-on {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--ink-2);
}
.profile-follow-btn.is-on .ic-w [data-icon="plus"] { display: none; }

.profile-stats {
  display: flex; align-items: center; gap: 0;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.profile-stat {
  display: flex; align-items: baseline; gap: 5px;
  padding: 0 20px;
  text-decoration: none;
  color: var(--ink-3);
}
.profile-stat:first-child { padding-left: 0; }
.profile-stat b {
  font-size: 16px; font-weight: 600; color: var(--ink);
}
.profile-stat-label {
  font-size: 12px; color: var(--ink-3);
}
.profile-stat:hover b { color: var(--brand-600); }
.profile-stat:hover .profile-stat-label { color: var(--brand-600); }
a.profile-stat:hover { text-decoration: none; }
.profile-stat-divider {
  width: 1px; height: 20px;
  background: var(--border);
  flex: none;
}

.profile-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-top: 14px;
  background: var(--surface);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  overflow: hidden;
}
.profile-tab {
  flex: 1;
  padding: 14px 16px;
  font: 500 14px var(--font-sans);
  color: var(--ink-2);
  text-align: center;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  transition: color var(--t-micro), background var(--t-micro), border-color var(--t-micro);
}
.profile-tab:hover {
  color: var(--brand-600);
  background: var(--brand-tint);
}
.profile-tab.is-active {
  color: var(--brand-600);
  font-weight: 600;
  border-bottom-color: var(--brand-600);
}
.profile-tab:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: -2px;
}

.profile-panel { margin-top: 14px; }
.profile-panel[hidden] { display: none; }
.profile-feed { display: flex; flex-direction: column; gap: 14px; }
.profile-panel > .composer + .profile-feed { margin-top: 14px; }

.media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.media-grid .media-cell {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
}
.media-grid .media-cell img {
  width: 100%; height: 100%; object-fit: cover;
}
.media-grid .media-cell:hover img { filter: brightness(1.08); }
.media-grid:empty { display: none; }
.media-grid > .profile-empty { grid-column: 1 / -1; }

.profile-empty {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.profile-empty-icon {
  width: 64px; height: 64px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}
.profile-empty p { font-size: 13px; color: var(--ink-3); }
.profile-empty b { font-size: 16px; color: var(--ink-2); }

.profile-not-found {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

@media (max-width: 767px) {
  .profile-banner { height: 150px; border-radius: 0; border-left: 0; border-right: 0; }
  .banner-bg { border-radius: 0; }
  .banner-avatar { left: 14px; bottom: -36px; }
  .profile-avatar { width: 72px; height: 72px; font-size: 28px; border-width: 3px; }
  .profile-info { padding: 42px 14px 0; border-radius: 0; border-left: 0; border-right: 0; }
  .profile-info-top { flex-direction: column; gap: 12px; }
  .profile-actions { align-self: flex-start; }
  .profile-name { font-size: 19px; }
  .profile-stats { gap: 0; overflow-x: auto; scrollbar-width: none; }
  .profile-stats::-webkit-scrollbar { display: none; }
  .profile-stat { padding: 0 12px; }
  .profile-stat:first-child { padding-left: 0; }
  .profile-tabs { border-radius: 0; border-left: 0; border-right: 0; }
  .profile-tab { padding: 12px 8px; font-size: 13px; }
  .media-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-empty { padding: 36px 16px; }
}

a.post-name { color: var(--ink); text-decoration: none; }
a.post-name:hover { color: var(--brand-600); text-decoration: underline; }
.rise-name { font-size: 13px; font-weight: 500; }
.rise-pct { margin-left: auto; color: var(--up); font-size: 12px; font-weight: 600; }
.studio-item { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.studio-dot { width: 8px; height: 8px; border-radius: var(--r-pill); background: var(--brand); flex: none; }
.studio-name { font-size: 13px; }
.studio-count { margin-left: auto; font-size: 11px; color: var(--ink-3); }
.rail-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--brand-600);
  text-decoration: none;
}
.rail-more:hover { color: var(--brand-800); text-decoration: underline; }

.cta-card { background: var(--brand-tint); border-color: transparent; }
.cta-card p { font-size: 12px; color: var(--ink-2); margin: 6px 0 12px; }

.rail-footer { padding: 4px 2px; }
.footer-links { display: flex; gap: 14px; font-size: 11px; }
.footer-links a { color: var(--ink-3); }
.footer-links a:hover { color: var(--brand-600); }
.footer-brand { font-size: 11px; color: var(--ink-3); margin-top: 6px; }

.overlay { position: fixed; inset: 0; background: rgba(44, 44, 42, .25); opacity: 0; pointer-events: none; transition: opacity var(--t-panel); z-index: 50; }
[data-theme="dark"] .overlay { background: rgba(0, 0, 0, .45); }
.overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100vw; z-index: 51;
  background: var(--surface); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform var(--t-panel), width .24s ease;
}
.drawer.is-open { transform: none; }
.sheet-handle { display: none; }

.drawer.is-game { width: 85vw; }
.drawer.is-game.is-max { width: 100vw; }
.drawer-max {
  position: absolute; top: 12px; right: 56px;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  background: rgba(0, 0, 0, .32); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
}
.drawer-max:hover { background: rgba(0, 0, 0, .5); }
.drawer-max svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) {
  .drawer.is-game, .drawer.is-game.is-max { left: 0; width: auto; }
  .drawer.is-game .drawer-max { display: none; }
}

.drawer.is-user { width: 85vw; }
.drawer.is-user.is-max { width: 100vw; }
.ud-acts { position: absolute; top: 12px; right: 12px; z-index: 2; display: flex; gap: 8px; }
.ud-act { width: 36px; height: 36px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .32); color: #fff; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; }
.ud-act:hover { background: rgba(0, 0, 0, .5); }
.ud-hero { position: relative; flex: none; padding: 26px 20px 18px; display: flex; align-items: center; gap: 14px; color: #fff; background: linear-gradient(135deg, var(--c1, #333), var(--c2, #666)); }
.ud-avatar { width: 64px; height: 64px; border-radius: var(--r-pill); background: #fff; color: var(--c1, #333); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 22px; overflow: hidden; flex: none; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.ud-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ud-title { font-size: 20px; font-weight: 600; }
.ud-handle { font-size: 13px; opacity: .85; margin-top: 2px; }
.ud-body { padding: 18px 20px 0; }
.ud-bio { font-size: 14px; line-height: 1.55; color: var(--ink); }
.ud-stats { display: flex; gap: 18px; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.ud-stats b { color: var(--ink); font-weight: 600; }
.ud-follow { margin-top: 14px; }
.ud-feed { margin-top: 16px; border-top: 1px solid var(--border); }
.ud-feed .post { padding: 14px 20px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; box-shadow: none; background: transparent; }
@media (max-width: 900px) {
  .drawer.is-user { left: 0; width: auto; }
  .ud-act[data-action="max"] { display: none; }
}

.drawer-hero { position: relative; height: 168px; flex: none; padding: 16px; display: flex; align-items: flex-end; color: #fff; background: linear-gradient(135deg, var(--c1, #333), var(--c2, #666)); }
.drawer-hero .glyph { position: absolute; right: 10px; bottom: -14px; font-size: 120px; font-weight: 600; opacity: .18; line-height: 1; user-select: none; }
.drawer-hero h2 { font-size: 22px; font-weight: 600; display: flex; align-items: center; gap: 8px; position: relative; }
.drawer-hero .verified { color: #fff; flex: none; }
.dh-meta { font-size: 12px; opacity: .88; margin-top: 3px; position: relative; }
.drawer-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .32); color: #fff; display: flex; align-items: center; justify-content: center; }
.drawer-close:hover { background: rgba(0, 0, 0, .5); }

.drawer-scroll { flex: 1; overflow-y: auto; padding-bottom: 20px; overscroll-behavior: contain; }

.dl-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 14px 20px 0; font-size: 12px; color: var(--ink-3); }
.dl-meta b { color: var(--ink-2); font-weight: 500; }
.dl-one { padding: 8px 20px 0; font-size: 14px; color: var(--ink); }

.rating-summary { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 18px; padding: 16px 20px; margin-top: 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.rs-score { font-size: 30px; font-weight: 500; line-height: 1.1; }
.rs-score .rs-max { font-size: 14px; font-weight: 400; color: var(--ink-3); }
.rs-right { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.rs-count { font-size: 11px; color: var(--ink-3); }
.breakdown { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.bd-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) 32px; gap: 8px; align-items: center; font-size: 11px; color: var(--ink-3); }
.bd-track { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bd-fill { display: block; height: 100%; background: var(--brand-600); border-radius: inherit; }
.bd-row .bd-val { text-align: right; }

.kw-section { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.kw h4 { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.chip { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; margin: 0 6px 6px 0; }
.chip.praise { background: var(--up-tint); color: var(--up); }
.chip.crit { background: var(--down-tint); color: var(--down); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 16px 20px; }
.shot { height: 88px; border-radius: var(--r-sm); background: linear-gradient(135deg, var(--c1, #333), var(--c2, #666)); cursor: zoom-in; transition: filter var(--t-micro); }
.shot:hover { filter: brightness(1.12); }
.shot-img { background-size: cover; background-position: center; }
.stars { color: var(--accent); letter-spacing: 1px; }

.dl-about { padding: 4px 20px 0; }
.dl-about h4 { font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.dl-about p { color: var(--ink-2); }
.dl-about p.clamped { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.dl-about .btn { margin-top: 4px; }
.dl-compare { margin: 12px 20px 0; }

.comments { padding: 16px 20px 0; }
.comments h4 { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment .avatar { width: 32px; height: 32px; font-size: 12px; }
.c-body { flex: 1; min-width: 0; }
.c-name { font-size: 13px; font-weight: 500; }
.c-name .chip-official { margin-left: 6px; }
.c-time { font-size: 11px; color: var(--ink-3); margin-left: 6px; }
.c-text { margin-top: 2px; }
.c-actions { display: flex; gap: 14px; margin-top: 6px; font-size: 11px; color: var(--ink-3); }
.c-actions button:hover { color: var(--brand-600); }
.c-reply { margin-top: 8px; background: var(--brand-tint); border-left: 2px solid var(--brand); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 8px 10px; }
.c-reply .c-name { color: var(--brand-800); }
[data-theme="dark"] .c-reply .c-name { color: var(--brand); }

.drawer-actions { flex: none; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--surface); }
.rate-stars { display: flex; gap: 2px; align-items: center; }
.rate-star { color: var(--border-strong); padding: 4px; border-radius: 4px; line-height: 0; }
.rate-star:hover { color: var(--accent); }
.rate-star.on { color: var(--accent); }
.rate-readout { font-size: 12px; font-weight: 600; color: var(--ink-2); min-width: 30px; }

.pc { margin-top: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: var(--r-sm); }
.pc[hidden] { display: none; }
.pc-list { display: flex; flex-direction: column; gap: 10px; }
.pc-empty { margin: 4px 0; font-size: 12px; color: var(--ink-3); }
.pc-item { display: flex; gap: 8px; align-items: flex-start; }
.pc-item .avatar { width: 26px; height: 26px; font-size: 11px; flex: none; }
.pc-main { flex: 1; min-width: 0; }
.pc-head { display: flex; align-items: baseline; gap: 8px; }
.pc-name { font-size: 12px; font-weight: 500; color: var(--ink); }
.pc-time { font-size: 11px; color: var(--ink-3); }
.pc-hot { font-size: 10px; font-weight: 600; color: var(--accent-ink); background: var(--accent-tint, var(--brand-tint)); border-radius: var(--r-sm); padding: 1px 5px; }
.pc-text { margin: 2px 0 0; font-size: 13px; color: var(--ink); overflow-wrap: break-word; }
.pc-text .tag-btn { color: var(--brand-600); }
.pc-like { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: var(--r-sm); font-size: 11px; color: var(--ink-3); flex: none; }
.pc-like:hover { color: var(--brand-600); background: var(--brand-tint); }
.pc-like.is-on { color: var(--brand-600); }
.pc-composer { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.pc-composer textarea {
  flex: 1; resize: none; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface); padding: 7px 10px; font: inherit; font-size: 13px; color: var(--ink);
  min-height: 34px; max-height: 120px;
}
.pc-composer textarea:focus { outline: 2px solid var(--brand-600); outline-offset: 1px; border-color: transparent; }
.pc-composer .btn { flex: none; }

.lb-root { position: fixed; inset: 0; z-index: 105; background: rgba(12, 12, 11, .92); }
.lb-root[hidden] { display: none; }
.lb-scrim { position: absolute; inset: 0; }
.lb-head {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; color: #fff;
}
.lb-count { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; opacity: .9; }
.lb-x, .lb-nav {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); border: none; border-radius: 50%;
  color: #fff; cursor: pointer; transition: background var(--t-micro);
}
.lb-x:hover, .lb-nav:hover { background: rgba(255, 255, 255, .24); }
.lb-x { width: 36px; height: 36px; }
.lb-x svg, .lb-nav svg {
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.lb-x svg { width: 18px; height: 18px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; }
.lb-nav[hidden] { display: none; }
.lb-nav svg { width: 22px; height: 22px; }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
.lb-stage { margin: 0; position: absolute; inset: 0; display: grid; place-items: center; padding: 56px 64px; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
@media (max-width: 767px) {
  .lb-stage { padding: 56px 8px; }
  .lb-nav { width: 38px; height: 38px; }
  .lb-prev { left: 6px; }
  .lb-next { right: 6px; }
}

/* ---------- 12. Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  transform: translateX(-50%) translateY(8px);
  background: var(--up); color: #fff;
  padding: 10px 16px; border-radius: var(--r-sm); font-size: 13px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-micro), transform var(--t-micro);
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.is-error { background: var(--down); }
[data-theme="dark"] .toast { color: #10352B; }
[data-theme="dark"] .toast.is-error { color: #431111; }

.me-overlay {
  position: fixed; inset: 0; z-index: 52;
  background: rgba(44, 44, 42, .25);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t-panel);
}
[data-theme="dark"] .me-overlay { background: rgba(0, 0, 0, .45); }
.me-overlay.is-open { opacity: 1; pointer-events: auto; }

.me-drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 440px; max-width: 100vw; z-index: 53;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform var(--t-panel);
}
.me-drawer.is-open { transform: none; }

.me-drawer-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-2); cursor: pointer;
  transition: background var(--t-micro), color var(--t-micro);
}
.me-drawer-close:hover { background: var(--brand-tint); color: var(--brand-600); border-color: var(--brand-600); }
.me-drawer-close svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.me-drawer-head {
  flex: none;
  display: flex; gap: 14px; align-items: center;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--brand-tint) 0%, var(--surface) 60%);
}
[data-theme="dark"] .me-drawer-head {
  background: linear-gradient(135deg, rgba(12, 68, 124, .3) 0%, var(--surface) 60%);
}
.me-drawer-head .avatar.xl { width: 56px; height: 56px; font-size: 22px; flex: none; }
.me-head-info { min-width: 0; padding-right: 36px;  }
.me-head-name { font-size: 17px; font-weight: 600; }
.me-head-meta { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.me-head-since { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.me-head-actions { margin-top: 8px; }

.me-gate-drawer {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 12px; padding: 32px 24px; text-align: center;
}
.me-gate-icon {
  width: 64px; height: 64px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
}
.me-gate-title { font-size: 18px; font-weight: 600; }
.me-gate-sub { font-size: 13px; color: var(--ink-2); max-width: 280px; }

.me-drawer .me-tabs {
  flex: none; margin: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
  overflow-x: auto; scrollbar-width: none;
}
.me-drawer .me-tabs::-webkit-scrollbar { display: none; }
.me-drawer .me-tab { padding: 12px 12px; font-size: 13px; white-space: nowrap; }

.me-drawer-body {
  flex: 1; overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 20px 24px;
}

.me-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0 8px;
}
.me-panel-head h3 { font-size: 15px; font-weight: 600; }
.me-panel[hidden] { display: none; }

.me-empty {
  padding: 28px 16px; text-align: center;
  color: var(--ink-3);
}
.me-empty b { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); margin-bottom: 4px; }
.me-empty span { font-size: 12px; }

@media (max-width: 767px) {
  .me-drawer {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto; max-height: 88vh;
    border-left: none; border-top: 1px solid var(--border);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(105%);
  }
  .me-drawer.is-open { transform: none; }
  .me-drawer-close { top: 8px; right: 8px; }
  .me-drawer-head { padding: 16px 16px 12px; }
  .me-drawer-body { padding: 0 16px 20px; }
}

.bottom-nav { display: none; }

@media (max-width: 1279px) {
  .rail-studios { display: none; }
  .game-row .gr-actions .btn-dislike { display: none; }
}
@media (max-width: 1023px) {
  .game-row .gr-actions .btn-dislike { display: inline-flex; }
}

@media (max-width: 1023px) {
  .layout { grid-template-columns: 1fr; }
  .rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rail-footer { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  body { padding-bottom: 76px; }
  .wrap { padding: 0 14px; }

  .brand-slogan { display: none; }
  .topbar .search { display: none; }
  .topbar .search-toggle { display: inline-flex; }
  body.search-open .topbar .search {
    display: block; position: absolute; left: 0; right: 0; top: 56px; max-width: none;
    padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border-strong);
    box-shadow: 0 6px 16px rgba(44, 44, 42, .12);
  }
  body.search-open .topbar .search input { height: 40px; }
  body.search-open .topbar .search .ic-w { left: 26px; }
  .composer-toolbar { flex-wrap: wrap; }
  .composer-bar { width: 100%; }

  .tabs { border-bottom: none; gap: 8px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; padding-bottom: 2px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); margin-bottom: 0; padding: 8px 14px; white-space: nowrap; }
  .tab.is-active { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; }
  .tabs-meta { display: none; }

  .game-row {
    display: grid;
    grid-template-columns: 26px 56px minmax(0, 1fr) auto;
    grid-template-areas:
      "rank cover main change"
      "rank cover stats stats"
      "actions actions actions actions";
    align-items: center; gap: 6px 10px; padding: 12px;
  }
  .game-row.rank-1 { grid-template-columns: 30px 64px minmax(0, 1fr) auto; }
  .game-row.rank-2, .game-row.rank-3 { grid-template-columns: 28px 64px minmax(0, 1fr) auto; }
  .rank-badge { grid-area: rank; align-self: start; }
  .cover { grid-area: cover; align-self: start; width: 56px; height: 84px; font-size: 18px; }
  .game-row.rank-1 .cover, .game-row.rank-2 .cover, .game-row.rank-3 .cover { width: 64px; height: 96px; font-size: 20px; }
  .game-row.rank-1 .gr-title h3 { font-size: 16px; }
  .gr-main { grid-area: main; min-width: 0; }
  .gr-stats { grid-area: stats; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
  .gr-stats .pos-bar { width: 42px; }
  .change-cell { grid-area: change; justify-self: end; align-self: start; }
  .game-row .gr-actions {
    grid-area: actions; width: 100%; justify-content: flex-end; gap: 6px;
    margin-top: 2px; padding-top: 9px; border-top: 1px solid var(--border);
  }
  .game-row .gr-actions .btn { flex: 0 0 auto; height: 30px; padding: 0 11px; font-size: 12px; border-radius: var(--r-pill); }
  .game-row .gr-actions .btn-support { background: var(--brand-tint); color: var(--brand-600); }
  .game-row .gr-actions .btn-support:hover { background: var(--brand-tint); }
  .game-row .gr-actions .btn-support.is-on { background: var(--brand-solid); color: #fff; }

  .rail { grid-template-columns: 1fr; }

  .drawer {
    top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 92vh;
    border-left: none; border-top: 1px solid var(--border);
    border-radius: var(--r-lg) var(--r-lg) 0 0;
    transform: translateY(105%);
  }
  .drawer.is-open { transform: none; }
  .sheet-handle { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--border-strong); margin: 8px auto 0; flex: none; }
  .drawer-hero { height: 140px; }
  .kw-section { grid-template-columns: 1fr; gap: 12px; }

  .toast { top: 16px; bottom: auto; transform: translateX(-50%) translateY(-8px); }
  .toast.show { transform: translateX(-50%); }

  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: 60px; padding: 0 8px env(safe-area-inset-bottom, 0);
    background: var(--surface-blur); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--border);
  }
  .bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; color: var(--ink-3); }
  .bn-item.is-active { color: var(--brand-600); }
  .bn-fab { width: 44px; height: 44px; border-radius: var(--r-pill); background: var(--brand-solid); color: #fff; display: flex; align-items: center; justify-content: center; align-self: center; margin: 0 6px; }
}

.topbar-actions .avatar.me { position: relative; }
.nav-dot {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--r-pill);
  background: #E5484D; color: #fff;
  border: 2px solid var(--surface);
  font: 600 10px/1 var(--font-sans);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.nav-dot[hidden] { display: none; }

.avatar-menu-wrap { position: relative; }

.me-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  max-width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: 0 8px 28px rgba(0,0,0,.14);
  z-index: 9000;
  opacity: 0;
  transform: translateY(-6px) scale(.97);
  transform-origin: top right;
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
  overflow: hidden;
}
.me-menu:not([hidden]) {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.me-menu-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
}
.me-menu-head .avatar { flex-shrink: 0; }
.me-menu-info { min-width: 0; }
.me-menu-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.me-menu-sub {
  font-size: 12px;
  color: var(--ink-3);
}

.me-menu-list { padding: 4px; }

.me-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  background: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  font: 500 13px var(--font-sans);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  transition: background .12s ease;
}
.me-menu-item:hover { background: var(--surface-2); }
.me-menu-item .ic-w { flex-shrink: 0; color: var(--ink-2); }
.me-menu-item .ic-w svg { display: block; }
.me-menu-label { flex: 1; min-width: 0; }

.me-menu-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: #E5484D;
  color: #fff;
  font: 600 10px/1 var(--font-sans);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.me-menu-badge[hidden] { display: none; }

.me-menu-sep { height: 1px; background: var(--border); margin: 4px 8px; }

.me-menu-danger { color: #E5484D; }
.me-menu-danger .ic-w { color: #E5484D; }
.me-menu-danger:hover { background: rgba(229, 72, 77, .08); }

@media (max-width: 640px) {
  .me-menu {
    min-width: 200px;
    max-width: calc(100vw - 32px);
  }
}

.btn-top10.is-on { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; }
.btn-top10:disabled { opacity: .5; cursor: default; }

.me-gate { padding: 32px 24px; text-align: center; }
.me-gate-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.me-gate-sub { font-size: 13px; color: var(--ink-2); margin-bottom: 16px; }

.me-hint { font-size: 12px; color: var(--ink-3); line-height: 1.6; margin: 0 0 10px; }

.me-tabs { display: flex; gap: 4px; margin: 20px 0 12px; border-bottom: 1px solid var(--border); }
.me-tab {
  position: relative; border: 0; background: none; cursor: pointer;
  padding: 10px 14px; font: 500 13px var(--font-sans); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 6px;
}
.me-tab:hover { color: var(--ink); }
.me-tab.is-on { color: var(--ink); font-weight: 600; }
.me-tab.is-on::after {
  content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px;
  height: 2px; border-radius: 2px; background: var(--brand-600);
}
.me-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: #E5484D; }
.me-tab-dot[hidden] { display: none; }
.me-panel { padding: 4px 0 0; }

.me-game {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.me-game:last-child { border-bottom: 0; }
.me-game-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: inherit; text-decoration: none; }
.me-game-name { font-size: 13px; font-weight: 500; }
.me-game-sub { font-size: 11px; color: var(--ink-3); }
.me-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.me-badge {
  display: flex; flex-direction: column; gap: 4px;
  border: 1px solid var(--border); border-radius: 12px; padding: 12px;
  background: var(--surface-2);
}
.me-badge b { font-size: 13px; }
.me-badge span { font-size: 11px; color: var(--ink-3); }
.qa-dislike { border: 1px solid rgba(239, 159, 39, .35); border-radius: 12px; padding: 10px 12px; }
.qa-chip-quiet { color: var(--ink-3); background: transparent; border: 1px dashed var(--border); }
.me-bell {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid var(--border); background: var(--surface);
  border-radius: var(--r-pill); cursor: pointer;
  padding: 5px 11px; font: 500 12px var(--font-sans); color: var(--ink-2);
}
.me-bell:hover { border-color: var(--border-strong); }
.me-bell.is-on { background: var(--brand-solid); border-color: var(--brand-solid); color: #fff; }
.me-bell:disabled { opacity: .5; cursor: default; }
.me-bell-label { line-height: 1; }

.me-notif {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.me-notif:last-child { border-bottom: 0; }
.me-notif.is-unread { background: var(--surface-2); border-radius: var(--r-sm, 8px); padding-left: 10px; padding-right: 10px; }
.me-notif-type {
  flex: none; font-size: 10px; font-weight: 600; letter-spacing: .02em;
  padding: 3px 8px; border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--border);
}
.me-notif.is-unread .me-notif-type { background: var(--brand-solid); color: #fff; border-color: var(--brand-solid); }
.me-notif-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.me-notif-body b { font-size: 13px; font-weight: 500; }
.me-notif-text { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.me-notif-time { font-size: 11px; color: var(--ink-3); }

.me-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.me-row:last-child { border-bottom: 0; }
.me-row-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.me-row-main b { font-size: 13px; font-weight: 500; }
.me-row-sub { font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.me-seg { display: inline-flex; padding: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); }
.me-seg-btn { border: 0; background: none; cursor: pointer; padding: 5px 14px; border-radius: var(--r-pill); font: 500 12px var(--font-sans); color: var(--ink-2); }
.me-seg-btn.is-on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-hover); }

.me-switch { position: relative; flex: 0 0 auto; width: 52px; height: 30px; }
.me-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.me-switch .me-sw-track {
  position: absolute; inset: 0; border-radius: var(--r-pill);
  background: var(--border-strong); transition: background var(--t-micro);
  pointer-events: none;
}
.me-switch .me-sw-knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border-strong);
  transition: transform var(--t-micro); pointer-events: none;
}
.me-switch input:checked ~ .me-sw-track { background: var(--brand-600); }
.me-switch input:checked ~ .me-sw-knob { transform: translateX(22px); border-color: var(--brand-600); }
.me-switch input:focus-visible ~ .me-sw-track { outline: 2px solid var(--brand-600); outline-offset: 2px; }
.me-switch input:disabled ~ .me-sw-track { opacity: .6; }

.me-row-avatar { align-items: center; }
.me-avatar-picker { display: flex; align-items: center; gap: 12px; flex: none; }
.me-avatar-picker .avatar.xl { width: 56px; height: 56px; font-size: 22px; background: var(--surface-2); overflow: hidden; }
.me-avatar-picker .avatar.xl img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.me-avatar-picker label { cursor: pointer; }

.me-row-edit { flex-direction: column; align-items: stretch; gap: 6px; }
.me-input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font: 500 13px var(--font-sans);
  outline: none;
  transition: border-color var(--t-micro, 120ms), box-shadow var(--t-micro, 120ms);
  box-sizing: border-box;
}
.me-input:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px var(--brand-tint);
}
.me-textarea { resize: none; min-height: 40px; line-height: 1.5; }

.me-row-save { justify-content: flex-end; padding-top: 0; }
.me-row-save .btn:disabled { opacity: .5; cursor: default; }

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

.tagbar { cursor: default; }
@media (hover: hover) and (pointer: fine) {
  .tagbar { cursor: grab; }
  .tagbar.is-drag { cursor: grabbing; }
  .tagbar.is-drag .tagchip { pointer-events: none; }
}
.tagbar.fade-l {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 32px), transparent 100%);
}
.tagbar.fade-r {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to right, #000 calc(100% - 32px), transparent 100%);
}
.tagbar.fade-l.fade-r {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 32px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 26px, #000 calc(100% - 32px), transparent 100%);
}
.tagbar-wrap { position: relative; margin-top: 12px; }
.tagbar-wrap .tagbar { margin-top: 0; }
.tb-arrow {
  position: absolute; top: 16px; transform: translateY(-50%);
  z-index: 6; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border-strong, #D7DEE7); background: var(--surface, #fff);
  color: var(--ink-2, #55606D); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .16);
}
.tb-arrow:hover { color: var(--brand, #378ADD); border-color: var(--brand, #378ADD); }
.tb-arrow[hidden] { display: none; }
.tb-l { left: -6px; }
.tb-r { right: -6px; }
@media (max-width: 720px) {
  .tb-arrow { top: 15px; }
}

.tag-list .game-row:not(.rank-1):not(.rank-2):not(.rank-3) {
  border-color: var(--border-strong, #D7DEE7);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 3px 12px rgba(15, 23, 42, .04);
}
.tag-list .game-row:not(.rank-1):not(.rank-2):not(.rank-3)::before {
  content: ""; position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand, #378ADD);
  opacity: .5;
}
