:root {
  --orange: #f98f45;
  --orange-dark: #c4421a;
  --orange-deep: #a83814;
  --ink: #333333;
  --cream: #fff8f0;
  --soft-cream: #fafaf8;
  --teal: #97cecc;
  --paper-line: rgba(151, 206, 204, 0.4);
  --border-strong: 3px solid #333333;
  --border-soft: 2px solid #333333;
  --shadow-card: 6px 7px 0 rgba(0, 0, 0, 0.14);
  --shadow-soft: 4px 5px 0 rgba(0, 0, 0, 0.12);
  --radius-main: 8px;
  --radius-card: 16px;
  --transition-fast: 0.2s ease;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Grandstander", cursive;
  color: var(--ink);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: -1;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.45;
}

body::before {
  display: none;
}

body::after {
  width: 260px;
  height: 260px;
  bottom: 8%;
  left: 6%;
  background: rgba(255, 255, 255, 0.28);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0 40px;
}

.sidebar-panel,
.modal-card,
.notebook-paper {
  background: rgba(255, 248, 240, 0.92);
  border: var(--border-strong);
  border-radius: var(--radius-main);
  box-shadow: var(--shadow-card);
}

.panel-title,
.hero-title,
.section-title,
.modal-title,
.recipe-title,
.sketch-button,
.recipe-link {
  font-family: "Walter Turncoat", cursive;
}

.panel-title {
  margin: 0 0 16px;
  font-size: 0.95rem;
  text-transform: uppercase;
  color: var(--orange-dark);
  letter-spacing: 0.08em;
}

.sketch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: var(--border-soft);
  border-radius: 6px;
  background: var(--orange);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
  box-shadow: 3px 4px 0 rgba(0, 0, 0, 0.16);
}

.sketch-button:hover,
.sketch-button:focus-visible {
  transform: translate(-1px, -1px);
  box-shadow: 5px 6px 0 rgba(0, 0, 0, 0.18);
}

.sketch-button:focus-visible,
.icon-button:focus-visible,
.sketch-input:focus-visible,
.recipe-link:focus-visible,
.fridge-card:focus-visible {
  outline: 3px solid rgba(151, 206, 204, 0.95);
  outline-offset: 3px;
}

.sketch-button.secondary {
  background: #fffef8;
  color: var(--ink);
}

.sketch-button.secondary:hover,
.sketch-button.secondary:focus-visible {
  background: #fff3e6;
}

.sketch-input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.96);
  border: var(--border-soft);
  border-radius: 8px;
  color: var(--ink);
}

.add-item-form {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.icon-button {
  width: 44px;
  height: 44px;
  border: var(--border-soft);
  border-radius: 10px;
  background: #fff8f0;
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: #ffeada;
}

.editable-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
}

.editable-row + .editable-row {
  border-top: 1px dashed rgba(51, 51, 51, 0.18);
}

.mini-input {
  min-height: 40px;
  padding: 8px 10px;
  border: var(--border-soft);
  border-radius: 8px;
  background: #fffefb;
}

.mini-button {
  min-width: 44px;
  min-height: 40px;
  padding: 8px 12px;
  border: var(--border-soft);
  border-radius: 8px;
  background: #ffe3d6;
  color: var(--orange-dark);
  font-family: "Walter Turncoat", cursive;
  font-weight: 700;
}

.mini-button:hover,
.mini-button:focus-visible {
  background: #ffd3bf;
}

.check-input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange-dark);
}

.checked .mini-input {
  text-decoration: line-through;
  color: rgba(51, 51, 51, 0.55);
  background: #f0f0eb;
}

@media (max-width: 860px) {
  .page-shell {
    width: min(100% - 24px, 900px);
    padding-top: 20px;
  }
}

@media (max-width: 560px) {
  .add-item-form {
    flex-direction: column;
  }
}
