/* Lister look (from Jonny's Lister app, ~/lister): iOS grey page, one white rounded card per line,
   grey square tick boxes, white pill buttons, grey round + button.
   iOS 10 Safari: no CSS variables, no flex gap, -webkit- flexbox alongside standard. */
html, body { margin: 0; background: #f2f2f7; color: #111; }
body { font-family: -apple-system, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif; -webkit-text-size-adjust: 100%; }
button { font-family: inherit; -webkit-appearance: none; cursor: pointer; }
* { -webkit-tap-highlight-color: rgba(0,0,0,0); }

/* top bar: centred title, white pills either side */
.bar { position: relative; height: 48px; margin: 8px 16px 8px; }
.bar .title { position: absolute; left: 70px; right: 70px; top: 0; line-height: 48px; text-align: center;
  font-size: 18px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { position: absolute; top: 0; height: 48px; line-height: 48px; padding: 0 16px; border-radius: 24px; border: 0;
  background: #fff; color: #111; font-size: 16px; text-decoration: none; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.pill.right { right: 0; }
.pill.left { left: 0; }
.pill svg { vertical-align: middle; }

/* cards */
.cards { list-style: none; margin: 0; padding: 0; }
.card { position: relative; background: #fff; border-radius: 18px; margin-top: 8px; overflow: hidden;
  -webkit-transition: background .15s; transition: background .15s; }
.card:first-child { margin-top: 0; }
.dim .card { background: #e2e2e7; }
.row { display: -webkit-box; display: -webkit-flex; display: flex; -webkit-box-align: center; -webkit-align-items: center; align-items: center;
  padding: 16px 20px; }
.row .text { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; font-size: 19px; line-height: 1.25; word-wrap: break-word; }
.row .when { display: block; font-size: 13px; color: #8e8e93; margin-top: 3px; }
.done .text { color: #8e8e93; }
.done .t { text-decoration: line-through; }

/* square tick box */
.box { -webkit-flex-shrink: 0; flex-shrink: 0; width: 24px; height: 24px; box-sizing: border-box; border: 2px solid #111;
  border-radius: 4px; margin-right: 16px; position: relative; }
.box svg { position: absolute; left: 1px; top: 1px; display: none; }
.done .box { border-color: #8e8e93; }
.done .box svg { display: block; }
.box.active { border-color: #636366; }

/* the row being typed into: white with a grey left edge */
.card.edit { background: #fff; }
.card.edit .row { padding: 4px 20px 4px 16px; border-left: 4px solid #636366; }
.card.edit input { -webkit-box-flex: 1; -webkit-flex: 1; flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 19px; color: #111; padding: 12px 0; -webkit-appearance: none; border-radius: 0; }

/* round buttons, bottom right */
.fab { position: fixed; right: 16px; bottom: 16px; width: 66px; height: 66px; border-radius: 33px; border: 0; padding: 0;
  background: #636366; color: #fff; box-shadow: 0 4px 10px rgba(0,0,0,.22); }
.fab svg { display: block; margin: 0 auto; }

.hint { text-align: center; color: #8e8e93; font-size: 12.5px; margin-top: 18px; }
.empty { text-align: center; color: #8e8e93; font-size: 15px; line-height: 1.5; padding: 80px 24px 0; }

/* undo toast */
.toast { position: fixed; left: 16px; right: 96px; bottom: 24px; background: #323236; color: #fff; border-radius: 12px;
  padding: 14px 16px; font-size: 15px; display: none; box-shadow: 0 4px 12px rgba(0,0,0,.2); }
.toast.show { display: block; }
.toast button { float: right; border: 0; background: none; color: #d1d1d6; font-size: 15px; font-weight: 600; padding: 0 0 0 12px; }

/* dark, as in Lister. iOS 10 doesn't know this query and stays light. */
@media (prefers-color-scheme: dark) {
  html, body { background: #000; color: #f2f2f2; }
  .pill, .card, .card.edit { background: #1c1c1e; color: #f2f2f2; }
  .dim .card { background: #0d0d0f; }
  .card.edit { background: #2c2c2e; }
  .box { border-color: #f2f2f2; }
  .card.edit input { color: #f2f2f2; }
  .toast { background: #e5e5ea; color: #111; }
  .toast button { color: #3a3a3c; }
}
