:root {
  color-scheme: dark;
  --bg: #0d1118;
  --surface: #141b25;
  --surface-2: #1a2330;
  --surface-3: #202c3b;
  --border: rgba(186, 204, 229, .12);
  --border-strong: rgba(186, 204, 229, .19);
  --text: #e8eef7;
  --muted: #91a0b5;
  --accent: #9bc4ff;
  --accent-strong: #6da4f5;
  --green: #79c9a4;
  --amber: #e6bf75;
  --red: #e58a8a;
  --shadow: 0 18px 50px rgba(0,0,0,.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background: radial-gradient(ellipse at 20% -20%, rgba(70, 112, 173, .16), transparent 42%), var(--bg); overflow-x: clip; }
button, input { font: inherit; }
button { color: inherit; }
.topbar { height: 72px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--border); background: rgba(13,17,24,.88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 10; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg,#7aa9ee,#426caa); color: #0c1420; font-size: 20px; font-weight: 900; box-shadow: 0 7px 24px rgba(78,132,210,.22); }
.brand-copy { display: flex; flex-direction: column; gap: 2px; }
.brand-copy strong { font-size: 15px; letter-spacing: .01em; }
.brand-copy small { color: var(--muted); font-size: 11px; }
.top-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(230,191,117,.10); flex: 0 0 auto; }
.dot.good { background: var(--green); box-shadow: 0 0 0 4px rgba(121,201,164,.10); }
.dot.bad { background: var(--red); box-shadow: 0 0 0 4px rgba(229,138,138,.10); }
.layout { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 238px minmax(0,1fr); }
.page, .module-content, .content-panel, .panel, .players-layout > *, .profile-source-panel, .chat-charts-grid > *, .chat-ranking-grid > * { min-width: 0; }
.sidebar { border-right: 1px solid var(--border); background: rgba(17,23,32,.72); padding: 24px 13px 18px; display: flex; flex-direction: column; min-height: calc(100vh - 72px); }
.nav-caption { padding: 0 12px; margin: 5px 0 10px; color: #687a91; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.modules-caption { margin-top: 29px; }
.nav-item { border: 0; width: 100%; min-height: 43px; display: flex; align-items: center; gap: 11px; padding: 0 12px; margin: 2px 0; border-radius: 10px; background: transparent; color: #aebbd0; text-align: left; font-size: 13px; cursor: pointer; transition: background .15s,color .15s; }
.nav-item:hover { background: rgba(126,160,206,.09); color: var(--text); }
.nav-item.active { color: #dceaff; background: rgba(108,157,225,.16); box-shadow: inset 2px 0 0 var(--accent-strong); }
.nav-icon { width: 19px; text-align: center; font-size: 16px; color: #9db7d8; }
.nav-count { margin-left: auto; padding: 2px 7px; border-radius: 20px; background: rgba(153,176,205,.12); color: #c5d0df; font-size: 10px; }
.nav-soon { margin-left: auto; color: #74849a; font-size: 10px; }
.nav-disabled { opacity: .66; }
.nav-loading { padding: 10px 12px; color: var(--muted); font-size: 12px; }
.sidebar-foot { margin-top: auto; padding: 13px 10px 3px; display: flex; align-items: center; gap: 9px; color: #7f90a7; font-size: 11px; border-top: 1px solid var(--border); }
.sidebar-foot .dot { width: 6px; height: 6px; }
.content { min-width: 0; padding: 34px clamp(20px,3.3vw,54px) 70px; }
.page { display: none; max-width: 1500px; margin: 0 auto; }
.page.active { display: block; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.eyebrow { color: #7f9fc9; font-size: 10px; font-weight: 800; letter-spacing: .15em; margin-bottom: 8px; }
h1 { margin: 0; font-size: clamp(28px,3vw,36px); line-height: 1.12; letter-spacing: -.035em; font-weight: 750; }
.page-head p { margin: 9px 0 0; max-width: 720px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.players-layout { display: grid; grid-template-columns: minmax(280px, .78fr) minmax(420px, 1.42fr); gap: 18px; align-items: start; }
.panel { background: linear-gradient(180deg,rgba(24,33,46,.96),rgba(19,27,38,.96)); border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow); }
.player-list-panel { padding: 18px 13px 12px; min-height: 440px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 0 5px 13px; }
.panel-head h2, .section-heading h3 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.muted { color: var(--muted); }
.search { height: 39px; display: flex; align-items: center; gap: 9px; padding: 0 12px; margin: 0 3px 12px; border-radius: 9px; background: #0f1620; border: 1px solid var(--border); color: #8296b1; }
.search span { font-size: 19px; line-height: 1; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.search input::placeholder { color: #697b91; }
.players-list { max-height: calc(100vh - 300px); min-height: 280px; overflow-y: auto; padding: 0 2px; }
.player-row { width: 100%; display: flex; align-items: center; gap: 11px; padding: 9px 8px; border: 0; border-radius: 9px; background: transparent; text-align: left; cursor: pointer; }
.player-row:hover { background: rgba(139,169,209,.08); }
.player-row.selected { background: rgba(103,153,221,.14); }
.avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(145deg,#334f70,#24384f); color: #d9eaff; font-size: 14px; font-weight: 800; }
.avatar-large { width: 50px; height: 50px; border-radius: 15px; font-size: 21px; }
.player-ident { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.player-ident strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
.player-ident small { color: #8292a8; font-size: 10px; }
.player-last { margin-left: auto; color: #77879c; font-size: 10px; white-space: nowrap; }
.list-footer { padding: 9px 4px 0; text-align: center; }
.button { min-height: 34px; padding: 0 13px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; font-size: 11px; font-weight: 650; }
.button.secondary { background: #202d3d; border-color: rgba(172,194,222,.12); color: #c8d7ea; }
.button.secondary:hover { background: #2a3b50; }
.profile-panel { min-height: 440px; padding: 22px; }
.profile-head { display: flex; align-items: center; gap: 14px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.profile-head h2 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.profile-login { margin: 4px 0 0; color: #8ea2bb; font-size: 12px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 13px 0 4px; color: var(--muted); font-size: 10px; }
.profile-meta b { color: #cbd7e6; font-weight: 600; }
.profile-sources { display: flex; flex-wrap: wrap; gap: 6px; padding: 5px 0 13px; }
.tag, .count-chip, .pill { display: inline-flex; align-items: center; border-radius: 30px; padding: 4px 9px; background: rgba(125,155,196,.13); color: #b9cbe2; font-size: 10px; font-weight: 650; }
.profile-section { padding: 17px 0; border-top: 1px solid var(--border); }
.section-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.section-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: rgba(113,153,204,.12); font-size: 15px; }
.profile-empty { padding: 25px 0 5px; }
.metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin-bottom: 15px; }
.metric { min-width: 0; padding: 13px 14px; border: 1px solid var(--border); border-radius: 11px; background: rgba(22,31,44,.84); }
.metric span { display: block; color: var(--muted); font-size: 10px; }
.metric strong { display: block; margin-top: 7px; color: #e8f0fb; font-size: 18px; font-weight: 730; letter-spacing: -.025em; overflow-wrap: anywhere; }
.metric small { display: block; margin-top: 4px; color: #73849b; font-size: 9px; }
.mini-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 10px 0 13px; }
.mini-metrics .metric { padding: 10px 12px; }
.mini-metrics .metric strong { font-size: 15px; }
.module-page-head { align-items: center; }
.module-content { display: grid; gap: 15px; }
.content-panel { padding: 18px; }
.content-panel .panel-head { padding-left: 0; padding-right: 0; }
.content-panel .panel-head h2 { font-size: 15px; }
.content-panel .panel-head p { font-size: 11px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; text-align: left; }
.data-table th { padding: 10px 12px; color: #8d9eb3; background: rgba(9,15,23,.45); font-size: 9px; font-weight: 750; letter-spacing: .04em; white-space: nowrap; }
.data-table td { padding: 10px 12px; border-top: 1px solid var(--border); color: #cfdae8; vertical-align: middle; overflow-wrap: anywhere; }
.data-table tbody tr:hover { background: rgba(119,154,200,.045); }
.data-table td strong { color: #e6eef9; font-weight: 650; }
.cell-sub { display: block; color: #75869b; font-size: 9px; margin-top: 3px; }
.text-link { padding: 0; border: 0; color: #a9cdff; background: transparent; cursor: pointer; font-size: inherit; }
.text-link:hover { text-decoration: underline; }
.pill { white-space: nowrap; background: rgba(143,159,180,.12); color: #9eacc0; }
.pill-good { color: #8dd8b4; background: rgba(82,174,130,.13); }
.notice { margin-bottom: 3px; padding: 11px 14px; border: 1px solid rgba(222,183,107,.16); border-radius: 10px; color: #c9ad7a; background: rgba(153,117,48,.07); font-size: 11px; }
.updated-at { padding: 0 2px 6px; color: #708197; font-size: 10px; }
.empty { min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.5; }
.empty strong { color: #c6d3e4; font-size: 12px; font-weight: 650; }
.empty.large { min-height: 390px; }
.empty-icon { font-size: 28px; opacity: .6; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 10px; }
.store-card { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: rgba(24,34,48,.86); }
.store-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(123,157,202,.12); font-size: 17px; }
.store-card div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.store-card strong { font-size: 11px; }
.store-card small { color: var(--muted); font-size: 9px; }
.group-title { margin: 17px 0 9px; color: #aebfd4; font-size: 11px; }
.city-items { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 8px; }
.city-item { padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; background: rgba(12,19,28,.42); display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px 12px; }
.city-item-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.city-item-main strong { font-size: 11px; }
.city-item-main small { color: #8495aa; font-size: 9px; }
.city-price { color: #b5d0f4; font-size: 11px; font-weight: 700; white-space: nowrap; }
.city-item p { grid-column: 1 / -1; margin: 0; color: #8b9bb0; font-size: 10px; line-height: 1.45; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(135px,1fr)); gap: 8px; }
.item-card { padding: 10px 11px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--border); border-radius: 9px; background: rgba(12,19,28,.42); }
.item-card strong { font-size: 10px; }
.item-card span, .item-card small { color: var(--muted); font-size: 9px; }
.mine-hero { padding: 20px; overflow: hidden; background: radial-gradient(ellipse at 90% 0%,rgba(95,138,184,.14),transparent 40%),linear-gradient(145deg,#1b2938,#16202d); }
.mine-hero-title { display: flex; align-items: center; gap: 14px; }
.mine-emblem { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: rgba(135,171,215,.13); font-size: 23px; }
.mine-hero h2 { margin: 0; font-size: 20px; }
.mine-hero p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.mine-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 18px; }
.mine-metrics .metric { background: rgba(10,17,25,.36); }
.floor-details { display: flex; flex-wrap: wrap; gap: 12px; }
.floor-details span { min-width: 120px; display: flex; flex-direction: column; gap: 4px; padding: 11px 13px; border: 1px solid var(--border); border-radius: 9px; background: rgba(12,19,28,.42); }
.floor-details small { color: var(--muted); font-size: 9px; }
.floor-details b { font-size: 12px; }
.quest-card { background: radial-gradient(ellipse at 100% 0%,rgba(99,138,190,.12),transparent 40%),linear-gradient(145deg,#1b2938,#16202d); }
.quest-status { display: flex; align-items: center; gap: 13px; }
.quest-symbol { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: rgba(121,158,209,.14); font-size: 21px; }
.quest-status h2 { margin: 0; font-size: 15px; }
.quest-status p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.quest-status .pill { margin-left: auto; }
@media (max-width: 1080px) {
  .players-layout { grid-template-columns: minmax(250px,.78fr) minmax(340px,1.2fr); }
}
@media (max-width: 800px) {
  .topbar { height: auto; min-height: 64px; padding: max(8px, env(safe-area-inset-top)) 16px 8px; gap: 10px; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); padding: 11px 12px; flex-direction: row; align-items: center; gap: 6px; overflow-x: auto; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .nav-caption, .sidebar-foot { display: none; }
  .nav-item { width: auto; min-width: max-content; min-height: 44px; padding: 0 12px; margin: 0; scroll-snap-align: start; }
  .nav-count, .nav-soon { display: none; }
  .content { padding: 20px 14px max(48px, env(safe-area-inset-bottom)); }
  .players-layout { grid-template-columns: 1fr; }
  .players-list { max-height: 280px; min-height: 140px; }
  .profile-panel { min-height: 280px; }
  .button, .player-row, .profile-source-tab { min-height: 44px; }
  .search input, .auction-item-filters select { font-size: 16px; }
  .page-head { align-items: stretch; }
  .module-page-head .button { align-self: flex-start; }
  .text-link { padding: 4px 0; }
}
@media (max-width: 520px) {
  .topbar { gap: 8px; }
  .brand-copy small, #status-text { display: none; }
  .top-status { gap: 7px; font-size: 10px; }
  .top-status .button { min-height: 40px; padding: 0 10px; }
  .page-head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .metric-grid, .mini-metrics, .mine-metrics { grid-template-columns: 1fr 1fr; }
  .profile-panel { padding: 15px; }
  .content-panel { padding: 13px; }
  .profile-meta { flex-direction: column; gap: 6px; }
  .profile-head { align-items: flex-start; }
  .profile-head h2, .mine-hero h2 { overflow-wrap: anywhere; }
  .quest-status { align-items: flex-start; flex-wrap: wrap; }
  .quest-status .pill { margin-left: 0; }
  .mine-hero-title { align-items: flex-start; }
  .floor-details { display: grid; grid-template-columns: 1fr 1fr; }
  .floor-details span { min-width: 0; }
  .city-items { grid-template-columns: 1fr; }
}


.quest-history-list { display: grid; gap: 0; }
.quest-history-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 2px; border-top: 1px solid var(--border); }
.quest-history-item strong { display: block; font-size: 12px; }
.quest-history-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.quest-history-item > span { flex: 0 0 auto; color: var(--muted); font-size: 10px; }
@media (max-width: 640px) {
  .quest-history-item { align-items: flex-start; flex-direction: column; gap: 5px; }
}


.auction-item-search { margin: 0 0 12px; }
.auction-item-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin: 0 3px 12px; }
.auction-item-filters label { min-width: 0; display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 10px; }
.auction-item-filters select { width: 100%; min-height: 34px; padding: 0 9px; border: 1px solid var(--border); border-radius: 8px; background: #0f1620; color: var(--text); font: inherit; font-size: 11px; }
.auction-item-results { display: grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap: 8px; }
.auction-item-result {
  min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px;
  background: rgba(12,19,28,.48); text-align: left; cursor: pointer;
}
.auction-item-result:hover, .auction-item-card:hover { border-color: var(--border-strong); background: rgba(95,139,194,.11); }
.auction-item-result > span:first-child { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.auction-item-result strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.auction-item-result small { color: var(--muted); font-size: 9px; }
.auction-item-result-meta { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.auction-item-result-meta b { color: #c8dcf7; font-size: 12px; }
.auction-item-profile { margin-top: 16px; }
.auction-item-detail { border-top: 1px solid var(--border); padding-top: 16px; }
.auction-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.auction-item-heading h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.auction-item-heading p { margin: 6px 0 0; color: var(--muted); font-size: 10px; }
.auction-item-heading code { color: #a8c8f1; font-size: 10px; }
.auction-current-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
.auction-enhancements, .auction-charts { padding-top: 17px; margin-top: 16px; border-top: 1px solid var(--border); }
.auction-enhancement-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.auction-enhancement-chip { display: flex; flex-direction: column; gap: 5px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px; background: rgba(12,19,28,.42); }
.auction-enhancement-chip span { color: #aebed2; font-size: 10px; }
.auction-enhancement-chip b { font-size: 12px; }
.auction-charts { display: grid; gap: 8px; }
.auction-chart-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(270px,1fr)); gap: 8px; align-items: start; }
.auction-chart-card { min-width: 0; padding: 8px 9px 4px; border: 1px solid var(--border); border-radius: 9px; background: rgba(12,19,28,.36); }
.auction-chart-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.auction-chart-head h4 { margin: 0; font-size: 12px; }
.auction-chart-head span { color: var(--muted); font-size: 10px; }
.auction-line-chart { display: block; width: 100%; height: auto; margin-top: 4px; overflow: visible; color: var(--accent-strong); }
.auction-chart-gridline { stroke: var(--border); stroke-width: 1; }
.auction-chart-axis { fill: var(--muted); font-size: 11px; font-weight: 500; }
.auction-chart-line { fill: none; stroke: var(--accent-strong); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.auction-chart-dot { fill: var(--accent); stroke: #172233; stroke-width: 2; }
.auction-history-note { margin: 1px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.auction-item-card { width: 100%; text-align: left; color: inherit; cursor: pointer; }
@media (max-width: 520px) {
  .auction-current-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .auction-item-filters { grid-template-columns: 1fr 1fr; }
  .auction-chart-grid { grid-template-columns: 1fr; }
  .auction-item-heading { flex-direction: column; }
  .auction-item-heading .pill { align-self: flex-start; }
  .auction-item-results { grid-template-columns: 1fr; }
}


/* Profile source tabs */
.profile-source-tabs { display: flex; gap: 7px; overflow-x: auto; padding: 14px 0 10px; border-bottom: 1px solid var(--border); }
.profile-source-tab { flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: rgba(12,19,28,.42); color: var(--muted); cursor: pointer; font: inherit; font-size: 11px; }
.profile-source-tab:hover { color: var(--text); border-color: rgba(116,166,225,.45); }
.profile-source-tab.active { color: #dceaff; border-color: rgba(103,159,226,.55); background: rgba(70,122,185,.16); }
.profile-source-panel { min-width: 0; }
.profile-source-panel[hidden] { display: none; }
.profile-overview { padding: 5px 0 0; }
.chat-profile-section { border-top: 0; padding-top: 8px; }
.chat-profile-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 15px; }
.chat-profile-block { min-width: 0; }
.chat-profile-block h4 { margin: 0 0 9px; font-size: 12px; }
.chat-profile-list { display: grid; gap: 8px; }
.chat-profile-message { min-width: 0; padding: 9px 10px; border: 1px solid var(--border); border-radius: 9px; background: rgba(12,19,28,.32); }
.chat-profile-message-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 10px; color: var(--muted); font-size: 9px; }
.chat-profile-message p { margin: 7px 0 0; color: #d4deeb; font-size: 11px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; }
.chat-charts-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.chat-chart-panel { min-width: 0; }
.chat-chart-wrap { min-width: 0; margin: 8px 0 0; }
.chat-chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chat-chart-grid { stroke: var(--border); stroke-width: 1; }
.chat-chart-time-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; opacity: .7; }
.chat-chart-time-tick { stroke: var(--muted); stroke-width: 1; }
.chat-chart-axis { fill: var(--muted); font-size: 10px; }
.chat-chart-line { fill: none; stroke: var(--accent-strong); stroke-width: 2.7; stroke-linecap: round; stroke-linejoin: round; }
.chat-chart-dot { fill: var(--accent); stroke: #172233; stroke-width: 1.5; }
.chat-ranking-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.activity-page-content { display: grid; gap: 15px; }
.activity-period-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.activity-metrics { grid-template-columns: repeat(auto-fit,minmax(125px,1fr)); margin: 4px 0 0; }
.activity-overview-note { margin: -2px 2px 1px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.chat-message-text { display: block; max-width: min(360px, 100%); overflow-wrap: anywhere; white-space: normal; }
@media (max-width: 720px) {
  .chat-ranking-grid, .chat-profile-columns, .chat-charts-grid, .activity-period-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .profile-source-tabs { margin: 0 -2px; }
  .profile-source-tab { padding: 7px 10px; }
}


/* Player activity timeline */
.player-activity { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.player-activity-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.player-activity-head h3 { margin: 0; font-size: 15px; }
.player-activity-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.player-activity-estimate { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 3px; }
.player-activity-estimate strong { font-size: 17px; color: var(--accent); font-variant-numeric: tabular-nums; }
.player-activity-estimate small { max-width: 170px; color: var(--muted); font-size: 10px; }
.player-activity-note { margin: 12px 0 16px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.player-activity-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.player-activity-event { position: relative; display: flex; align-items: flex-start; gap: 11px; padding: 0 0 14px; }
.player-activity-event:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 10px; bottom: -1px; width: 1px; background: var(--border-strong); }
.player-activity-marker { position: relative; z-index: 1; width: 9px; height: 9px; margin-top: 3px; flex: 0 0 9px; border-radius: 50%; background: var(--accent-strong); box-shadow: 0 0 0 3px rgba(109,164,245,.12); }
.player-activity-event strong { display: block; font-size: 12px; font-weight: 650; }
.player-activity-event small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; }
@media (max-width: 520px) {
  .player-activity-head { flex-direction: column; }
  .player-activity-estimate { align-items: flex-start; text-align: left; }
}


/* Mine tables */
.mine-table-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}
.mine-table-grid > .panel,
.mine-table-block { min-width: 0; }
.mine-table-block .table-wrap { max-width: 100%; }
.mine-table-expand {
  display: block;
  width: 100%;
  margin-top: 9px;
}
.mine-table-block tr[hidden] { display: none !important; }
@media (max-width: 720px) {
  .mine-table-grid { grid-template-columns: 1fr; }
}
