:root {
  --paper: #fff4df;
  --paper-deep: #f3d4a3;
  --cream: #fffaf0;
  --ink: #21150d;
  --muted: #74563d;
  --orange: #f47a1f;
  --orange-deep: #c94f17;
  --orange-soft: #ffd08a;
  --line: #2b1a10;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(33, 21, 13, 0.035) 1px, transparent 1px),
    linear-gradient(var(--paper), var(--paper-deep));
  background-size: 18px 18px, auto;
  color: var(--ink);
}

.app-preview {
  display: grid;
  min-height: 100vh;
  place-items: start center;
  padding: 20px 20px 104px;
}

.phone-shell {
  width: min(100%, 430px);
  display: grid;
  gap: 16px;
}

.phone-shell[hidden] {
  display: none;
}

.save-bar {
  align-items: center;
  background: var(--ink);
  border: 2px solid var(--line);
  border-radius: 8px;
  bottom: 16px;
  box-shadow: 0 16px 40px rgba(33, 21, 13, 0.24);
  color: var(--cream);
  display: flex;
  gap: 12px;
  left: 50%;
  opacity: 0;
  padding: 9px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity 180ms ease, transform 180ms ease;
  width: min(calc(100% - 32px), 430px);
  z-index: 10;
}

.save-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.save-bar strong {
  flex: 1;
  font-size: 12px;
  line-height: 1.25;
}

.save-bar button {
  border-color: var(--cream);
  min-height: 40px;
  padding: 0 16px;
}

.page-header {
  border-bottom: 3px solid var(--line);
  padding-bottom: 16px;
}

.header-top {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.header-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.eyebrow,
label span,
.section-heading span,
.usage-grid span {
  color: var(--orange-deep);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.plan-badge {
  background: var(--ink);
  border-radius: 999px;
  color: var(--cream);
  font-size: 11px;
  font-weight: 950;
  padding: 6px 10px;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-stretch: condensed;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
}

h1 {
  font-size: 42px;
}

h2 {
  font-size: 25px;
}

.page-header p:last-child,
.menu-header p:last-child,
.special p,
.menu-row p,
.category-heading p,
#saveSummary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
  margin: 6px 0 0;
}

.editor-card,
.menu-sheet {
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.category-list,
.add-form,
.category-editor,
.item-editor {
  display: grid;
  gap: 12px;
}

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

.usage-grid span {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  display: grid;
  gap: 2px;
  padding: 10px 12px;
}

.usage-grid strong {
  color: var(--ink);
  font-size: 20px;
}

.sort-controls {
  display: flex;
  gap: 6px;
}

.highlighted {
  background: var(--orange-soft);
}

label {
  display: grid;
  gap: 7px;
}

input {
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  min-height: 46px;
  padding: 0 12px;
  width: 100%;
}

input:focus {
  box-shadow: 0 0 0 3px rgba(244, 122, 31, 0.22);
  outline: none;
}

.section-heading,
.qr-card,
.special div {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-heading div {
  display: grid;
  gap: 3px;
}

.mode-toggle {
  background: var(--cream);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
}

.mode-toggle.is-active {
  background: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(244, 122, 31, 0.16);
}

.category-block {
  border-top: 2px solid var(--line);
  padding-top: 12px;
}

.preview-category {
  border-top: 2px solid var(--line);
  margin-top: 14px;
  padding-top: 12px;
}

.category-heading {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.category-heading div {
  flex: 1;
}

.category-heading > span {
  background: var(--orange-soft);
  border: 2px solid var(--line);
  border-radius: 50%;
  display: grid;
  font-size: 11px;
  font-weight: 950;
  height: 32px;
  place-items: center;
  width: 32px;
}

.menu-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(24px, 1fr) auto auto;
  gap: 8px;
  padding: 9px 0;
}

.menu-row i {
  border-bottom: 2px dotted rgba(33, 21, 13, 0.48);
  transform: translateY(-5px);
}

.menu-row p {
  grid-column: 1 / -1;
}

.just-moved {
  animation: move-feedback 520ms ease-out;
  background: rgba(244, 122, 31, 0.18);
  border-radius: 6px;
}

.editable-row {
  border-radius: 6px;
  cursor: pointer;
}

.editable-row:hover {
  background: rgba(255, 208, 138, 0.2);
}

.category-editor {
  background: rgba(255, 208, 138, 0.34);
  border: 2px solid rgba(43, 26, 16, 0.32);
  border-radius: 6px;
  padding: 10px;
}

.item-editor {
  background: rgba(255, 208, 138, 0.34);
  border: 2px solid rgba(43, 26, 16, 0.32);
  border-radius: 6px;
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 10px;
}

button {
  background: var(--orange);
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  font-size: 11px;
  font-weight: 950;
  min-height: 48px;
  text-transform: uppercase;
}

.ghost-button {
  background: transparent;
  border-color: transparent;
  color: var(--orange-deep);
}

.tiny-button {
  background: var(--cream);
  border-radius: 999px;
  min-height: 30px;
  padding: 0 10px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.limit-notice {
  background: var(--orange-soft);
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
  padding: 10px 12px;
}

.empty-note {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  margin: 0;
  padding: 10px 12px;
}

.small-button {
  min-height: 36px;
  padding: 0 12px;
}

.icon-button {
  align-items: center;
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  display: inline-grid;
  font-size: 15px;
  font-weight: 950;
  height: 32px;
  justify-content: center;
  min-height: 32px;
  padding: 0;
  transition: background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
  width: 32px;
}

.icon-button:active {
  background: var(--orange-soft);
  box-shadow: 0 0 0 3px rgba(244, 122, 31, 0.2);
  transform: translateY(1px) scale(0.95);
}

.icon-button:disabled {
  opacity: 0.34;
}

.danger {
  background: var(--ink);
  color: var(--cream);
}

.menu-header {
  align-items: center;
  border-bottom: 3px solid var(--line);
  display: grid;
  gap: 12px;
  grid-template-columns: 60px 1fr;
  padding-bottom: 16px;
}

.logo {
  background: var(--orange);
  border: 3px solid var(--line);
  border-radius: 50%;
  color: var(--cream);
  display: grid;
  font-size: 24px;
  font-weight: 950;
  height: 60px;
  place-items: center;
  width: 60px;
}

.menu-header h2 {
  font-size: 36px;
}

.special {
  background: var(--orange-soft);
  border: 2px solid var(--line);
  border-radius: 6px;
  margin-top: 16px;
  padding: 12px;
}

.special span {
  background: var(--ink);
  color: var(--cream);
  font-size: 11px;
  font-weight: 950;
  padding: 7px 9px;
  text-transform: uppercase;
}

.special h3 {
  font-size: 27px;
  margin-top: 12px;
}

.qr-card {
  background: var(--orange);
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}

.qr-card strong,
.copy-link-button span {
  overflow-wrap: anywhere;
}

.copy-link-button {
  background: transparent;
  border: 0;
  display: grid;
  flex: 1;
  gap: 4px;
  min-height: 0;
  padding: 0;
  text-align: left;
  text-transform: none;
}

.open-menu-button {
  flex: 0 0 auto;
}

.copy-link-button strong {
  color: var(--ink);
  font-size: 14px;
}

.copy-link-button span {
  color: var(--ink);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.copy-link-button:focus-visible {
  border-radius: 6px;
  box-shadow: 0 0 0 3px rgba(255, 250, 240, 0.5);
  outline: none;
}

.copy-link-button.is-copied span {
  color: var(--cream);
}

.qr {
  background: var(--cream);
  border: 2px solid var(--line);
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
  grid-template-columns: repeat(7, 1fr);
  height: 82px;
  padding: 7px;
  width: 82px;
}

.qr span {
  background: var(--ink);
}

.qr i {
  display: block;
}

@media (max-width: 520px) {
  .app-preview {
    padding: 0 0 104px;
  }

  .phone-shell {
    padding: 16px;
  }
}

@keyframes move-feedback {
  0% {
    box-shadow: 0 0 0 0 rgba(244, 122, 31, 0.38);
    transform: scale(0.995);
  }

  60% {
    box-shadow: 0 0 0 5px rgba(244, 122, 31, 0.12);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(244, 122, 31, 0);
    transform: scale(1);
  }
}
