:root {
  --ink: #151515;
  --muted: #68645d;
  --paper: #f6f1e7;
  --panel: #fffaf0;
  --line: #ded2bf;
  --gold: #ffd21f;
  --gold-dark: #b58b00;
  --green: #376b52;
  --red: #a84032;
  --blue: #265d7d;
  --shadow: 0 18px 46px rgba(27, 22, 15, 0.12);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 210, 31, 0.18), transparent 34%),
    linear-gradient(180deg, #fbf8f0 0%, #efe5d4 100%);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 18px;
}

.topbar,
.hero-band,
.panel {
  border: 1px solid var(--line);
  background: rgba(255, 250, 240, 0.92);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-radius: 8px;
  backdrop-filter: blur(16px);
}

.brand-lockup,
.header-actions,
.button-row,
.panel-heading,
.filter-bar,
.quick-add,
.project-header,
.score-grid,
.task-row,
.support-item {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
}

.brand-mark,
.dom-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--ink);
  color: var(--gold);
  font-weight: 900;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--gold-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1;
}

.header-actions {
  gap: 8px;
}

.icon-button,
.mini-button,
.check-button,
.delete-button {
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 800;
}

.hero-band {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  margin: 18px 0;
  padding: 24px;
  border-radius: 8px;
}

.hero-band h2 {
  max-width: 840px;
  margin-bottom: 0;
  font-size: clamp(1.6rem, 4vw, 3.8rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.score-grid {
  align-self: stretch;
  gap: 10px;
}

.score-grid div {
  display: grid;
  place-items: center;
  min-width: 96px;
  height: 100%;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--gold);
}

.score-grid span {
  font-size: 2.3rem;
  font-weight: 950;
  line-height: 1;
}

.score-grid small {
  font-weight: 850;
}

.bento-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.45fr);
  gap: 18px;
}

.panel {
  border-radius: 8px;
  padding: 18px;
}

.panel-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.panel-heading h3 {
  margin: 0;
  font-size: 1.25rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 850;
}

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

textarea:focus,
input:focus,
select:focus,
button:focus-visible {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(255, 210, 31, 0.45);
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.45;
}

.button-row {
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.primary-button,
.secondary-button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  border: 1px solid var(--ink);
  font-weight: 900;
}

.primary-button {
  background: var(--ink);
  color: #fff;
}

.secondary-button {
  background: var(--gold);
  color: var(--ink);
}

.dom-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.dom-avatar {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.dom-card p {
  margin: 0;
  color: #38342d;
  line-height: 1.4;
}

.list-heading input {
  max-width: 170px;
  padding: 10px;
  font-weight: 800;
}

#prepListTitle {
  padding: 4px 2px;
  border-radius: 6px;
}

#prepListTitle:focus {
  outline: 3px solid rgba(255, 210, 31, 0.55);
}

.filter-bar {
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.filter-button {
  min-width: 48px;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  font-weight: 900;
}

.filter-button.is-active {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

.quick-add {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(130px, 1fr) 80px 80px 68px 72px;
  gap: 8px;
  margin-bottom: 14px;
}

.quick-add input,
.quick-add select {
  min-height: 42px;
  padding: 0 10px;
}

.project-list {
  display: grid;
  gap: 12px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  overflow: hidden;
}

.project-header {
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8efd8;
}

.project-header h4 {
  margin: 0;
  font-size: 1rem;
}

.project-header span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.task-list {
  display: grid;
}

.task-row {
  display: grid;
  grid-template-columns: 34px 56px minmax(150px, 1fr) 82px 86px 36px;
  gap: 8px;
  padding: 9px 10px;
  border-bottom: 1px solid #eee1ce;
}

.task-row:last-child {
  border-bottom: 0;
}

.task-row.is-done {
  background: rgba(55, 107, 82, 0.08);
}

.task-row.is-done .task-name {
  color: var(--muted);
  text-decoration: line-through;
}

.check-button {
  width: 34px;
  height: 34px;
  border-radius: 7px;
}

.task-row.is-done .check-button {
  background: var(--green);
  border-color: var(--green);
}

.task-row.is-done .check-button::after {
  content: "✓";
  color: #fff;
  font-weight: 950;
}

.priority-select,
.task-name,
.task-count,
.task-unit {
  min-height: 34px;
  padding: 0 8px;
}

.priority-select {
  font-weight: 950;
}

.delete-button {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  color: var(--red);
  font-size: 1.2rem;
  font-weight: 900;
}

.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.compact-heading {
  margin-bottom: 10px;
}

.compact-heading h3 {
  font-size: 1.05rem;
}

.mini-button {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-size: 1.25rem;
  font-weight: 900;
}

.support-list {
  display: grid;
  gap: 8px;
}

.support-item {
  display: grid;
  grid-template-columns: 1fr 36px;
  gap: 8px;
}

.support-item textarea {
  min-height: 52px;
  padding: 9px;
}

@media (max-width: 1080px) {
  .hero-band,
  .bento-layout,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .score-grid {
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 10px;
  }

  .topbar {
    align-items: flex-start;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .hero-band {
    padding: 16px;
  }

  .score-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .score-grid div {
    min-width: 0;
    min-height: 82px;
  }

  .score-grid span {
    font-size: 1.7rem;
  }

  .panel {
    padding: 13px;
  }

  .quick-add {
    grid-template-columns: 1fr 1fr;
  }

  .quick-add #taskNameInput,
  .quick-add .primary-button {
    grid-column: 1 / -1;
  }

  .task-row {
    grid-template-columns: 34px 52px 1fr 36px;
  }

  .task-count,
  .task-unit {
    grid-column: span 2;
  }
}

@media print {
  body {
    background: #fff;
  }

  .app-shell {
    width: 100%;
    padding: 0;
  }

  .topbar,
  .hero-band,
  .command-panel,
  .filter-bar,
  .quick-add,
  .delete-button,
  .header-actions {
    display: none !important;
  }

  .bento-layout,
  .support-grid {
    display: block;
  }

  .panel {
    box-shadow: none;
    border: 0;
    padding: 0;
    background: #fff;
  }

  .list-panel::before {
    content: "Prep List";
    display: block;
    margin-bottom: 8px;
    font-size: 34px;
    font-weight: 950;
  }

  .list-heading {
    border-bottom: 2px solid #000;
    padding-bottom: 8px;
  }

  .project-list {
    gap: 7px;
    margin-top: 10px;
  }

  .project-card {
    break-inside: avoid;
    border-color: #000;
  }

  .project-header {
    padding: 6px 8px;
    background: #fff;
    border-color: #000;
  }

  .task-row {
    grid-template-columns: 24px 38px 1fr 52px 52px;
    gap: 5px;
    padding: 4px 6px;
    border-color: #000;
  }

  .task-row .delete-button {
    display: none;
  }

  .task-row input,
  .task-row select,
  .list-heading input {
    border: 0;
    padding: 0;
    min-height: 22px;
    background: #fff;
  }

  .check-button {
    width: 20px;
    height: 20px;
    border-color: #000;
  }

  .support-grid {
    columns: 3;
    column-gap: 16px;
    margin-top: 14px;
    border-top: 2px solid #000;
    padding-top: 10px;
  }

  .support-panel {
    break-inside: avoid;
    margin-bottom: 8px;
  }

  .support-item {
    grid-template-columns: 1fr;
  }

  .support-item textarea {
    border: 0;
    min-height: 28px;
    padding: 0;
  }
}
