/* Database-backed homepage */
.home-section { background:#fff; border:1px solid #e5dff0; border-radius:16px; padding:20px; margin-bottom:20px; box-shadow:0 2px 7px #7f589906; }
.home-section h2 { font-size:16px; margin:0; font-weight:600; color:#4c3c60; }
.home-data-preview .home-section-toolbar { margin-bottom:8px; }
.home-data-preview .home-acquisition-grid { grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));margin-top:12px; }
.home-preview-period { display:block;color:var(--admin-muted,#536175);font-size:12px;line-height:1.6; }
.home-section-toolbar { display:flex; align-items:center; flex-wrap:wrap; gap:13px; margin-bottom:20px; }
.home-range { display:inline-flex; padding:3px; border-radius:10px; background:#f5f3f9; gap:2px; }
.home-range button { color:#a294b1; font-size:11px; padding:7px 13px; border-radius:7px; background:transparent; white-space:nowrap; }
.home-range button.chosen { color:#a05bd2; background:white; box-shadow:0 1px 5px #67548216; font-weight:600; }
.home-refresh { padding:8px 12px; min-height:34px; color:#9c84b0; border:1px solid #e0d7eb; background:white; border-radius:8px; font-size:11px; white-space:nowrap; }
.home-auto { margin:0 0 0 auto; display:flex; align-items:center; gap:12px; font-size:10px; color:#a38daf; white-space:nowrap; }
.home-auto select { width:122px; min-height:32px; margin:0; padding:6px 9px; font-size:11px; border-radius:8px; color:#9f86b0; }
.home-overview-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.home-overview-card { --accent:#8c82d3; --rgb:140,130,211; border:1px solid rgba(var(--rgb),.38); border-top:3px solid rgba(var(--rgb),.7); background:radial-gradient(ellipse at 100% 0,rgba(var(--rgb),.15),transparent 70%),#fff; padding:15px 16px 10px; border-radius:12px; position:relative; overflow:hidden; }
.home-overview-card::before { content:''; position:absolute; width:170px; height:170px; border:1px solid rgba(var(--rgb),.12); border-radius:50%; right:-60px; top:-90px; pointer-events:none; }
.home-overview-card.blue,.home-acquisition-card.blue { --accent:#6b80d6; --rgb:107,128,214; }
.home-overview-card.cyan,.home-acquisition-card.cyan { --accent:#4fb0c8; --rgb:79,176,200; }
.home-overview-card.green,.home-acquisition-card.green { --accent:#52ab8c; --rgb:82,171,140; }
.home-overview-card.red,.home-acquisition-card.red { --accent:#da7b8c; --rgb:218,123,140; }
.home-acquisition-card.amber { --accent:#c39a58; --rgb:195,154,88; }
.home-acquisition-card.slate { --accent:#8e91a8; --rgb:142,145,168; }
.home-tile-top { display:flex; gap:12px; align-items:flex-start; padding-bottom:13px; position:relative; }
.home-tile-icon { flex:0 0 39px; width:39px; height:39px; border:1px solid rgba(var(--rgb),.14); background:rgba(var(--rgb),.1); color:var(--accent); border-radius:11px; display:grid; place-items:center; }
.home-tile-icon svg { width:23px; height:23px; }
.home-tile-top > div { min-width:0; }
.home-tile-top h3 { margin:0 0 8px; color:#8d7da2; font-size:11px; font-weight:500; }
.home-tile-top strong { display:block; font-size:25px; font-weight:600; color:#4d3a62; line-height:1.4; overflow-wrap:anywhere; }
.home-tag { position:absolute; right:0; top:0; color:var(--accent); background:rgba(var(--rgb),.07); border:1px solid rgba(var(--rgb),.15); padding:2px 6px; border-radius:15px; font-size:8px; }
.home-submetrics { display:grid; grid-template-columns:1fr 1fr; }
.home-submetrics > div { padding:7px 0; min-width:0; }
.home-submetrics > div:nth-child(odd) { padding-right:10px; }
.home-submetrics > div:nth-child(even) { border-left:1px solid rgba(var(--rgb),.22); padding-left:13px; }
.home-submetrics > div:nth-child(n+3) { border-top:1px solid rgba(var(--rgb),.22); }
.home-submetrics span { display:block; color:#a08eaf; font-size:10px; white-space:nowrap; }
.home-submetrics b { display:block; font-size:12px; color:#6d547f; font-weight:600; margin-top:3px; overflow-wrap:anywhere; }
.home-tile-note { font-size:9px; line-height:1.6; color:#b3a1be; border-top:1px solid rgba(var(--rgb),.12); margin-top:4px; padding-top:7px; }
.home-tile-note button { display:inline; background:transparent; padding:0 0 0 4px; color:var(--accent); font-size:9px; }
.home-footnote { font-size:9px; line-height:1.8; color:#b5a3c0; margin-top:13px; }
.home-footnote b { font-weight:500; }
.home-acquisition-header { display:flex; justify-content:space-between; gap:20px; align-items:center; margin-bottom:17px; }
.home-acquisition-header h2 { border-left:3px solid #ac76d5; padding-left:9px; }
.home-acquisition-header p { font-size:10px; margin:6px 0 0; color:#ae99bb; }
.home-filters { display:flex; gap:12px; align-items:center; }
.home-filters label { display:flex; align-items:center; gap:7px; margin:0; font-size:10px; color:#a28caf; white-space:nowrap; }
.home-filters input,.home-filters select { width:136px; min-height:33px; margin:0; padding:5px 8px; border-radius:8px; font-size:11px; color:#9a84aa; }
.home-filters select { width:176px; }
.home-acquisition-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; }
.home-acquisition-card { padding:14px; border:1px solid rgba(var(--rgb),.3); border-top:2px solid rgba(var(--rgb),.5); border-radius:11px; position:relative; overflow:hidden; background:radial-gradient(ellipse at 100% 0,rgba(var(--rgb),.12),transparent 70%),white; display:flex; justify-content:space-between; gap:7px; }
.home-acquisition-card h3 { margin:0; color:#927ca5; font-size:11px; font-weight:500; }
.home-acquisition-card strong { font-size:23px; display:block; margin:4px 0 5px; color:var(--accent); font-weight:600; }
.home-acquisition-card p { margin:0; color:#ae9abb; font-size:9px; line-height:1.6; }
.home-acquisition-card > span { flex-shrink:0; margin-top:5px; width:33px; height:33px; display:grid; place-items:center; color:var(--accent); border:1px solid rgba(var(--rgb),.2); border-radius:9px; }
.home-acquisition-card svg { width:20px; height:20px; }
.home-chart-controls { margin-left:auto; display:flex; align-items:center; gap:15px; flex-wrap:wrap; }
.home-chart-controls select { width:165px; min-height:34px; font-size:11px; padding:5px 8px; margin:0; }
.home-chart-description { font-size:10px; color:#ae9bbb; margin:5px 0 0; }
.home-chart { display:block; width:100%; height:auto; min-height:150px; }
.home-chart text { fill:#b39cbe; font-size:11px; font-family:"Microsoft YaHei",Arial,sans-serif; }
.home-chart-legend { font-size:10px; color:#a38ab3; display:flex; align-items:center; gap:6px; padding-left:10px; margin-bottom:12px; }
.home-chart-legend > span { display:inline-block; width:17px; height:3px; border-radius:2px; background:#a76ad6; }
.home-chart-empty { padding:40px 15px; text-align:center; color:#bca4ca; }
.home-chart-empty svg { display:block; width:30px; height:30px; margin:0 auto 12px; }
.home-chart-empty b { font-size:14px; font-weight:500; }
.home-chart-empty p { font-size:11px; }
.home-details { border-top:1px solid #f1ebf5; padding-top:12px; margin-top:9px; color:#aa93ba; }
.home-details summary { cursor:pointer; font-size:11px; }
.home-details table { margin-top:10px; }
.home-operational > div { display:flex; gap:25px; align-items:center; flex-wrap:wrap; margin-top:12px; }
.home-operational span { font-size:11px; color:#a08bb0; }
.home-operational b { color:#8d64a8; font-weight:500; }
.home-operational p { color:#b19abd; font-size:10px; margin:13px 0 0; }
@media(min-width:1450px){ .home-tile-top strong { font-size:29px; }.home-tile-top h3 { padding-right:43px; } }
@media(max-width:1450px){ .home-overview-grid,.home-acquisition-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.home-tag { position:static; margin-left:auto; flex-shrink:0; }.home-acquisition-header { align-items:flex-start; flex-direction:column; } }
@media(max-width:850px){ .home-section { padding:14px; }.home-section-toolbar { gap:8px; }.home-range button { padding:7px 9px; }.home-auto { margin-left:0; }.home-filters { flex-wrap:wrap; gap:8px; }.home-chart-controls { margin-left:0; gap:8px; }.home-tile-icon { width:30px; height:30px; flex-basis:30px; }.home-tile-top { gap:8px; }.home-overview-card { padding:12px; }.home-tag { display:none; }.home-tile-top strong { font-size:22px; }.home-submetrics span { white-space:normal; }.home-acquisition-card { padding:11px; }.home-acquisition-card > span { display:none; } }
@media(max-width:400px){ .home-overview-grid { grid-template-columns:1fr; }.home-acquisition-grid { gap:8px; }.home-auto select { width:115px; }.home-tile-icon { width:38px; height:38px; flex-basis:38px; }.home-tag { display:inline; } }

.home-submetrics.has-guest { grid-template-columns:repeat(3,minmax(0,1fr)); }
.home-submetrics.has-guest > div { border:0; padding:7px 7px; }
.home-submetrics.has-guest > div:not(:nth-child(3n+1)) { border-left:1px solid rgba(var(--rgb),.22); }
.home-submetrics.has-guest > div:nth-child(n+4) { border-top:1px solid rgba(var(--rgb),.22); }
.home-submetrics.has-guest span { font-size:9px; white-space:normal; }

/* Larger homepage text */
.home-section h2 { font-size:18px; }
.home-range button,.home-refresh,.home-auto,.home-auto select { font-size:13px; }
.home-tile-top h3 { font-size:14px; color:#80668e; }.home-tag { font-size:10px; }
.home-tile-top strong { font-size:29px; }
.home-submetrics span,.home-submetrics.has-guest span { font-size:12px; color:#90749f; }.home-submetrics b { font-size:15px; }
.home-tile-note,.home-footnote { font-size:11px; color:#a48bb3; }.home-tile-note button { font-size:11px; }
.home-acquisition-header p,.home-filters label { font-size:12px; color:#92779f; }
.home-filters input,.home-filters select { font-size:13px; min-height:36px; }
.home-acquisition-card h3 { font-size:14px; color:#8a6d9a; }.home-acquisition-card strong { font-size:26px; }.home-acquisition-card p { font-size:11px; color:#9f84ad; }
.home-chart-controls select,.home-chart-legend,.home-details summary { font-size:13px; }
.home-chart-description,.home-operational span,.home-operational p { font-size:12px; }
.home-chart text { font-size:13px; fill:#9e82ae; }
.home-chart-empty b { font-size:16px; }.home-chart-empty p { font-size:13px; }
@media(max-width:850px){.home-range button { font-size:12px; }.home-submetrics.has-guest { grid-template-columns:repeat(2,minmax(0,1fr)); }.home-submetrics.has-guest > div { border:0!important; }.home-submetrics.has-guest > div:nth-child(even) { border-left:1px solid rgba(var(--rgb),.22)!important; }.home-submetrics.has-guest > div:nth-child(n+3) { border-top:1px solid rgba(var(--rgb),.22)!important; }.home-tag { display:none; }}

#admin-shell .home-section:is(.home-overview-section,.home-acquisition-section,.home-trend-section,.home-game-ranking) { padding-block:12px;margin-bottom:12px; }
#admin-shell :is(.home-overview-section,.home-trend-section,.home-game-ranking) .home-section-toolbar { margin-bottom:10px; }
#admin-shell .home-overview-section .home-overview-grid { align-items:start;gap:10px; }
#admin-shell .home-overview-section .home-overview-card { padding-block:12px; }
#admin-shell #admin-content .home-overview-section .home-tile-top { padding-bottom:6px; }
#admin-shell .home-overview-section .home-submetrics>div { padding-block:5px; }
#admin-shell .home-overview-section .home-submetrics b { margin-top:1px; }
#admin-shell .home-acquisition-section .home-acquisition-header { gap:8px;margin-bottom:10px; }
#admin-shell .home-acquisition-section .home-acquisition-grid { gap:8px; }
#admin-shell .home-acquisition-section .home-acquisition-card { padding-block:8px; }
#admin-shell .home-acquisition-section .home-acquisition-card strong { margin:2px 0 0;line-height:1.2; }
#admin-shell .home-acquisition-section .home-acquisition-card>span { margin-top:0;align-self:center; }
#admin-shell .home-trend-section .home-chart { min-height:0;min-width:640px; }
#admin-shell .home-trend-section .home-chart-legend { margin-bottom:3px; }
#admin-shell .home-trend-section .home-details { margin-top:4px; }
.home-kline-readout { display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:8px 20px;padding:9px 12px;background:var(--admin-surface-soft,#f7f9fc);border:1px solid var(--admin-rule,#e8edf3);border-radius:7px; }
.home-kline-period-label { display:grid;gap:1px; }
.home-kline-period-label strong,.home-kline-readout dd { color:var(--admin-ink,#1c293a);font-size:13px;font-variant-numeric:tabular-nums; }
.home-kline-period-label span,.home-kline-readout dt { color:var(--admin-muted,#52637a);font-size:13px; }
.home-kline-readout dl { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px 10px;margin:0; }
.home-kline-readout dd { margin:1px 0 0;font-weight:600;overflow-wrap:anywhere; }
.home-kline-readout [data-kline-value="total"] { color:var(--admin-accent,#2f67b1); }
.home-kline-frame { --kline-price-height:clamp(106px,14vw,142px);--kline-volume-height:31px;display:grid;grid-template-columns:minmax(44px,max-content) minmax(0,1fr);gap:6px;margin-top:12px; }
.home-kline-axis { color:var(--admin-muted,#52637a);font-size:13px;text-align:right;font-variant-numeric:tabular-nums; }
.home-kline-price-axis { height:var(--kline-price-height);display:flex;flex-direction:column;justify-content:space-between;line-height:1; }
.home-kline-total-axis { height:var(--kline-volume-height);display:grid;align-items:center; }
.home-kline-scroller { min-width:0;overflow-x:auto;scrollbar-color:#b3c0d1 #f3f5f8; }
.home-kline-plot { --kline-track-width:28px;position:relative;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(var(--kline-track-width),1fr);min-width:calc(var(--kline-track-count)*var(--kline-track-width)); }
.home-kline-grid { position:absolute;inset:0 0 auto;height:var(--kline-price-height);border-bottom:1px solid var(--admin-rule,#e8edf3);background:repeating-linear-gradient(to bottom,var(--admin-rule,#e8edf3) 0 1px,transparent 1px calc(100% / 3));pointer-events:none; }
.home-kline-empty { position:absolute;inset:0 0 auto;height:var(--kline-price-height);display:grid;place-items:center;color:var(--admin-muted,#52637a);font-size:12px;pointer-events:none; }
.home-kline-period { --kline-color:#62728a;position:relative;display:grid;grid-template-rows:var(--kline-price-height) var(--kline-volume-height) 21px;min-width:0;min-height:0;padding:0;border:0;background:transparent;color:var(--admin-muted,#52637a);-webkit-tap-highlight-color:transparent; }
.home-kline-period[data-kline-direction="up"] { --kline-color:#138065; }
.home-kline-period[data-kline-direction="down"] { --kline-color:#bb3c51; }
.home-kline-period[aria-pressed="true"] { background:#2f67b112; }
#admin-shell .home-kline-period:focus-visible { outline-offset:-2px; }
.home-kline-candle,.home-kline-volume { position:relative; }
.home-kline-wick,.home-kline-body,.home-kline-volume::after { position:absolute;left:50%;transform:translateX(-50%);background:var(--kline-color); }
.home-kline-wick { top:var(--wick-start);height:var(--wick-size);width:1px; }
.home-kline-body { top:var(--body-start);height:max(2px,var(--body-size));width:min(12px,62%);border-radius:1px; }
.home-kline-volume::after { content:'';bottom:0;width:min(12px,62%);height:var(--total-size,0);opacity:.45; }
.home-kline-volume { border-bottom:1px solid var(--admin-rule,#e8edf3); }
.home-kline-tick { align-self:center;justify-self:center;min-width:max-content;font-size:12px;line-height:14px;white-space:nowrap;pointer-events:none; }
.home-kline-period:first-of-type .home-kline-tick { justify-self:start; }
.home-kline-period:last-of-type .home-kline-tick { justify-self:end; }
.home-kline-note { margin:5px 0;color:var(--admin-muted,#52637a);font-size:13px;line-height:20px; }
#home-trend-details th { white-space:nowrap; }
#home-trend-details th[scope="row"] { background:transparent; }
@media(max-width:850px) {
 .home-kline-readout { grid-template-columns:minmax(0,1fr);gap:6px;padding:7px 9px; }
 .home-kline-period-label { display:flex;align-items:baseline;gap:9px; }
 .home-kline-plot { --kline-track-width:28px; }
}
@media(max-width:520px) {
 .home-kline-readout dl { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
.home-game-ranking-scope,.home-trend-empty,.home-game-ranking-empty,.home-game-ranking-status { color:var(--admin-muted,#52637a);font-size:13px; }
.home-game-ranking-range { flex-wrap:wrap;max-width:100%; }
.home-game-ranking-scope { margin-inline-start:auto;overflow-wrap:anywhere; }
.home-trend-empty,.home-game-ranking-empty,.home-game-ranking-status { margin:0; }
.home-trend-empty,.home-game-ranking-empty,.home-game-ranking-status:not(:empty) { padding:8px 0; }
#admin-shell .home-game-ranking-range button:focus-visible { outline:2px solid var(--admin-accent,#2f67b1);outline-offset:2px; }
#admin-shell .home-game-ranking table { width:100%;min-width:0; }
#admin-shell .home-game-ranking :is(th,td) { padding:6px 9px; }
#admin-shell .home-game-ranking :is(th,td):is(:first-child,:nth-child(n+3)) { width:1%;text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums; }
#admin-shell .home-game-ranking tbody th { background:transparent;text-align:left;font-weight:600; }
.home-game-ranking-entry { display:flex;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere; }
.home-game-ranking-entry small { display:block;color:var(--admin-muted,#52637a);font-size:11px; }
.home-game-ranking-cover { flex:0 0 36px;display:grid;place-items:center;width:36px;height:36px;overflow:hidden;border-radius:6px;background:#edf3fb;color:#526e90; }
.home-game-ranking-cover img { width:100%;height:100%;object-fit:cover; }
.home-game-ranking-cover svg { width:18px;height:18px; }
@media(max-width:480px) {
 .home-game-ranking-scope { flex-basis:100%;margin-inline-start:0; }
 #admin-shell .home-game-ranking table { table-layout:fixed; }
 #admin-shell .home-game-ranking :is(th,td) { padding-inline:4px; }
 #admin-shell .home-game-ranking :is(th,td):first-child { width:2.5em; }
 #admin-shell .home-game-ranking :is(th,td):nth-child(3) { width:4.5em; }
 #admin-shell .home-game-ranking :is(th,td):nth-child(4) { width:3.5em; }
 #admin-shell .home-game-ranking :is(th,td):nth-child(n+3) { white-space:normal;overflow-wrap:anywhere; }
 .home-game-ranking-entry { gap:5px; }
 .home-game-ranking-entry > span:last-child { min-width:0; }
 .home-game-ranking-cover { flex-basis:27px;width:27px;height:27px; }
}
