* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #1d1d1f;
  background: #f6f7fb;
}

header.hero {
  background: linear-gradient(120deg, #1f6feb, #9b59b6);
  color: #ffffff;
  padding: 3rem 1.5rem 2.5rem;
}

.hero__content {
  max-width: 1100px;
  margin: 0 auto;
}

.hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 2.6vw, 3rem);
}

.hero__subtitle {
  margin: 0;
  font-size: 1.05rem;
  opacity: 0.9;
}

.hero__meta {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.95rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.controls__status {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  color: #6c7280;
  white-space: nowrap;
}

.fallback {
  display: none;
  background: #ffffff;
  border: 1px dashed #c9cedb;
  border-radius: 14px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
  color: #4b5360;
}

.fallback--visible {
  display: block;
}

.fallback input {
  margin-top: 0.6rem;
}

.editor details {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem 1.2rem;
  box-shadow: 0 10px 24px rgba(27, 39, 94, 0.08);
  margin-bottom: 1.5rem;
}

.editor summary {
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.editor textarea {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid #d7d9e0;
  font-family: inherit;
  font-size: 0.95rem;
}

.editor__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.editor__actions button {
  padding: 0.65rem 1rem;
  border-radius: 999px;
  border: none;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.editor__file {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

.editor__file input {
  font-size: 0.9rem;
}

.controls input {
  flex: 1;
  min-width: 240px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid #d7d9e0;
  font-size: 0.95rem;
}

.controls button {
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  border: none;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.controls button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid transparent;
  box-shadow: 0 12px 30px rgba(27, 39, 94, 0.08);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card--past {
  background: #f1f2f6;
  border-color: #d9dde8;
}

.card--past .card__badge {
  background: #e5e7f3;
  color: #5b6170;
}

.card--today {
  background: #e9f7ee;
  border-color: #bfe4c9;
  box-shadow: 0 16px 36px rgba(27, 94, 56, 0.16);
}

.card--today .card__badge {
  background: #d1f5de;
  color: #1b7b42;
}

.card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.card__title {
  margin: 0;
  font-size: 1.3rem;
}

.card__date {
  margin: 0.25rem 0 0;
  color: #606770;
  font-size: 0.95rem;
}

.card__status {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7a808c;
}

.card__status--past {
  color: #6c7280;
}

.card__status--today {
  color: #1b7b42;
}

.card__badge {
  background: #eff2ff;
  color: #1f6feb;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.card__section h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #636a75;
}

.card__section:first-of-type {
  margin-top: 0.6rem;
}

.card--no-todo .card__section--todo + .card__section {
  margin-top: 0.6rem;
}

.card__todo {
  margin: 0 0 0.35rem;
  padding-left: 1.1rem;
  font-size: 0.98rem;
}

.card__todo li {
  margin-bottom: 0.25rem;
}

.card__todo a {
  color: #1f6feb;
  font-weight: 600;
  text-decoration: none;
}

.card__todo a:hover {
  text-decoration: underline;
}

.card__text {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.field-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #7a808c;
  margin-right: 0.4rem;
}

.field-value {
  font-weight: 600;
  color: #1d1d1f;
}

.card__link {
  display: inline-block;
  margin-bottom: 0.35rem;
  color: #1f6feb;
  font-weight: 600;
  text-decoration: none;
}

.card__link:hover {
  text-decoration: underline;
}

.card__image {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  height: 180px;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.emoji {
  display: inline-block;
  font-size: 0.85em;
  margin-right: 0.35rem;
  line-height: 1;
  vertical-align: text-bottom;
}

.weather {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.3rem;
}

.weather--hidden {
  display: none;
}

.weather__label {
  margin: 0;
  font-size: 0.85rem;
  color: #7a808c;
}

.weather__value {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.weather__summary {
  color: #505764;
}

.weather__icon {
  display: inline-block;
  margin-right: 0.4rem;
}

.weather__icon--hidden {
  display: none;
}

.footer {
  text-align: center;
  padding: 1.5rem;
  color: #6c7280;
  font-size: 0.9rem;
}

@media (max-width: 720px) {
  header.hero {
    padding: 2.5rem 1.2rem 2rem;
  }

  .card {
    padding: 1.2rem;
  }
}
