/* dailytoolshelf — mobile-first, plain CSS, no framework */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  background: #f6f7f9;
  color: #1f2430;
  line-height: 1.55;
}
a { color: #2563eb; text-decoration: none; }
button, input, textarea { font: inherit; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px 48px; }

/* header */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 16px; max-width: 720px; margin: 0 auto;
}
.brand { font-size: 19px; font-weight: 700; color: #1f2430; }
.brand small { display: block; font-size: 12px; font-weight: 400; color: #6b7280; }
.auth-area { font-size: 14px; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.auth-area .who { color: #374151; font-weight: 600; }
.link-btn {
  background: none; border: none; color: #2563eb; cursor: pointer; padding: 6px 2px; font-size: 14px;
}

/* cards / shelf */
.card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 14px;
  padding: 18px; margin: 14px 0;
}
.product { display: block; color: inherit; }
.product h2 { margin: 0 0 6px; font-size: 19px; }
.product p { margin: 0; color: #6b7280; font-size: 14px; }
.badge {
  display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px;
  background: #e8f5e9; color: #2e7d32; margin-left: 8px; vertical-align: 2px;
}
.badge.soon { background: #f1f1f4; color: #8a8f98; }
.product.disabled { opacity: .65; }

.section-title { font-size: 17px; margin: 22px 0 4px; }
.hint { color: #6b7280; font-size: 13px; }
.error { color: #c62828; font-size: 14px; min-height: 20px; }
.ok-msg { color: #2e7d32; font-size: 14px; min-height: 20px; }

/* forms */
label { display: block; font-size: 14px; color: #374151; margin: 12px 0 5px; }
input[type="text"], input[type="password"], textarea {
  width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 10px;
  background: #fff; font-size: 16px; /* 16px avoids iOS zoom-on-focus */
}
textarea { min-height: 84px; resize: vertical; }
.btn {
  display: inline-block; width: 100%; padding: 13px; margin-top: 16px;
  background: #2563eb; color: #fff; border: none; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer; min-height: 48px;
}
.btn:active { background: #1d4ed8; }
.btn.secondary { background: #eef1f5; color: #1f2430; }
.btn.danger { background: #fff; color: #c62828; border: 1px solid #e5b4b4; }
.btn.small { width: auto; padding: 8px 14px; font-size: 14px; min-height: 40px; margin-top: 0; }
.tabs { display: flex; gap: 8px; margin-bottom: 6px; }
.tabs button {
  flex: 1; padding: 11px; border-radius: 10px; border: 1px solid #d1d5db;
  background: #fff; cursor: pointer; font-size: 15px; min-height: 46px;
}
.tabs button.active { background: #2563eb; border-color: #2563eb; color: #fff; font-weight: 600; }

/* habit tracker */
.habit-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.habit-head h3 { margin: 0; font-size: 17px; }
.stats { color: #6b7280; font-size: 13px; margin-top: 3px; }
.stats b { color: #2e7d32; }
.del-btn { background: none; border: none; color: #b0b5bd; font-size: 13px; cursor: pointer; padding: 4px; }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; }
.month-nav .m { font-weight: 600; font-size: 15px; }
.month-nav button {
  border: 1px solid #d1d5db; background: #fff; border-radius: 8px;
  width: 40px; height: 40px; font-size: 17px; cursor: pointer;
}
.cal { width: 100%; border-collapse: separate; border-spacing: 3px; }
.cal th { font-size: 12px; color: #9aa0aa; font-weight: 400; padding: 2px 0; }
.cal td {
  text-align: center; padding: 0; height: 42px; border-radius: 9px;
  font-size: 14px; color: #374151; background: #f3f4f6; position: relative;
}
.cal td.empty { background: transparent; }
.cal td.checked { background: #43a047; color: #fff; font-weight: 700; }
.cal td.today { outline: 2px solid #2563eb; outline-offset: -2px; }
.cal td.tappable { cursor: pointer; }
.cal td.dim { color: #c3c8cf; }

/* admin table */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th, table.list td { text-align: left; padding: 8px 6px; border-bottom: 1px solid #eceef1; vertical-align: top; }
.fb-text { white-space: pre-wrap; word-break: break-word; }

footer { text-align: center; color: #9aa0aa; font-size: 12px; padding: 10px 0 26px; }

@media (min-width: 640px) {
  .cal td { height: 50px; font-size: 15px; }
}
