/* Future Life: calm, image-first, mobile-first. Warm paper background,
   deep green accent, big tap targets, cards that lead with a picture. */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  background: #f7f3ec;
  color: #26302a;
}
.site-header {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: #3f5d50; color: #fff;
}
.app-icon { width: 36px; height: 36px; border-radius: 8px; }
.site-header h1 { margin: 0; font-size: 1.25rem; font-weight: 600; }
.tagline { margin: 2px 0 0; font-size: 0.85rem; opacity: 0.92; }

.main { margin: 0 auto; padding: 12px; max-width: 1100px; }

.add-toggle {
  width: 100%; min-height: 52px;
  font-size: 1.05rem; font-weight: 600;
  background: #3f5d50; color: #fff; border: none; border-radius: 10px;
  cursor: pointer;
}
.panel {
  margin-top: 10px; background: #fff; border: 1px solid #ddd5c2;
  border-radius: 10px; padding: 12px;
}
.field { display: block; margin-bottom: 10px; }
.field > span, .field > legend {
  display: block; font-size: 0.82rem; color: #5c665e; margin-bottom: 4px;
}
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 0.95rem;
  padding: 9px 10px; border: 1px solid #b9bfae; border-radius: 8px;
  min-height: 44px; background: #fffdf9;
}
.field textarea { min-height: 0; resize: vertical; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .field-grid { grid-template-columns: 1fr; } }
fieldset.field { border: none; padding: 0; margin: 0 0 10px; }
.link-row { display: flex; gap: 6px; }
.link-row input { flex: 1 1 auto; }
.fetch-note { margin: 0 0 8px; font-size: 0.82rem; color: #5c665e; min-height: 1em; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.primary-btn {
  min-height: 46px; padding: 8px 18px; font-size: 0.98rem; font-weight: 600;
  background: #3f5d50; color: #fff; border: none; border-radius: 8px; cursor: pointer;
}
.mini-btn {
  min-height: 44px; padding: 6px 12px; font-size: 0.88rem;
  background: #efe9db; border: 1px solid #d5cdb6; border-radius: 8px;
  cursor: pointer; color: #26302a; white-space: nowrap;
}
.mini-btn.danger { color: #8a2f2f; }
.link-btn { display: inline-flex; align-items: center; text-decoration: none; }
.segmented { display: flex; border: 1px solid #b9bfae; border-radius: 8px; overflow: hidden; }
.segmented button {
  flex: 1 1 0; min-height: 44px; font: inherit; font-size: 0.92rem;
  background: #fffdf9; border: none; cursor: pointer; color: #26302a;
}
.segmented button.on { background: #3f5d50; color: #fff; font-weight: 600; }

/* Category row: horizontal cards with a cover picture. */
.cat-row {
  display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 6px;
  -webkit-overflow-scrolling: touch;
}
.cat-card {
  flex: 0 0 auto; width: 148px; min-height: 96px;
  border: 2px solid transparent; border-radius: 10px; overflow: hidden;
  background: #e8e2d2; cursor: pointer; padding: 0; text-align: left;
  font: inherit; color: #fff; position: relative; display: block;
}
.cat-card img { width: 100%; height: 62px; object-fit: cover; display: block; }
.cat-card .cat-name {
  display: block; padding: 6px 8px; font-size: 0.86rem; font-weight: 600;
  color: #26302a; line-height: 1.25;
}
.cat-card .cat-count { font-weight: normal; color: #5c665e; font-size: 0.78rem; }
.cat-card.noimg .cat-name { padding-top: 12px; }
.cat-card.on { border-color: #3f5d50; }
.cat-card.all-card { background: #3f5d50; }
.cat-card.all-card .cat-name { color: #fff; padding-top: 12px; }
.cat-card.all-card .cat-count { color: #cfd8cf; }
.cat-admin { display: flex; gap: 14px; padding: 2px 2px 0; }
.text-btn {
  background: none; border: none; padding: 8px 2px; min-height: 40px;
  font: inherit; font-size: 0.88rem; color: #3f5d50; cursor: pointer;
  text-decoration: underline;
}
.cat-form { display: flex; gap: 6px; margin-top: 6px; }
.cat-form input {
  flex: 1 1 auto; font: inherit; padding: 8px 10px; min-height: 44px;
  border: 1px solid #b9bfae; border-radius: 8px;
}
.cat-tools { display: flex; gap: 4px; padding: 0 6px 6px; }
.cat-tools button {
  font-size: 0.75rem; min-height: 32px; padding: 2px 8px;
  background: #fffdf9; border: 1px solid #d5cdb6; border-radius: 6px; cursor: pointer;
}

/* For now strip */
.strip-title { font-size: 1.05rem; margin: 16px 0 6px; font-weight: 600; }
.now-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.now-card {
  flex: 0 0 auto; width: 168px; border: none; border-radius: 10px; overflow: hidden;
  background: #fff; cursor: pointer; padding: 0; text-align: left; font: inherit;
  box-shadow: 0 1px 3px rgba(38, 48, 42, 0.12);
}
.now-card img { width: 100%; height: 100px; object-fit: cover; display: block; }
.now-card .now-title { display: block; padding: 7px 9px; font-size: 0.9rem; font-weight: 600; color: #26302a; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.filters input, .filters select {
  font: inherit; font-size: 0.92rem; padding: 8px 10px; min-height: 44px;
  border: 1px solid #b9bfae; border-radius: 8px; background: #fffdf9;
}
#search { flex: 2 1 170px; }
.filters select { flex: 1 1 130px; }

.status-line { min-height: 1.1em; margin: 8px 0 4px; color: #5c665e; font-size: 0.88rem; }
.status-line.error { color: #a33; }
.empty { color: #5c665e; }

/* Idea grid: masonry via CSS columns. */
.idea-grid { column-count: 2; column-gap: 10px; }
@keyframes cardin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card { animation: cardin 0.35s ease both; }
@media (min-width: 640px) { .idea-grid { column-count: 3; } }
@media (min-width: 980px) { .idea-grid { column-count: 4; } }
.card {
  break-inside: avoid; display: block; width: 100%;
  margin: 0 0 10px; padding: 0; border: none; border-radius: 12px;
  overflow: hidden; background: #fff; cursor: pointer; text-align: left;
  font: inherit; box-shadow: 0 1px 4px rgba(38, 48, 42, 0.14);
}
.card img { width: 100%; display: block; }
.card .card-body { padding: 8px 10px 10px; }
.card .card-title { font-size: 0.98rem; font-weight: 600; color: #26302a; line-height: 1.3; }
.card .card-cat { font-size: 0.78rem; color: #5c665e; margin-top: 2px; }
.markers { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.pill {
  font-size: 0.72rem; padding: 2px 8px; border-radius: 999px;
  background: #efe9db; color: #5c5340;
}
.pill.now { background: #dcebe0; color: #2e5e3a; font-weight: 600; }
.pill.st-ready { background: #dcebe0; color: #2e5e3a; }
.pill.st-realized { background: #3f5d50; color: #fff; }

/* Detail sheet */
.scrim {
  position: fixed; inset: 0; background: rgba(38, 48, 42, 0.45); z-index: 40;
}
.detail-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  max-height: 92vh; overflow-y: auto;
  background: #fffdf9; border-radius: 16px 16px 0 0; padding: 14px;
  box-shadow: 0 -4px 24px rgba(38, 48, 42, 0.25);
}
@media (min-width: 760px) {
  .detail-sheet { left: 50%; right: auto; transform: translateX(-50%); width: 640px; }
}
.detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.detail-head h2 { margin: 0; font-size: 1.1rem; }
.detail-image { width: 100%; border-radius: 10px; margin: 10px 0; display: block; }

.site-footer { padding: 6px 14px 20px; color: #5c665e; font-size: 0.82rem; max-width: 1100px; margin: 0 auto; }
