:root {
  color-scheme: dark;
  --bg: #050914;
  --panel: #0c1424;
  --panel-2: #101b30;
  --line: rgba(148, 163, 184, .17);
  --text: #eff6ff;
  --muted: #8fa2bd;
  --blue: #60a5fa;
  --green: #72e6a1;
  --orange: #f7c66c;
  --red: #f39aa5;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% -12%, rgba(37, 99, 235, .19), transparent 34rem),
    radial-gradient(circle at 90% 4%, rgba(124, 58, 237, .12), transparent 28rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, a { font: inherit; }
button { color: inherit; }
.shell { width: min(1280px, calc(100% - 32px)); margin: 0 auto; padding: 34px 0 64px; }

.profile-header { display: flex; align-items: center; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.identity { display: flex; align-items: center; gap: 16px; }
.avatar { border: 1px solid rgba(255,255,255,.2); border-radius: 50%; object-fit: cover; background: var(--panel); box-shadow: 0 10px 28px rgba(0,0,0,.34); }
.kicker { margin: 0 0 6px; color: var(--blue); font-size: 11px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(29px, 4vw, 46px); letter-spacing: -.035em; }
.timezone-label { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.kick-link, .toolbar button, .session-actions a, .copy-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  background: rgba(15, 25, 44, .9);
  padding: 9px 13px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}
.kick-link:hover, .toolbar button:hover, .session-actions a:hover, .copy-button:hover { border-color: rgba(96,165,250,.55); background: #15233b; }

.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.toolbar h2 { min-width: 210px; margin: 0; text-align: center; font-size: 20px; }
.toolbar button { width: 42px; padding: 7px; }
.toolbar .today-button { width: auto; margin-left: 4px; padding-inline: 14px; color: #cfe3ff; }

.summary-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.summary-grid article, .modal-summary > div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(12, 20, 36, .84);
}
.summary-grid span { display: block; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.summary-grid strong { display: block; margin-top: 6px; font-size: 18px; }
.summary-grid article:first-child strong { color: var(--green); }

.calendar-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: rgba(8, 14, 27, .91); box-shadow: 0 24px 65px rgba(0,0,0,.27); }
.calendar-heading-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.calendar-heading-row h2 { margin: 0; font-size: 20px; }
.calendar-heading-row p { margin: 0; color: var(--muted); font-size: 12px; }
.weekday-row, .calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(112px, .82fr); }
.weekday-row { border-bottom: 1px solid var(--line); background: #0d1729; }
.weekday-row span { padding: 10px 5px; color: #a9bbd2; font-size: 10px; font-weight: 850; letter-spacing: .08em; text-align: center; text-transform: uppercase; }

.day, .week-total {
  min-height: 132px;
  border: 0;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(7, 13, 25, .68);
  padding: 10px;
  text-align: left;
}
.day { cursor: default; }
.day.has-data { background: rgba(15, 28, 49, .88); cursor: pointer; }
.day.has-data:hover { background: #152846; box-shadow: inset 0 0 0 1px rgba(96,165,250,.55); }
.day.outside { opacity: .23; }
.day-number { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 850; }
.metric { display: flex; justify-content: space-between; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 10px; font-weight: 750; }
.metric.stake { color: var(--green); }
.session-count { display: inline-flex; margin-top: 8px; border-radius: 999px; background: rgba(96,165,250,.14); padding: 3px 7px; color: #c9e0ff; font-size: 9px; font-weight: 850; }
.week-total { background: rgba(15, 22, 40, .96); }
.week-total .day-number { color: #c4b5fd; letter-spacing: .06em; text-transform: uppercase; }
.load-error { margin: 0; padding: 18px; color: var(--red); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.73); backdrop-filter: blur(8px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(980px, 100%); max-height: 92vh; overflow: auto; border: 1px solid rgba(148,163,184,.25); border-radius: 20px; background: #09111f; padding: 18px; box-shadow: 0 35px 100px rgba(0,0,0,.58); }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.modal-header h2 { margin: 0; font-size: 24px; }
.close-button { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: white; background: var(--panel-2); font-size: 24px; cursor: pointer; }
.modal-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.session-list { display: grid; gap: 12px; }
.session-card { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); padding: 15px; }
.session-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.session-title { margin: 0; font-size: 17px; }
.session-time { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.review-badge { flex: 0 0 auto; border-radius: 999px; background: rgba(114,230,161,.11); padding: 5px 8px; color: var(--green); font-size: 9px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.session-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; margin-top: 13px; }
.session-metrics div { border-radius: 10px; background: rgba(2,7,15,.55); padding: 9px; }
.session-metrics span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.session-metrics strong { display: block; margin-top: 4px; font-size: 13px; }
.session-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.session-actions a, .copy-button { min-height: 34px; padding: 6px 10px; font-size: 11px; }

@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .weekday-row, .calendar-grid { grid-template-columns: repeat(7, minmax(92px, 1fr)) 112px; }
  .calendar-panel { overflow-x: auto; }
  .weekday-row, .calendar-grid { min-width: 790px; }
}
@media (max-width: 620px) {
  .shell { width: min(100% - 20px, 520px); padding-top: 20px; }
  .profile-header { align-items: flex-start; flex-direction: column; }
  .kick-link { width: 100%; }
  .toolbar { flex-wrap: wrap; }
  .toolbar h2 { flex: 1; min-width: 150px; }
  .toolbar .today-button { width: 100%; margin-left: 0; }
  .summary-grid, .modal-summary, .session-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .calendar-heading-row { align-items: flex-start; flex-direction: column; }
}
