* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f4f5f7; color: #1a1a1a; padding-bottom: 84px;
}

/* header */
header {
  position: sticky; top: 0; z-index: 5;
  background: #2e7d32; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.htitle { font-size: 19px; font-weight: 700; }
.prog { font-size: 16px; font-variant-numeric: tabular-nums; opacity: .95; }
.sync { font-size: 12px; font-weight: 500; opacity: .85; }

/* list */
ul { list-style: none; margin: 0; padding: 0; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 18px; min-height: 58px;
  background: #fff; border-bottom: 1px solid #e7e9ec; cursor: pointer;
  user-select: none;
}
.row:active { background: #eef7ef; }
.box {
  flex: 0 0 26px; height: 26px; width: 26px;
  border: 2px solid #b7bcc3; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #2e7d32; font-weight: 700;
}
.txt { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
.name { font-size: 18px; font-weight: 600; }
.sub { font-size: 13px; color: #7a8087; margin-top: 2px; }

/* "not available" toggle button on the right of each row */
.na-btn {
  flex: 0 0 auto; margin-left: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  padding: 7px 11px; border-radius: 9px;
  border: 1.5px solid #ccd0d6; background: transparent; color: #9198a0;
  cursor: pointer;
}
.na-btn:active { background: #eceef0; }

/* got it */
.row.done { background: #f7f8f9; }
.row.done .name { text-decoration: line-through; color: #a4a9af; font-weight: 500; }
.row.done .sub { color: #c0c4c9; }
.row.done .box { background: #2e7d32; border-color: #2e7d32; color: #fff; }

/* not available (they didn't have it) */
.row.na { background: #fbf6ec; }
.row.na .name { text-decoration: line-through; color: #b5893f; font-weight: 500; }
.row.na .sub { color: #d3b98a; }
.row.na .box { background: #e0921c; border-color: #e0921c; color: #fff; }
.row.na .na-btn { background: #e0921c; border-color: #e0921c; color: #fff; }

.empty { padding: 40px 24px; text-align: center; color: #8a9099; }

/* add bar */
#add {
  position: fixed; bottom: 0; left: 0; right: 0;
  display: flex; gap: 8px; padding: 12px;
  background: #fff; border-top: 1px solid #e0e3e7;
  box-shadow: 0 -2px 8px rgba(0,0,0,.06);
}
#add input {
  flex: 1; font-size: 17px; padding: 12px 14px;
  border: 1px solid #ccd0d6; border-radius: 10px; outline: none;
}
#add input:focus { border-color: #2e7d32; }
#add button, .loginbox button {
  font-size: 17px; font-weight: 600; padding: 12px 20px;
  background: #2e7d32; color: #fff; border: 0; border-radius: 10px; cursor: pointer;
}
#add button:active { background: #256628; }

/* login */
body.login { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.loginbox {
  background: #fff; padding: 32px 28px; border-radius: 16px;
  box-shadow: 0 6px 24px rgba(0,0,0,.1); width: 300px; text-align: center;
}
.loginbox .logo { font-size: 44px; }
.loginbox h1 { font-size: 22px; margin: 8px 0 20px; }
.loginbox input {
  width: 100%; font-size: 18px; padding: 12px 14px; margin-bottom: 12px;
  border: 1px solid #ccd0d6; border-radius: 10px; outline: none; text-align: center;
}
.loginbox input:focus { border-color: #2e7d32; }
.loginbox button { width: 100%; }
.err { color: #c62828; font-size: 14px; min-height: 18px; margin: 10px 0 0; }

@media (prefers-color-scheme: dark) {
  body { background: #16181c; color: #e8eaed; }
  .row, #add { background: #23262b; border-color: #2e3238; }
  .row.done { background: #1c1f23; }
  .row.na { background: #241f16; }
  .row.na .name { color: #c79a4e; }
  .row.na .sub { color: #806f4c; }
  .na-btn { border-color: #3a3f47; color: #9aa0a8; }
  .row:active { background: #26302a; }
  .sub { color: #9aa0a8; }
  #add input { background: #2b2f35; border-color: #3a3f47; color: #e8eaed; }
  .loginbox { background: #23262b; }
  .loginbox input { background: #2b2f35; border-color: #3a3f47; color: #e8eaed; }
}
