:root{
  --orange:#f27c22;
  --blue:#147dd3;

  --bg:#f6fbff;
  --card:#ffffff;
  --text:#1f1f1f;
  --muted:#6b6b6b;
  --border:rgba(0,0,0,.08);
  --shadow:0 10px 24px rgba(0,0,0,.08);
  --radius:18px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:Raleway,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:linear-gradient(180deg,var(--bg),#ffffff 60%);
  color:var(--text);
}

.topline{
  height:6px;
  background:linear-gradient(90deg,var(--orange),var(--blue));
}

.topbar{
  position:sticky;
  top:0;
  z-index:10;
  background:linear-gradient(90deg, rgba(242,124,34,.95), rgba(20,125,211,.95));
  color:#fff;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  box-shadow:0 10px 25px rgba(0,0,0,.12);
}

.brand{display:flex;gap:12px;align-items:center}
.brand-mark{
  width:18px;height:18px;border-radius:6px;
  background:linear-gradient(180deg,#fff,rgba(255,255,255,.65));
  opacity:.95;
}
.title{font-weight:800;letter-spacing:.2px}
.subtitle{font-size:12px;opacity:.92;margin-top:2px}

.top-actions{display:flex;gap:10px;align-items:center}
.pill{
  border:1px solid rgba(255,255,255,.45);
  background:rgba(255,255,255,.16);
  color:#fff;
  padding:9px 12px;
  border-radius:999px;
  font-weight:800;
  cursor:pointer;
}
.pill:hover{background:rgba(255,255,255,.22)}
.pill:active{transform:translateY(1px)}

.wrap{max-width:1100px;margin:0 auto;padding:16px}
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:14px;
  margin:14px 0;
}
.card-h{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
.card-t{font-weight:800}
.card-s{font-size:12px;color:var(--muted)}

.search-card form{display:flex;gap:10px;align-items:center;}
#searchInput{
  flex:1;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  font-size:14px;
  outline:none;
}
#searchInput:focus{
  border-color:rgba(20,125,211,.55);
  box-shadow:0 0 0 4px rgba(20,125,211,.14)
}
.search-card button{
  padding:12px 14px;
  border-radius:14px;
  border:0;
  background:linear-gradient(90deg,var(--orange),var(--blue));
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.search-card button:hover{filter:brightness(1.03)}

.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
}
@media (max-width: 900px){ .grid{grid-template-columns:1fr} }

.weather{
  display:flex;justify-content:space-between;gap:12px;align-items:center;
  border:1px solid var(--border);
  border-radius:16px;
  padding:12px;
}
.w-temp{font-size:34px;font-weight:900;line-height:1}
.w-desc{font-weight:900;margin-top:4px}
.w-sub,.w-small{font-size:12px;color:var(--muted);margin-top:6px}
.w-hiLo{font-weight:900}
.w-right{display:flex;flex-direction:column;align-items:flex-end}

.cal-status{font-size:13px;color:var(--muted);margin:6px 0 10px}
.cal-list{display:flex;flex-direction:column;gap:10px}
.cal-item{
  display:flex;justify-content:space-between;gap:10px;align-items:flex-start;
  padding:10px 12px;border-radius:14px;border:1px solid var(--border);
}
.cal-left{display:flex;flex-direction:column;gap:2px}
.cal-title{font-weight:900}
.cal-where{font-size:12px;color:var(--muted)}
.cal-time{font-weight:900}
.cal-cal{font-size:12px;color:var(--muted);margin-top:2px}

.quote{font-size:16px;line-height:1.4;margin:6px 0 8px}
.quote-a{font-size:13px;color:var(--muted);font-weight:800}

.countdowns{display:flex;flex-direction:column;gap:10px}
.cd{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 12px;border-radius:14px;border:1px solid var(--border);
}
.cd .name{font-weight:900}
.cd .time{color:var(--muted);font-size:12px;text-align:right}
.cd .big{font-weight:900}

.schedule{display:flex;flex-direction:column;gap:10px}
.sch-row{
  display:flex;justify-content:space-between;gap:10px;align-items:center;
  padding:10px 12px;border-radius:14px;border:1px solid var(--border);
}
.sch-row.current{
  box-shadow:0 0 0 4px rgba(242,124,34,.12);
  border-color:rgba(242,124,34,.35);
}
.sch-left{display:flex;flex-direction:column;gap:2px}
.sch-name{font-weight:900}
.sch-note{font-size:12px;color:var(--muted)}
.sch-time{font-weight:900}
.sch-link{font-size:12px;color:var(--muted);text-decoration:none}
.sch-link:hover{color:var(--text)}

.tabs{display:flex;flex-wrap:wrap;gap:8px;padding:2px;}
.tabbtn{
  border:1px solid var(--border);
  background:#fff;
  padding:10px 12px;
  border-radius:999px;
  font-weight:900;
  cursor:pointer;
}
.tabbtn:hover{background:#f6fbff}
.tabbtn.active{
  border-color:rgba(20,125,211,.35);
  box-shadow:0 0 0 4px rgba(20,125,211,.12);
}
.tabline{height:1px;background:var(--border);margin:12px 0}

.section{margin:12px 0 18px}
.section-title{font-weight:900;margin:0 0 10px}
.links{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:10px;}
@media (max-width: 900px){.links{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 520px){.links{grid-template-columns:1fr}}

.link{
  display:flex;gap:10px;align-items:center;
  padding:12px;border-radius:16px;border:1px solid var(--border);
  text-decoration:none;color:var(--text);background:#fff;
  transition:transform .12s ease, box-shadow .12s ease;
}
.link:hover{transform:translateY(-1px);box-shadow:0 14px 30px rgba(0,0,0,.10)}

.ico{
  width:36px;height:36px;border-radius:12px;
  display:grid;place-items:center;
  background:linear-gradient(180deg, rgba(242,124,34,.14), rgba(20,125,211,.12));
  overflow:hidden;
}
.ico img{width:100%;height:100%;object-fit:cover}
.ico .fallback{font-weight:900;color:var(--blue)}
.link .meta{display:flex;flex-direction:column;gap:2px}
.link .t{font-weight:900}
.link .u{font-size:12px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:340px}

.footer{color:var(--muted);font-size:12px;padding:6px 2px}

/* Focus Mode: hide “fun” widgets + personal tab */
body.focus #quoteCard,
body.focus #countdownCard{
  display:none;
}
