/* Full-width layout (no sidebar), legend chips, event shading by calendar */
:root{--bg:#0f1115;--panel:#151922;--text:#e9eef6;--muted:#a9b0bf;--accent:#6ca0ff;--card:#1a2030;--shadow:rgba(0,0,0,.35)}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Inter,Helvetica,Arial;background:linear-gradient(180deg,#0d1016,#0f1115 40%);color:var(--text);overflow:hidden}
.app{display:grid;grid-template-rows:64px 1fr;grid-template-columns:1fr;grid-template-areas:"topbar" "main";height:100vh}
.topbar{grid-area:topbar;display:flex;align-items:center;justify-content:space-between;padding:12px 16px;background:var(--panel);box-shadow:0 6px 20px var(--shadow)}
.brand{display:flex;gap:12px;align-items:center}
.brand .dot{width:12px;height:12px;border-radius:999px;background:var(--accent);box-shadow:0 0 16px var(--accent)}
.brand h1{font-size:18px;margin:0}
.controls{display:flex;gap:12px;align-items:center;flex-wrap:wrap;max-width:70vw}
.spacer{flex:1}
.legend{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.chip{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:999px;background:#1a2030;border:1px solid #2a3144}
.chip .chip-swatch{width:14px;height:14px;border-radius:50%}
.chip .chip-code{font-weight:800;letter-spacing:.3px}
.chip .chip-name{color:var(--muted);font-size:12px}
.btn{background:#22283a;color:var(--text);padding:8px 12px;border-radius:10px;border:1px solid #2d354a;cursor:pointer;font-weight:600;letter-spacing:.2px}
.btn.primary{background:var(--accent);color:#05142e;border-color:transparent}
.btn.ghost{background:transparent;border-color:#2b3246;color:var(--muted)}
.main{grid-area:main;padding:16px;overflow:auto}
.viewbar{display:flex;gap:8px;align-items:center;margin-bottom:12px}
.date-range{font-size:14px;color:var(--muted);margin-left:6px}
.grid{display:grid;gap:12px;grid-template-columns:repeat(var(--days,7),1fr);align-items:start}
.day-card{background:var(--card);border:1px solid #2a3144;border-radius:16px;padding:12px;min-height:180px;box-shadow:0 10px 24px var(--shadow)}
.day-header{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:8px}
.day-title{font-weight:800}
.day-sub{color:var(--muted);font-size:12px}
.event{display:grid;grid-template-columns:10px 1fr;gap:10px;align-items:start;padding:10px;border-radius:12px;border:1px solid #26304a;margin-bottom:8px}
.event .bar{width:10px;border-radius:8px}
.event .when{color:var(--muted);font-size:12px;margin-bottom:4px}
.event .title{font-weight:700;font-size:15px;line-height:1.25;word-break:break-word}
.event .where{color:var(--muted);font-size:12px;margin-top:4px}
.empty{color:var(--muted);font-style:italic;text-align:center;padding:24px 8px;border:1px dashed #2a3144;border-radius:12px}
.footer{color:var(--muted);font-size:12px;margin-top:8px;text-align:right}
.hidden{display:none!important}
.errorbar{position:fixed;top:64px;left:0;right:0;background:#3a1b1b;color:#ffd6d6;padding:10px 16px;border-bottom:1px solid #6b2b2b;display:none;z-index:50}
/* Hide navigation buttons but keep them in the markup */
#prevBtn,
#todayBtn,
#nextBtn {
  display: none !important;
}
.clock {
  margin-left: 12px;
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}
/* Badge on the today tile */
.day-card.is-today .day-title {
  position: relative;
  padding-right: 58px; /* room for the badge */
}

.day-card.is-today .day-title::after {
  content: "Today";
  position: absolute;
  right: 0;
  top: -2px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: #05142e;
  border: 1px solid rgba(255,255,255,0.15);
}

/* (Optional) subtle emphasis for today's card */
.day-card.is-today {
  border-color: #334166;
  box-shadow: 0 0 0 2px rgba(108,160,255,0.12), 0 10px 24px var(--shadow);
}

.wx-card {
  background: var(--card);
  border: 1px solid #2a3144;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 0 10px 24px var(--shadow);
}
.wx-row { display:flex; align-items:center; gap:12px; }
.wx-big { font-size: 28px; line-height: 1; }
.wx-info .wx-line { font-weight: 700; }
.wx-info .wx-line + .wx-line { color: var(--muted); font-weight: 600; margin-top: 2px; }

/* ===== Weather card ===== */
.wx-card{
  display:grid;
  grid-template-columns: 140px 1fr;
  gap:16px;
  align-items:center;

  background: linear-gradient(135deg, rgba(40,60,100,0.45), rgba(26,32,48,0.75));
  border:1px solid #2a3144;
  border-radius:16px;
  padding:14px 16px;
  margin-bottom:12px;
  box-shadow:0 10px 24px var(--shadow);
}

.wx-left{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px}
.wx-icon{
  width:64px; height:64px; border-radius:16px;
  display:flex; align-items:center; justify-content:center;
  font-size:34px; background:#1e2a45; border:1px solid #334569;
}
.wx-temp{font-size:28px; font-weight:800; letter-spacing:.3px}

.wx-right{min-width:0}
.wx-title{font-weight:800; font-size:16px; margin-bottom:2px}
.wx-sub{color:var(--muted); font-weight:600; margin-bottom:8px}

.wx-metrics{display:flex; flex-wrap:wrap; gap:8px}
.wx-chip{
  display:flex; align-items:center; gap:6px;
  background:#1a2030; border:1px solid #2a3144;
  padding:6px 10px; border-radius:999px;
}
.wx-chip-icon{font-size:14px}
.wx-chip-label{color:var(--muted); font-size:12px; font-weight:700; letter-spacing:.2px}
.wx-chip-value{font-weight:800}

/* small screens: stack */
@media (max-width: 720px){
  .wx-card{ grid-template-columns: 1fr; }
  .wx-left{ flex-direction:row; justify-content:flex-start; }
  .wx-icon{ width:48px; height:48px; font-size:24px; border-radius:12px }
  .wx-temp{ font-size:22px }
}

/* Slightly stronger border for colored icon backgrounds */
.wx-icon {
  transition: background 150ms ease, border-color 150ms ease;
}



