:root {
  color-scheme: dark;
  --bg: #12151a;
  --card: #1c2128;
  --line: #313844;
  --text: #f2efe9;
  --muted: #a39e94;
  --accent: #e0a15a;
  --danger: #e07a68;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 "Segoe UI", system-ui, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
main { width: min(1100px, calc(100% - 32px)); margin: 0 auto 48px; }
h1 { font-size: 1.6rem; font-weight: 650; margin: 22px 0 12px; }
h2 { font-size: 1rem; font-weight: 650; margin: 22px 0 10px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.top {
  display: flex; gap: 18px; align-items: center;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(18, 21, 26, .92); backdrop-filter: blur(8px);
}
.brand { color: var(--text); font-weight: 700; letter-spacing: .08em; }
.top nav { display: flex; gap: 14px; flex: 1; }
.logout { display: flex; gap: 10px; align-items: center; margin: 0; color: var(--muted); }
button, .button {
  background: var(--accent); color: #1a1208; border: 0; border-radius: 999px;
  padding: 8px 14px; font: inherit; cursor: pointer;
}
button.ghost, .button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.button.secondary { display: inline-block; margin-top: 12px; }
.flash, .error { background: #3a2a22; border-radius: 10px; padding: 10px 12px; }
.error { color: var(--danger); }
.muted, small { color: var(--muted); }
.board-head, .inline, .sources li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.board-head { justify-content: space-between; }
input, select, textarea {
  width: 100%; background: #101318; color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 10px; font: inherit;
}
textarea { min-height: 74px; }
.inline input { width: auto; flex: 1; }
#filter { width: min(280px, 100%); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; min-height: 96px; }
.link-card { display: flex; gap: 12px; align-items: center; color: inherit; }
.mark {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
  background: #2a241c; color: var(--accent); font-weight: 700; overflow: hidden; flex: none;
}
.mark img { width: 100%; height: 100%; object-fit: cover; }
.link-card small, .card small { display: block; }
.temp { font-size: 2rem; margin: 8px 0 0; }
.time { font-size: 2rem; font-variant-numeric: tabular-nums; }
.note { white-space: pre-wrap; }
.compact { list-style: none; padding: 0; margin: 8px 0; }
.compact li { margin: 4px 0; }
.compact span { color: var(--accent); }
.login { width: min(420px, 100%); margin: 10vh auto; }
.stack { display: grid; gap: 10px; }
.narrow { width: min(640px, 100%); }
.check { display: flex; gap: 8px; align-items: center; }
.check input { width: auto; }
fieldset { border: 1px solid var(--line); border-radius: 12px; }
.subnav { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
table { width: 100%; border-collapse: collapse; margin-top: 22px; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
td form { display: inline; }
.stats { display: flex; gap: 18px; padding: 0; list-style: none; }
.stats b { font-size: 1.4rem; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dow { color: var(--muted); font-size: .8rem; }
.day { background: var(--card); border-radius: 10px; min-height: 78px; padding: 6px; font-size: .78rem; }
.day.out { opacity: .4; }
.day span { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.todos { list-style: none; padding: 0; }
.todos li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.todos .check { background: none; color: inherit; border: 0; padding: 0; text-align: left; }
.done .check { color: var(--muted); text-decoration: line-through; }
.secret { font-family: ui-monospace, monospace; word-break: break-all; }
code { color: var(--accent); }
@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  .cal { gap: 3px; }
  .day { min-height: 52px; }
}
