:root {
  color-scheme: light;
  --ink: #1c1b1a;
  --muted: #6f6a64;
  --paper: #f7f0e8;
  --accent: #c8502f;
  --accent-dark: #8d2a12;
  --sky: #d7efe2;
  --leaf: #3d7a5f;
  --card: #fffaf3;
  --shadow: 0 18px 30px rgba(28, 27, 26, 0.12);
  --radius: 22px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #fff6ea 0%, #f3e8d8 45%, #e8d7c7 100%);
  color: var(--ink);
}

.app {
  min-height: 100vh;
  padding: 18px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.app__content {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hero {
  background: linear-gradient(135deg, #ffe9d2 0%, #f8c9a7 45%, #f4b08e 100%);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  top: -60px;
  right: -40px;
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__tag {
  text-transform: uppercase;
  letter-spacing: 0.18rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 2rem;
  margin: 0 0 8px;
}

.hero p {
  margin: 0;
  color: #5a3a2a;
  font-weight: 500;
}

.hero__panel {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.stat {
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.stat__label {
  font-size: 0.8rem;
  color: var(--muted);
}

.stat__value {
  font-size: 1.2rem;
  font-weight: 600;
}

.sheet {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(200, 80, 47, 0.12);
}

.sheet__header h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
}

.sheet__header p {
  margin: 0 0 16px;
  color: var(--muted);
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

input {
  border: 1px solid #e0d2c3;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #fff7ee;
}

input:focus {
  outline: 2px solid rgba(200, 80, 47, 0.35);
  border-color: var(--accent);
}

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 6px;
}

.btn {
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 20px rgba(200, 80, 47, 0.3);
}

.btn.outline {
  background: transparent;
  border: 2px solid #f0d1bf;
  color: var(--accent-dark);
}

.is-hidden {
  display: none;
}

.log {
  background: linear-gradient(180deg, #ffffff 0%, #fbf4ec 100%);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.log__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.badge {
  background: var(--sky);
  color: var(--leaf);
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
}

.log__grid {
  display: grid;
  gap: 12px;
}

.entry {
  background: #fffaf1;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid #f1d8c5;
  display: grid;
  gap: 10px;
}

.entry strong {
  font-size: 1rem;
}

.entry .meta {
  display: flex;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--muted);
  flex-wrap: wrap;
}

.entry .actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.entry button {
  border: none;
  background: transparent;
  color: var(--accent-dark);
  font-weight: 600;
  cursor: pointer;
}

.empty {
  margin: 20px 0 0;
  text-align: center;
  color: var(--muted);
}

@media (min-width: 760px) {
  .app {
    max-width: 920px;
    margin: 0 auto;
    padding: 30px 24px 60px;
  }

  .split {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (min-width: 520px) {
  .hero__panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .app__content {
    gap: 26px;
  }

  .sheet {
    padding-bottom: 96px;
  }

  .sheet__header h2 {
    font-size: 1.15rem;
  }

  .sheet__header p {
    font-size: 0.9rem;
  }

  label {
    font-size: 0.85rem;
    margin-bottom: 10px;
  }

  input {
    padding: 10px 12px;
  }

  .actions {
    position: sticky;
    bottom: 16px;
    background: rgba(255, 250, 243, 0.96);
    padding: 12px;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(28, 27, 26, 0.12);
    z-index: 2;
  }
}
