/* Free habit grid. Phone layout follows the A5 split: days 1–16, then 17–31. */

.data-warning,
.plan-note,
.import-error,
.habit-total,
.habit-name,
.app-actions button,
.delete-panel button {
  color: var(--ink);
}

.data-warning {
  margin: 0 0 0.8rem;
  padding: 0.7rem 0.85rem;
  background: var(--page);
  border: 1px solid var(--ink);
  border-radius: 2px;
  font-size: 16px;
  line-height: 1.45;
}

.plan-note {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
}

.habit {
  margin-top: 0.9rem;
}

.habit-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.8rem;
  margin-bottom: 0.7rem;
}

.habit-name {
  flex: 1 1 12rem;
  min-width: 0;
  margin: 0;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--clay);
  border-radius: 2px;
  background: var(--page);
  font-family: var(--font-gothic);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.4;
}

.habit-total {
  margin: 0;
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
}

.app-scroll {
  overflow-x: auto;
  max-width: 100%;
}

.app-days {
  --sq-pitch: 1.7rem;
  display: grid;
  grid-template-columns: repeat(16, var(--sq-pitch));
  gap: 0.45rem 0.12rem;
  width: max-content;
  margin-bottom: 0.55rem;
}

.app-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  min-width: 0;
}

.day-num {
  font-family: var(--font-gothic);
  font-weight: 500;
  font-size: 13px;
  line-height: 1;
  color: var(--ink);
}

.app-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.app-actions button,
.delete-panel button {
  font-family: var(--font-gothic);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
  background: var(--page);
  border: 1px solid var(--clay);
  border-radius: 2px;
  padding: 0.4rem 0.75rem;
  cursor: pointer;
}

.app-actions button:disabled {
  cursor: default;
  opacity: 0.45;
}

.delete-panel {
  margin: 0.6rem 0 0;
}

.import-error {
  min-height: 1.4em;
  margin: 0.45rem 0;
  font-size: 15px;
  line-height: 1.4;
}
