:root {
  color-scheme: light;
  --ink: #1d2026;
  --muted: #606774;
  --line: #d8dde5;
  --paper: #fffdf8;
  --panel: #ffffff;
  --sun: #f5c84b;
  --mint: #2f9f7b;
  --tomato: #df5b45;
  --blue: #4267b2;
  --shadow: 0 18px 45px rgba(27, 31, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(245, 200, 75, 0.25), transparent 36%),
    linear-gradient(315deg, rgba(47, 159, 123, 0.18), transparent 42%),
    var(--paper);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.mast {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.3rem, 11vw, 4.4rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--panel);
  box-shadow: 0 8px 20px rgba(27, 31, 39, 0.08);
}

.status-panel,
.entry-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  margin-bottom: 14px;
}

.status-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.status-copy > div {
  min-width: 0;
  width: 100%;
}

.status-dot {
  flex: 0 0 14px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 5px rgba(245, 200, 75, 0.2);
}

.status-dot.exists {
  background: var(--mint);
  box-shadow: 0 0 0 5px rgba(47, 159, 123, 0.18);
}

.status-dot.empty {
  background: var(--tomato);
  box-shadow: 0 0 0 5px rgba(223, 91, 69, 0.16);
}

.status-copy h2 {
  font-size: 1rem;
  line-height: 1.2;
}

.status-copy p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.today-pill {
  flex: 0 0 auto;
  border: 1px solid #f0d886;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff4c7;
  font-size: 0.85rem;
  font-weight: 800;
}

.status-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.edit-button {
  min-height: 38px;
  border: 1px solid var(--mint);
  border-radius: 8px;
  padding: 8px 12px;
  color: #14624a;
  background: #dbf4eb;
  font-weight: 900;
}

.entry-panel {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.entry-panel.locked {
  position: relative;
}

.entry-panel.locked input,
.entry-panel.locked textarea,
.entry-panel.locked button {
  cursor: not-allowed;
}

.field {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field span,
legend {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 800;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fbfcfe;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--blue);
  outline: 3px solid rgba(66, 103, 178, 0.18);
}

.egg-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.egg-option {
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 5px;
  background: #fbfcfe;
  color: var(--ink);
}

.egg-option[aria-checked="true"] {
  border-color: #d7a52b;
  background: #fff1b8;
  box-shadow: inset 0 0 0 2px #f5c84b;
}

.egg-face {
  display: grid;
  place-items: center;
  width: 42px;
  height: 50px;
  margin: 0 auto;
  border: 2px solid #d9bf72;
  border-radius: 50% 50% 46% 46%;
  background: #fff8dc;
  color: #754a16;
  font-family: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-size: 0.9rem;
  font-weight: 900;
}

.segmented,
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.segmented button,
.chips button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--ink);
  background: #fbfcfe;
  font-weight: 750;
}

.segmented button.selected {
  border-color: var(--mint);
  background: #dbf4eb;
  box-shadow: inset 0 0 0 2px rgba(47, 159, 123, 0.55);
}

.chips button.selected {
  border-color: var(--blue);
  background: #e8efff;
  box-shadow: inset 0 0 0 2px rgba(66, 103, 178, 0.38);
}

.field.disabled {
  opacity: 0.45;
}

.field.disabled button {
  pointer-events: none;
}

.save-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 13px 16px;
  color: #ffffff;
  background: var(--mint);
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(47, 159, 123, 0.25);
}

.save-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%) translateY(22px);
  width: min(92vw, 520px);
  border-radius: 8px;
  padding: 12px 14px;
  color: #ffffff;
  background: #20242c;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 560px) {
  .shell {
    padding-top: 12px;
  }

  .mast {
    min-height: 82px;
  }

  .status-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .status-actions {
    width: 100%;
    justify-content: space-between;
  }

  .status-copy {
    width: 100%;
  }

  .egg-scale {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }

  .egg-option {
    min-height: 58px;
    padding: 7px 3px;
  }

  .egg-face {
    width: 34px;
    height: 42px;
    font-size: 0.76rem;
  }

}
