:root {
  --bg: #000;
  --bg2: #0a0a0a;
  --line: #222;
  --line2: #333;
  --text: #e8e8e8;
  --muted: #8a8a8a;
  --red: #ff5a5a;
  --blue: #5aa7ff;
  --accent: #c9a227;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.4 system-ui, Segoe UI, sans-serif; min-height: 100%; }
button, input, select, textarea { font: inherit; color: inherit; background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; }
button { cursor: pointer; }
button.primary { background: #1a1a1a; border-color: var(--accent); color: #f3e6b3; }
button.ghost { background: transparent; border-color: var(--line); }
a { color: var(--blue); }
.app { max-width: 1200px; margin: 0 auto; padding: 12px 14px 80px; }
.top { display: flex; align-items: center; gap: 10px; padding: 8px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.top h1 { margin: 0; letter-spacing: .02em; }
.brand-main { font-size: 20px; font-weight: 700; }
.brand-by { font-size: 16px; font-weight: 400; color: var(--muted); }
.top .sp { flex: 1; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--red); font-size: 14px; }
.new-list-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; align-items: center; }
.new-list-form input { min-width: 180px; flex: 1 1 180px; }
.pin-row, .board-row { display: flex; flex-wrap: wrap; gap: 12px; min-height: 48px; }
.pin-row, #mineRow, #sharedRow { padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 28px 12px 14px;
  min-width: 220px;
  max-width: 280px;
  flex: 1 1 220px;
  cursor: pointer;
  position: relative;
}
.pin-ico { position: absolute; top: 6px; right: 6px; background: none; border: 0; padding: 2px; font-size: 15px; line-height: 1; }
.pin-ico.filled { filter: grayscale(1) brightness(.55); }
.drag-h { color: #666; font-size: 11px; letter-spacing: -2px; cursor: grab; padding-top: 5px; user-select: none; }
.card.dragging, .item.dragging { opacity: .45; }
.switch-list { margin-left: auto; }
.current-due { font-size: 12px; }
.card h3 { margin: 0 0 4px; font-size: 16px; }
.card.pin { border-color: #2a2a2a; }
.counts { font-size: 12px; color: var(--muted); margin-top: 8px; }
.counts .r { color: var(--red); }
.counts .b { color: var(--blue); }
.list-page h2 { margin: 8px 0 4px; font-size: 20px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.band-label { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 0 6px; }
.band-overdue { color: var(--red); font-weight: 700; border-bottom: 2px solid var(--red); padding-bottom: 3px; }
.band-due { color: var(--blue); font-weight: 700; border-bottom: 2px solid var(--blue); padding-bottom: 3px; }
.band-rest { color: #fff; font-weight: 700; border-bottom: 2px solid #fff; padding-bottom: 3px; }
.band-done, .band-label.collapsible { cursor: pointer; }
.item { display: grid; grid-template-columns: 14px 22px 22px 1fr auto; gap: 8px; align-items: start; padding: 8px 4px; border-bottom: 1px solid var(--line); user-select: none; }
.item.child { margin-left: 22px; grid-template-columns: 14px 22px 22px 1fr auto; }
.band-chev { font-weight: 400; color: var(--muted); margin-right: 6px; }
.sub-plus {
  width: 22px; height: 22px; margin-top: 0; padding: 0;
  background: transparent; border: 0;
  color: #3a3a3a; font-size: 22px; font-weight: 400; line-height: 22px;
}
.sub-stack { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.sub-add-more {
  display: block; margin: 16px auto; width: 44px; height: 44px;
  background: transparent; border: 0;
  color: #3a3a3a; font-size: 28px; font-weight: 400; line-height: 1;
}
.title { white-space: pre-wrap; }
textarea { width: 100%; background: var(--bg2); border: 1px solid var(--line2); border-radius: 8px; padding: 8px 10px; color: inherit; }
.item-actions { display: flex; align-items: center; gap: 2px; }
.dots { background: none; border: 0; color: var(--muted); padding: 4px 8px; font-size: 18px; line-height: 1; letter-spacing: 0; }
.dots:hover { color: var(--text); }
.ctx {
  position: fixed; z-index: 80; min-width: 180px;
  background: #050505; border: 1px solid var(--line2); border-radius: 8px;
  padding: 4px; box-shadow: 0 8px 24px #000;
}
.ctx button {
  display: block; width: 100%; text-align: left; background: transparent;
  border: 0; border-radius: 6px; padding: 8px 10px; color: var(--text);
}
.ctx button:hover { background: #161616; }
.ctx button.danger { color: var(--red); }
.ctx button.outlined { border: 1px solid var(--red); margin: 4px; width: calc(100% - 8px); }
.ctx-gap { height: 10px; }
.del-actions { display: flex; align-items: center; }
.del-actions .sp { flex: 1; }
.danger-btn { background: transparent; border: 1px solid var(--red); color: var(--red); }
.pin-ico svg { display: block; }
.item.overdue .title { color: var(--red); }
.item.due .title { color: var(--blue); }
.item.done .title { color: var(--muted); text-decoration: line-through; }
.title { word-break: break-word; }
.tag { font-size: 11px; color: var(--muted); }
.chev { background: none; border: 0; color: var(--muted); padding: 0 4px; }
.auth { max-width: 360px; margin: 12vh auto; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); }
.auth h1 { margin-top: 0; }
.auth label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
.auth input { width: 100%; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.modal-bg { position: fixed; inset: 0; background: #000c; display: flex; align-items: flex-end; justify-content: center; padding: 16px; }
@media (min-width: 700px) { .modal-bg { align-items: center; } }
.modal { background: #050505; border: 1px solid var(--line2); border-radius: 12px; padding: 16px; width: min(520px, 100%); max-height: 90vh; overflow: auto; }
.hidden { display: none !important; }
.fab { position: fixed; right: 16px; bottom: 16px; width: 52px; height: 52px; border-radius: 50%; background: #151515; border: 1px solid var(--accent); font-size: 28px; line-height: 1; }
.box {
  width: 22px; height: 22px; margin-top: 2px; padding: 0;
  background: #000;
  border: 3px solid #3a3a3a;
  border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  color: #888;
  line-height: 1;
}
.box.on { border-color: #4a4a4a; color: #cfcfcf; }
.box.locked { cursor: default; color: #666; }
.box-mark { font-size: 14px; font-weight: 600; pointer-events: none; }
.box-x {
  position: relative; display: block; width: 100%; height: 100%; pointer-events: none;
}
.box-x::before, .box-x::after {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 140%;
  height: 3px;
  background: #3a3a3a;
}
.box-x::before { transform: translate(-50%, -50%) rotate(45deg); }
.box-x::after { transform: translate(-50%, -50%) rotate(-45deg); }
.box.locked { overflow: hidden; }
.box:not(.locked):hover { border-color: #555; }
.picks { display: flex; flex-direction: column; gap: 6px; }
.picks label { display: flex; gap: 8px; align-items: center; }
.due-row { display: flex; gap: 8px; align-items: center; }
.due-row input { flex: 1; }
.cal-btn { padding: 8px 10px; }
.cal { margin: 12px 0; background: #000; border: 1px solid var(--line2); border-radius: 8px; padding: 10px; max-width: 280px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-weight: 650; }
.cal-nav { padding: 4px 10px; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day {
  background: transparent; border: 0; border-radius: 4px;
  padding: 8px 0; color: #eee; font-size: 13px;
}
.cal-day.out { color: #555; }
.cal-day.in { color: #f2f2f2; }
.cal-day.today { background: #1a6fd4; color: #fff; }
.cal-day.sel:not(.today) { outline: 1px solid var(--accent); }
.cal-day:hover { background: #1a1a1a; }
