@import url("https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap");

:root {
  --ink: #17213d;
  --muted: #72809b;
  --line: rgba(69, 93, 133, .13);
  --paper: rgba(255, 255, 255, .82);
  --blue: #58a9eb;
  --blue-deep: #2678bc;
  --pink: #f398af;
  --coral: #ef7582;
  --violet: #897bd6;
  --gold: #dda947;
  --shadow: 0 18px 55px rgba(48, 79, 125, .12);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  background: #f4f8fc;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--blue-deep);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
}
.eyebrow.light { color: #bcecff; }
.muted { color: var(--muted); }

/* Login */
.login-page {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 16%, rgba(126, 208, 235, .35), transparent 32%),
    radial-gradient(circle at 84% 85%, rgba(245, 172, 190, .34), transparent 30%),
    #eaf2f9;
}
.login-shell {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 34px;
  background: rgba(255,255,255,.66);
  box-shadow: 0 40px 100px rgba(33, 71, 112, .2);
}
.login-art {
  position: relative;
  min-height: 640px;
  background-image:
    linear-gradient(180deg, rgba(12,26,55,.03) 25%, rgba(14,27,56,.83) 100%),
    url("/static/images/travel.webp");
  background-position: center;
  background-size: cover;
}
.login-art::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 33px 0 0 33px;
  pointer-events: none;
}
.login-art-copy { position: absolute; left: 54px; right: 48px; bottom: 50px; color: white; }
.login-art-copy h1 { margin: 0 0 18px; font-size: clamp(38px, 4.3vw, 64px); line-height: 1.14; letter-spacing: -.04em; }
.login-art-copy p { margin: 0; color: rgba(255,255,255,.78); font-size: 16px; }
.login-panel { display: grid; place-items: center; padding: 48px; position: relative; }
.login-panel::before {
  content: "♪";
  position: absolute;
  top: 38px;
  right: 44px;
  color: rgba(74, 163, 218, .16);
  font-size: 70px;
  transform: rotate(12deg);
}
.login-card { width: min(360px, 100%); text-align: center; }
.login-avatar { width: 92px; height: 92px; margin-bottom: 24px; object-fit: cover; border: 5px solid white; border-radius: 50%; box-shadow: 0 12px 36px rgba(67, 126, 180, .25); }
.login-card h2 { margin: 2px 0 8px; font-size: 32px; letter-spacing: -.03em; }
.login-card > p { margin: 0; line-height: 1.7; }
.login-form { margin-top: 32px; text-align: left; }
.login-form label { display: block; margin: 0 0 9px 3px; font-size: 13px; font-weight: 700; }
.password-wrap { position: relative; }
.password-wrap input {
  width: 100%; height: 54px; padding: 0 70px 0 17px;
  border: 1px solid #dce6ef; border-radius: 14px; outline: none;
  color: var(--ink); background: rgba(255,255,255,.9); transition: .2s;
}
.password-wrap input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(88,169,235,.13); }
.reveal-button { position: absolute; top: 0; right: 0; height: 54px; padding: 0 16px; border: 0; background: transparent; color: var(--blue-deep); cursor: pointer; font-size: 12px; font-weight: 700; }
.form-error { min-height: 24px; margin: 7px 4px 4px !important; color: #d84e62; font-size: 12px; }
.primary-button, .glass-button, .quiet-button, .filter-chip {
  border: 0; border-radius: 13px; cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s;
}
.primary-button {
  display: inline-flex; min-height: 46px; padding: 0 20px; align-items: center; justify-content: center; gap: 18px;
  color: white; background: linear-gradient(135deg, #368fcf, #66b7e7); box-shadow: 0 12px 25px rgba(47, 137, 200, .25); font-weight: 700;
}
.primary-button:hover, .glass-button:hover { transform: translateY(-2px); }
.primary-button.full { width: 100%; min-height: 52px; }
.login-footnote { margin-top: 22px !important; font-size: 11px; color: #9aa7ba; }

/* Dashboard shell */
.dashboard-page { min-height: 100vh; background: linear-gradient(180deg, #edf6fc 0, #f8fafc 460px, #f2f6fa 100%); }
.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(10px); pointer-events: none; }
.ambient-one { width: 420px; height: 420px; top: 310px; left: -180px; background: rgba(133, 212, 236, .18); }
.ambient-two { width: 500px; height: 500px; right: -250px; top: 780px; background: rgba(245, 165, 191, .14); }
.topbar {
  position: sticky; z-index: 30; top: 0; height: 72px; padding: 0 max(24px, calc((100vw - 1320px)/2));
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  border-bottom: 1px solid rgba(91,117,153,.1); backdrop-filter: blur(20px); background: rgba(246,250,253,.82);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 230px; }
.brand img { width: 40px; height: 40px; object-fit: cover; border: 3px solid white; border-radius: 50%; box-shadow: 0 5px 15px rgba(40,98,145,.16); }
.brand span { display: grid; }
.brand b { font-size: 15px; letter-spacing: .04em; }
.brand small { margin-top: 1px; color: #91a0b2; font-size: 8px; font-weight: 700; letter-spacing: .13em; }
.topnav { height: 100%; display: flex; gap: 26px; }
.nav-link { position: relative; padding: 0 3px; border: 0; background: transparent; color: #748198; cursor: pointer; font-size: 13px; font-weight: 600; }
.nav-link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--blue); transform: scaleX(0); transition: transform .2s; }
.nav-link.active, .nav-link:hover { color: var(--ink); }
.nav-link.active::after { transform: scaleX(1); }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 230px; }
.socket-state { display: flex; align-items: center; gap: 7px; color: #7c8a9e; font-size: 11px; font-weight: 600; }
.socket-state i { width: 7px; height: 7px; border-radius: 50%; background: #e8ad55; box-shadow: 0 0 0 4px rgba(232,173,85,.12); }
.socket-state.online i { background: #53b99a; box-shadow: 0 0 0 4px rgba(83,185,154,.12); }
.icon-button { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.72); cursor: pointer; }

/* Admin */
.admin-page { min-height: 100vh; padding: 34px 20px; background: radial-gradient(circle at 12% 12%, rgba(88,169,235,.18), transparent 35%), #f4f8fc; }
.admin-shell { width: min(760px, 100%); margin: 0 auto; }
.admin-head { margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.admin-head h1 { margin: 5px 0 0; font-size: 27px; }
.admin-card { padding: 28px; }
.admin-lock { width: min(390px, 100%); margin: 50px auto; text-align: center; }
.admin-lock form { margin-top: 22px; display: grid; gap: 12px; }
.admin-input { width: 100%; height: 50px; padding: 0 15px; border: 1px solid #dce6ef; border-radius: 13px; outline: none; }
.admin-input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(88,169,235,.13); }
.admin-status { padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 16px; background: #f4f8fb; }
.account-profile { display: flex; align-items: center; gap: 13px; }
.account-profile img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: white; }
.account-profile span { display: grid; gap: 3px; }.account-profile small { color: var(--muted); }
.admin-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 9px; }
.qr-area { min-height: 330px; margin-top: 22px; display: grid; place-items: center; border: 1px dashed #d7e3ec; border-radius: 18px; text-align: center; }
.qr-area img { width: 245px; height: 245px; padding: 8px; border-radius: 14px; background: white; }
.qr-area p { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
.admin-note { margin-top: 18px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.dashboard-shell { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 28px 0 80px; }

/* Hero */
.hero { position: relative; min-height: 390px; overflow: hidden; border-radius: 28px; background: #162039; box-shadow: var(--shadow); }
.hero-bg { position: absolute; inset: 0; background: url("/static/images/concert.webp") center 42% / cover no-repeat; transform: scale(1.005); }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8,17,40,.93) 0%, rgba(10,20,45,.65) 42%, rgba(9,19,41,.08) 75%), linear-gradient(0deg, rgba(5,10,27,.4), transparent 50%); }
.hero-copy { position: relative; z-index: 2; width: min(610px, 62%); padding: 70px 64px; color: white; }
.hero-kicker { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 18px; color: #dceaf7; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #9aa9bd; box-shadow: 0 0 0 5px rgba(154,169,189,.15); }
.hero.live .pulse-dot { background: #ff667b; box-shadow: 0 0 0 5px rgba(255,102,123,.18); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(255,102,123,0); } }
.hero h1 { margin: 0 0 13px; font-size: clamp(31px, 4vw, 54px); letter-spacing: -.045em; line-height: 1.15; text-shadow: 0 4px 30px rgba(0,0,0,.32); }
.hero-copy > p { margin: 0; color: rgba(232,240,249,.78); font-size: 14px; line-height: 1.8; }
.separator { padding: 0 12px; opacity: .45; }
.hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.glass-button { min-height: 46px; padding: 0 19px; border: 1px solid rgba(255,255,255,.22); color: white; background: rgba(255,255,255,.1); backdrop-filter: blur(10px); font-weight: 600; }
.hero-meta { position: absolute; z-index: 2; right: 28px; bottom: 24px; display: grid; justify-items: end; color: white; }
.hero-meta span { color: rgba(255,255,255,.55); font-size: 9px; letter-spacing: .12em; }
.hero-meta b { margin-top: 3px; font-size: 11px; }

/* Cards */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }
.stat-card { position: relative; min-height: 138px; padding: 23px 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.8); border-radius: 20px; background: var(--paper); box-shadow: 0 10px 30px rgba(56,87,125,.07); }
.stat-card::after { content: ""; position: absolute; width: 100px; height: 100px; right: -35px; top: -40px; border-radius: 50%; background: currentColor; opacity: .075; }
.stat-card.coral { color: var(--coral); }.stat-card.blue { color: var(--blue-deep); }.stat-card.violet { color: var(--violet); }.stat-card.gold { color: var(--gold); }
.stat-card > div { color: var(--ink); }
.stat-card small { display: block; margin-bottom: 6px; color: #7c899e; font-size: 11px; font-weight: 600; }
.stat-card strong { font-size: 29px; letter-spacing: -.04em; }
.stat-card em { margin-left: 5px; color: #a0aabc; font-size: 10px; font-style: normal; }
.stat-card p { margin: 7px 0 0; color: #a0aabc; font-size: 10px; }
.stat-icon { position: absolute; right: 19px; top: 20px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; background: currentColor; color: white; font-size: 9px; }
.panel { border: 1px solid rgba(255,255,255,.85); border-radius: var(--radius); background: var(--paper); box-shadow: 0 12px 36px rgba(56,87,125,.075); backdrop-filter: blur(16px); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .75fr); gap: 18px; }
.panel-header { min-height: 78px; padding: 21px 24px 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.panel-header h2, .section-header h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.legend { display: flex; gap: 14px; color: #8995a6; font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 7px; height: 7px; border-radius: 50%; }.blue-dot { background: var(--blue); }.pink-dot { background: var(--pink); }
.chart-wrap { position: relative; height: 294px; padding: 0 18px 18px; }
.chart-wrap canvas { width: 100%; height: 100%; cursor: crosshair; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: #a1adbc; font-size: 12px; }
.chart-tooltip {
  position: absolute; z-index: 4; min-width: 142px; padding: 10px 12px; pointer-events: none;
  border: 1px solid rgba(255,255,255,.9); border-radius: 12px; color: #66748a;
  background: rgba(255,255,255,.94); box-shadow: 0 10px 30px rgba(43,72,108,.16);
  backdrop-filter: blur(12px); transform: translate(-50%, calc(-100% - 10px)); font-size: 10px;
}
.chart-tooltip[hidden] { display: none; }
.chart-tooltip time { display: block; margin-bottom: 6px; color: #8d99aa; }
.chart-tooltip > span { display: flex; align-items: center; justify-content: space-between; gap: 16px; line-height: 1.8; }
.chart-tooltip i { width: 7px; height: 7px; margin-right: 6px; display: inline-block; border-radius: 50%; }
.chart-tooltip b { color: var(--ink); font-size: 11px; }
.tiny-badge { padding: 5px 8px; border-radius: 7px; background: #eef5fb; color: var(--blue-deep); font-size: 9px; font-weight: 800; }
.rank-list { height: 294px; padding: 0 15px 15px; overflow: auto; }
.rank-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 10px 9px; border-bottom: 1px solid #edf1f5; }
.rank-row:last-child { border: 0; }
.rank-no { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: #f0f4f8; color: #8190a4; font-size: 10px; font-weight: 800; }
.rank-row:nth-child(1) .rank-no { background: #fff1d3; color: #c78e24; }.rank-row:nth-child(2) .rank-no { background: #e8f1f8; color: #5d809d; }.rank-row:nth-child(3) .rank-no { background: #f8e9df; color: #b67955; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.rank-value { color: var(--coral); font-size: 11px; font-weight: 700; }

/* Feed */
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; margin-top: 18px; }
.feed-panel { min-width: 0; }
.feed-tools { display: flex; align-items: center; gap: 7px; }
.filter-chip, .quiet-button { min-height: 31px; padding: 0 12px; color: #7b899d; background: #f0f4f7; font-size: 10px; font-weight: 700; }
.filter-chip.active { color: white; background: var(--blue); }
.quiet-button { border: 1px solid var(--line); background: white; }
.feed-list { height: 430px; padding: 0 17px 18px; overflow: auto; scroll-behavior: smooth; }
.feed-item { display: grid; grid-template-columns: 35px minmax(0, 1fr) auto; gap: 11px; padding: 13px 7px; border-bottom: 1px solid #edf1f5; animation: rise .28s ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
.feed-avatar { width: 35px; height: 35px; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(135deg, #bee7f5, #f3c5d3); color: white; font-size: 12px; font-weight: 700; }
.feed-avatar img { width: 100%; height: 100%; object-fit: cover; }
.feed-main { min-width: 0; }
.feed-user { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; font-size: 11px; font-weight: 700; }
.medal { padding: 2px 5px; border-radius: 5px; color: #438ab7; background: #e5f5fb; font-size: 8px; }
.feed-content { overflow-wrap: anywhere; color: #5d697d; font-size: 12px; line-height: 1.55; }
.gift-event .feed-content { color: #cc6374; font-weight: 600; }
.feed-time { padding-top: 2px; color: #a8b0bd; font-size: 9px; }
.portrait-card { position: relative; min-height: 508px; overflow: hidden; border-radius: var(--radius); background: linear-gradient(160deg, #bce6f4 0%, #e7f5fb 47%, #f7dbe4 100%); box-shadow: var(--shadow); }
.portrait-card::before { content: ""; position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,.72); border-radius: 17px; }
.portrait-card img { position: absolute; z-index: 2; width: 104%; max-width: none; left: -7%; bottom: -6%; filter: drop-shadow(0 20px 24px rgba(52,83,122,.18)); }
.portrait-copy { position: absolute; z-index: 3; top: 32px; left: 31px; display: grid; color: #3b759b; }
.portrait-copy span { font-size: 11px; letter-spacing: .3em; }.portrait-copy b { font-size: 25px; letter-spacing: .12em; }.portrait-copy small { margin-top: 3px; color: #7295aa; font-size: 8px; }

.empty-state { height: 100%; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #a1adbc; text-align: center; }
.empty-state span { margin-bottom: 8px; color: #a9d4e9; font-size: 30px; }.empty-state h3 { margin: 0 0 6px; color: #738096; font-size: 14px; }.empty-state p { margin: 0; font-size: 10px; }
.empty-state.compact { min-height: 100px; }.empty-state.compact span { font-size: 20px; }

/* History */
.history-section { padding-top: 52px; scroll-margin-top: 80px; }
.section-header { margin-bottom: 17px; display: flex; align-items: end; justify-content: space-between; }
.section-header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.section-actions { display: flex; align-items: center; gap: 8px; }
.section-actions .quiet-button { display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; }
.history-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 18px; }
.history-calendar, .history-detail { min-height: 540px; }
.history-list { height: 540px; padding: 14px; overflow: auto; }
.history-day { width: 100%; margin-bottom: 8px; padding: 13px 14px; display: grid; grid-template-columns: 43px 1fr auto; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 14px; background: transparent; cursor: pointer; text-align: left; transition: .18s; }
.history-day:hover { background: #f4f8fb; }.history-day.active { border-color: rgba(88,169,235,.25); background: #eef8fd; }
.day-number { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: white; color: var(--blue-deep); box-shadow: 0 5px 15px rgba(50,91,128,.08); font-size: 16px; font-weight: 800; }
.day-meta { display: grid; gap: 3px; }.day-meta b { font-size: 11px; }.day-meta small { color: #9aa5b4; font-size: 9px; }.day-size { color: #96a3b5; font-size: 9px; }
.history-detail { display: flex; flex-direction: column; min-width: 0; }
.history-detail-head { min-height: 84px; padding: 20px 23px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1f5; }
.history-detail h3 { margin: 0; font-size: 18px; }
.history-detail-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.history-detail-tools .quiet-button { min-height: 38px; display: inline-flex; align-items: center; white-space: nowrap; }
.search-box { width: min(260px, 42%); height: 38px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid #e4eaf0; border-radius: 11px; background: #fafcfd; }
.history-detail-tools .search-box { width: 260px; }
.search-box span { color: #90a0b2; }.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 10px; }
.history-summary { display: flex; gap: 12px; padding: 0 23px; overflow: hidden; }
.history-summary:not(:empty) { padding-top: 13px; }
.summary-pill { padding: 6px 10px; border-radius: 8px; color: #6f7d90; background: #f1f5f8; font-size: 9px; }
.history-audience { margin: 15px 23px 0; padding: 13px; border: 1px solid #edf1f5; border-radius: 12px; background: #fbfdff; }
.history-audience-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 9px; }
.history-audience-head h4 { margin: 0; color: #4c6171; font-size: 13px; }
.history-audience a { display: block; cursor: zoom-in; }
.history-audience img { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 8px; background: #f3f7fa; }
.history-content { display: flex; flex: 1; min-height: 0; }
.history-ranking { width: 270px; flex: 0 0 270px; margin-top: 12px; border-right: 1px solid #edf1f5; overflow: hidden; }
.history-ranking-head { padding: 3px 18px 10px 23px; }
.history-ranking-head h4 { margin: 3px 0 0; color: #4c6171; font-size: 14px; }
.history-rank-list { height: 374px; padding: 0 15px 18px 20px; overflow: auto; }
.history-rank-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 34px; border-bottom: 1px solid #f0f3f6; font-size: 10px; }
.history-rank-row .rank-name { overflow: hidden; color: #526a7b; text-overflow: ellipsis; white-space: nowrap; }
.history-rank-row .rank-value { color: #d8849c; font-weight: 700; }
.history-messages { height: 430px; flex: 1; min-width: 0; padding: 8px 23px 20px; overflow: auto; }
.history-message { display: grid; grid-template-columns: 58px 130px minmax(0,1fr); gap: 10px; padding: 9px 2px; border-bottom: 1px solid #f0f3f6; font-size: 10px; }
.history-message time { color: #a1abba; }.history-message b { overflow: hidden; color: #4a7897; text-overflow: ellipsis; white-space: nowrap; }.history-message span { color: #5e6b7e; overflow-wrap: anywhere; }
.site-footer { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 25px 0 36px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #96a3b4; font-size: 9px; letter-spacing: .1em; }
.site-footer p { margin: 0; letter-spacing: 0; }
.toast { position: fixed; z-index: 100; right: 25px; bottom: 25px; padding: 12px 17px; border-radius: 12px; color: white; background: rgba(23,33,61,.92); box-shadow: 0 12px 30px rgba(10,20,40,.2); font-size: 11px; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .25s; }
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 980px) {
  .topnav { display: none; }.brand, .top-actions { min-width: auto; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }.rank-list { height: 260px; }
  .feed-layout { grid-template-columns: 1fr; }.portrait-card { display: none; }
  .history-layout { grid-template-columns: 1fr; }.history-calendar { min-height: auto; }.history-list { height: auto; max-height: 280px; }
  .history-content { display: block; }.history-ranking { width: auto; margin: 12px 23px 0; border: 1px solid #edf1f5; border-radius: 14px; }.history-rank-list { height: auto; max-height: 245px; }.history-messages { height: 430px; }
}
@media (max-width: 700px) {
  .login-page { padding: 0; }.login-shell { min-height: 100vh; grid-template-columns: 1fr; border-radius: 0; }.login-art { min-height: 35vh; }.login-art::after { border-radius: 0; }.login-art-copy { left: 28px; bottom: 28px; }.login-art-copy h1 { font-size: 34px; }.login-panel { padding: 38px 25px; }
  .topbar { height: 64px; padding: 0 16px; }.brand small, .socket-state { display: none; }
  .dashboard-shell { width: calc(100% - 24px); padding-top: 12px; }
  .hero { min-height: 430px; }.hero-bg { background-position: 62% center; }.hero-shade { background: linear-gradient(0deg, rgba(8,17,40,.95), rgba(8,17,40,.15) 85%); }.hero-copy { width: 100%; padding: 190px 24px 70px; }.hero-copy h1 { font-size: 32px; }.hero-actions { flex-wrap: wrap; }.hero-meta { left: 24px; right: auto; justify-items: start; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.stat-card { min-height: 125px; padding: 19px 16px; }.stat-card strong { font-size: 24px; }
  .panel-header, .feed-header { align-items: flex-start; flex-direction: column; }.legend { align-self: flex-start; }
  .chart-wrap { height: 260px; }.feed-tools { width: 100%; overflow-x: auto; }.feed-list { height: 500px; }
  .section-header { align-items: flex-start; gap: 15px; }.section-actions { flex-wrap: wrap; }.history-detail-head { align-items: flex-start; flex-direction: column; gap: 12px; }.history-detail-tools { width: 100%; flex-wrap: wrap; justify-content: flex-start; }.history-detail-tools .search-box, .search-box { width: 100%; }.history-message { grid-template-columns: 50px 95px minmax(0,1fr); }
  .site-footer { width: calc(100% - 24px); flex-direction: column; gap: 8px; }
}
