:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f6f7f5;
  color: #1d1a16;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(207, 79, 45, 0.1), rgba(207, 79, 45, 0) 280px),
    #f6f7f5;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.upload-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 24px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 32px;
  align-items: start;
}

.upload-panel--compact {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  padding-bottom: 8px;
}

.upload-panel__copy {
  min-width: 0;
}

.upload-panel__eyebrow {
  margin: 0 0 10px;
  color: #9d392b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.upload-panel__title {
  max-width: 700px;
  margin: 0;
  color: #1d1a16;
  font-size: 3.8rem;
  line-height: 0.98;
  letter-spacing: 0;
}

.upload-panel--compact .upload-panel__title {
  font-size: 1.8rem;
  line-height: 1.15;
}

.upload-panel__description {
  max-width: 620px;
  margin: 18px 0 0;
  color: #5c554d;
  font-size: 1rem;
  line-height: 1.6;
}

.upload-panel__mode {
  display: inline-flex;
  max-width: 620px;
  margin: 16px 0 0;
  padding: 7px 10px;
  border: 1px solid rgba(35, 111, 93, 0.18);
  border-radius: 8px;
  background: rgba(238, 246, 242, 0.78);
  color: #236f5d;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.35;
}

.upload-guidance {
  max-width: 620px;
  margin-top: 16px;
  color: #5c554d;
}

.upload-guidance__title,
.upload-guidance__note {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.45;
}

.upload-guidance__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 5px 18px;
  margin: 8px 0;
  padding-left: 18px;
  font-size: 0.86rem;
  line-height: 1.35;
}

.upload-guidance__note {
  color: #756c63;
  font-weight: 700;
}

.upload-panel__controls {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(29, 26, 22, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 34px rgba(38, 52, 45, 0.08);
}

.file-picker {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px dashed rgba(35, 111, 93, 0.36);
  border-radius: 8px;
  background: #eef6f2;
  color: #1f5d4d;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 900;
  text-align: center;
}

.file-picker:hover,
.file-picker:focus-within {
  border-color: rgba(35, 111, 93, 0.72);
  background: #e5f2ec;
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.upload-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}

.analyze-button,
.clear-upload-button,
.retry-upload-button,
.sample-menu-button {
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 900;
}

.analyze-button {
  border: 0;
  background: #20251f;
  color: #ffffff;
}

.clear-upload-button,
.retry-upload-button,
.sample-menu-button {
  padding: 0 12px;
  border: 1px solid rgba(29, 26, 22, 0.14);
  background: #ffffff;
  color: #2d2924;
}

.analyze-button:not(:disabled):hover,
.analyze-button:focus-visible,
.clear-upload-button:not(:disabled):hover,
.clear-upload-button:focus-visible,
.retry-upload-button:not(:disabled):hover,
.retry-upload-button:focus-visible,
.sample-menu-button:not(:disabled):hover,
.sample-menu-button:focus-visible {
  transform: translateY(-1px);
}

.upload-status {
  display: grid;
  gap: 12px;
  grid-column: 1 / -1;
}

.parse-status {
  margin: 0;
  color: #5f574f;
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1.4;
}

.parse-status--uploading,
.parse-status--parsing,
.parse-status--validating_files {
  color: #1f5d4d;
}

.parse-status--success {
  color: #236f5d;
}

.parse-status--error {
  color: #8b3126;
}

.upload-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.upload-summary {
  display: flex;
  grid-column: 1 / -1;
  min-height: 38px;
  padding: 9px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  background: #eef6f2;
  color: #52655d;
  font-size: 0.78rem;
  line-height: 1.3;
}

.upload-summary strong {
  color: #1f5d4d;
  font-size: 0.86rem;
}

.upload-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(29, 26, 22, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.upload-preview__image {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  object-fit: cover;
  background: #e8e5df;
}

.upload-preview__meta {
  min-width: 0;
}

.upload-preview__name {
  margin: 0;
  overflow-wrap: anywhere;
  color: #1d1a16;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.3;
}

.upload-preview__size {
  margin: 4px 0 0;
  color: #756c63;
  font-size: 0.8rem;
  font-weight: 700;
}

.upload-preview__size strong {
  color: #236f5d;
}

.upload-preview__remove {
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid rgba(157, 57, 43, 0.18);
  border-radius: 7px;
  background: #fff7f4;
  color: #9d392b;
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 850;
}

.upload-preview__remove:hover,
.upload-preview__remove:focus-visible {
  background: #fbe9e3;
}

.upload-empty,
.upload-error {
  margin: 0;
  color: #756c63;
  font-size: 0.92rem;
  line-height: 1.5;
}

.upload-error-panel {
  padding: 10px 12px;
  border: 1px solid rgba(157, 57, 43, 0.22);
  border-radius: 8px;
  background: #fff7f4;
}

.upload-error {
  color: #8b3126;
  font-weight: 800;
}

.upload-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.retry-upload-button {
  border-color: rgba(157, 57, 43, 0.24);
  background: #9d392b;
  color: #ffffff;
}

.history-panel {
  display: grid;
  gap: 14px;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto 28px;
  padding: 18px;
  border: 1px solid rgba(29, 26, 22, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 34px rgba(38, 52, 45, 0.08);
}

.history-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.history-panel__title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.history-clear-button,
.history-item__remove {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(29, 26, 22, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #2d2924;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 900;
}

.history-empty {
  margin: 0;
  color: #756c63;
  font-size: 0.92rem;
  line-height: 1.5;
}

.history-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.history-item__load {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 64px;
  padding: 12px;
  border: 1px solid rgba(35, 111, 93, 0.16);
  border-radius: 8px;
  background: #eef6f2;
  color: #1d1a16;
  cursor: pointer;
  text-align: left;
}

.history-item__name {
  overflow-wrap: anywhere;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1.25;
}

.history-item__meta {
  color: #5f655f;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.35;
}

.history-clear-button:not(:disabled):hover,
.history-clear-button:focus-visible,
.history-item__load:hover,
.history-item__load:focus-visible,
.history-item__remove:hover,
.history-item__remove:focus-visible,
.compare-image-button:hover,
.compare-image-button:focus-visible,
.category-add-item-button:hover,
.category-add-item-button:focus-visible,
.item-edit-button:hover,
.item-edit-button:focus-visible,
.item-delete-button:hover,
.item-delete-button:focus-visible,
.modal-close-button:hover,
.modal-close-button:focus-visible,
.edit-save-button:hover,
.edit-save-button:focus-visible,
.edit-cancel-button:hover,
.edit-cancel-button:focus-visible,
.copy-summary-button:hover,
.copy-summary-button:focus-visible,
.summary-language__button:hover,
.summary-language__button:focus-visible {
  transform: translateY(-1px);
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  align-items: start;
}

.menu-column {
  min-width: 0;
}

.menu-header {
  width: 100%;
  margin: 0;
  padding: 56px 0 32px;
}

.menu-header__eyebrow {
  margin: 0 0 10px;
  color: #9d392b;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.menu-header__title {
  max-width: 760px;
  margin: 0;
  color: #1d1a16;
  font-size: 4.5rem;
  line-height: 0.95;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.menu-header__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-top: 10px;
}

.menu-header__back-button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 4px 12px;
  border: 1px solid rgba(35, 111, 93, 0.2);
  border-radius: 999px;
  background: #eef6f2;
  color: #236f5d;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  transition: background 150ms ease;
}

.menu-header__back-button:hover,
.menu-header__back-button:focus-visible {
  background: #dceee5;
  transform: translateY(-1px);
}

.menu-header__meta {
  max-width: 620px;
  margin: 18px 0 0;
  color: #686057;
  font-size: 1rem;
  line-height: 1.6;
}

.menu-header__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.quality-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(35, 111, 93, 0.16);
  border-radius: 8px;
  background: rgba(238, 246, 242, 0.82);
}

.quality-panel__copy {
  min-width: 0;
}

.quality-panel__title,
.quality-panel__detail,
.quality-panel__warning,
.quality-panel__safety {
  margin: 0;
  line-height: 1.45;
}

.quality-panel__title {
  color: #1f3d34;
  font-size: 0.94rem;
  font-weight: 900;
}

.quality-panel__detail,
.quality-panel__warning,
.quality-panel__safety {
  color: #5f655f;
  font-size: 0.84rem;
  font-weight: 750;
}

.quality-panel__safety {
  margin-top: 4px;
  color: #76634e;
}

.quality-panel__warning {
  margin-top: 4px;
  color: #8b5c20;
}

.compare-image-button,
.category-add-item-button,
.item-edit-button,
.item-delete-button,
.modal-close-button,
.edit-save-button,
.edit-cancel-button,
.copy-summary-button,
.summary-language__button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(29, 26, 22, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #2d2924;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 900;
}

.copy-summary-button--copied {
  animation: copy-fade 1500ms ease-out forwards;
}

.compare-image-button {
  flex: 0 0 auto;
}

.menu-header__stat {
  display: inline-grid;
  grid-template-columns: auto auto;
  gap: 6px;
  align-items: baseline;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(29, 26, 22, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  color: #6b6259;
  font-size: 0.78rem;
  font-weight: 800;
}

.menu-header__stat strong {
  color: #1d1a16;
  font-size: 0.95rem;
}

.category-nav {
  position: sticky;
  z-index: 4;
  top: 0;
  display: flex;
  gap: 8px;
  min-width: 0;
  margin: 0 0 10px;
  padding: 10px 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  background: rgba(246, 247, 245, 0.92);
  backdrop-filter: blur(12px);
}

.category-nav:empty {
  display: none;
}

.category-nav__link {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 9px 12px;
  border: 1px solid rgba(35, 111, 93, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  color: #1f5d4d;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}

.category-nav__link:hover,
.category-nav__link:focus-visible {
  background: #e5f2ec;
  transform: translateY(-1px);
}

.menu-page {
  width: 100%;
  margin: 0;
  padding: 8px 0 64px;
}

.cart-column {
  position: sticky;
  top: 20px;
  align-self: start;
  padding-top: 56px;
}

.category-section {
  padding: 32px 0;
  border-top: 1px solid rgba(29, 26, 22, 0.12);
}

.category-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.category-section__title {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1.2;
  letter-spacing: 0;
  scroll-margin-top: 74px;
  overflow-wrap: anywhere;
}

.category-section__subtitle {
  margin: 0;
  color: #7a7168;
  font-size: 0.98rem;
  font-weight: 700;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.item-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  min-height: 196px;
  padding: 18px;
  gap: 16px;
  border: 1px solid rgba(29, 26, 22, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 34px rgba(38, 52, 45, 0.08);
}

.item-card--compact {
  min-height: 154px;
}

.item-card__actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.item-edit-button,
.item-delete-button {
  min-width: 64px;
}

.item-delete-button {
  border-color: rgba(157, 57, 43, 0.22);
  color: #9d392b;
}

.item-card__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}

.item-card--compact .item-card__content {
  gap: 10px;
}

.item-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  column-gap: 16px;
  row-gap: 8px;
}

.item-card__names {
  flex: 1 1 13rem;
  min-width: 0;
}

.item-card__name-zh {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.item-card__name-en {
  margin: 5px 0 0;
  color: #786e63;
  font-size: 0.93rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.item-card__price {
  flex: 0 1 14rem;
  max-width: 100%;
  min-width: 7rem;
  margin: 0;
  margin-left: auto;
  color: #1d1a16;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: right;
}

.item-card__description {
  margin: 0;
  color: #4f4740;
  font-size: 0.96rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.tag-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(35, 111, 93, 0.18);
  border-radius: 999px;
  background: #edf8f3;
  color: #236f5d;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.allergen-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.allergen-list__label,
.allergen-pill {
  display: inline-flex;
  min-height: 23px;
  padding: 3px 7px;
  align-items: center;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
}

.allergen-list__label {
  padding-left: 0;
  color: #7c6551;
}

.allergen-pill {
  border: 1px solid rgba(166, 84, 69, 0.18);
  background: #fff2ed;
  color: #914438;
}

.item-card__details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.spice-meter {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  gap: 6px;
  color: #776d63;
  font-size: 0.76rem;
  font-weight: 800;
}

.spice-meter__label {
  color: #776d63;
}

.spice-meter__muted {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  gap: 6px;
  color: #b5ada5;
  font-size: 0.76rem;
  font-weight: 800;
  filter: grayscale(1) opacity(0.5);
}

.spice-meter__peppers {
  display: inline-flex;
  color: #b83d28;
  font-size: 0.88rem;
  letter-spacing: 1px;
  line-height: 1;
}

.spice-meter--level-1 .spice-meter__peppers,
.spice-meter--level-2 .spice-meter__peppers {
  filter: saturate(0.8);
}

.spice-meter--level-4 .spice-meter__peppers,
.spice-meter--level-5 .spice-meter__peppers {
  filter: saturate(1.25);
}

.add-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: #20251f;
  color: #ffffff;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.add-button:hover,
.add-button:focus-visible {
  background: #9d392b;
  transform: translateY(-1px);
}

.category-add-item-button {
  flex: 0 0 auto;
}

.add-button:focus-visible {
  outline: 3px solid rgba(157, 57, 43, 0.28);
  outline-offset: 3px;
}

.mobile-cart-toggle {
  display: none;
}

.empty-state {
  margin: 0;
  padding: 24px;
  border: 1px dashed rgba(29, 26, 22, 0.22);
  border-radius: 8px;
  color: #766d64;
  background: rgba(255, 255, 255, 0.56);
}

.cart-panel {
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(29, 26, 22, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(38, 52, 45, 0.12);
}

.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(29, 26, 22, 0.1);
}

.cart-panel__title {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.cart-panel__count {
  color: #746b62;
  font-size: 0.86rem;
  font-weight: 800;
}

.cart-empty {
  margin: 16px 0 0;
  color: #756c63;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cart-list {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.cart-item {
  padding: 14px;
  border: 1px solid rgba(29, 26, 22, 0.1);
  border-radius: 8px;
  background: #ffffff;
}

.cart-item__header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.cart-item__names {
  min-width: 0;
}

.cart-item__name-zh {
  margin: 0;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.cart-item__name-en {
  margin: 4px 0 0;
  color: #776e65;
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.cart-item__subtotal {
  flex: 0 0 auto;
  margin: 0;
  color: #1d1a16;
  font-size: 0.95rem;
  font-weight: 800;
  overflow-wrap: anywhere;
  text-align: right;
}

.cart-item__price {
  margin: 10px 0 0;
  color: #766d64;
  font-size: 0.8rem;
  font-weight: 700;
}

.cart-item__controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quantity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(29, 26, 22, 0.16);
  border-radius: 50%;
  background: #f6f7f5;
  color: #1d1a16;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1;
}

.cart-item__quantity {
  min-width: 22px;
  text-align: center;
  font-size: 0.92rem;
  font-weight: 900;
}

.remove-button {
  min-height: 34px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid rgba(157, 57, 43, 0.22);
  border-radius: 999px;
  background: #fff7f4;
  color: #9d392b;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 800;
}

.cart-item__note-label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #635a52;
  font-size: 0.78rem;
  font-weight: 800;
}

.cart-item__note-input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(29, 26, 22, 0.16);
  border-radius: 8px;
  background: #fbfbf9;
  color: #1d1a16;
  font: inherit;
  font-size: 0.88rem;
  resize: vertical;
}

.cart-item__note-input:focus {
  outline: 3px solid rgba(35, 111, 93, 0.18);
  border-color: rgba(35, 111, 93, 0.55);
}

.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(29, 26, 22, 0.12);
  color: #4f4740;
  font-size: 0.95rem;
  font-weight: 800;
}

.cart-total strong {
  color: #1d1a16;
  font-size: 1.25rem;
}

.cart-actions {
  margin-top: 14px;
}

.summary-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: #20251f;
  color: #ffffff;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 900;
}

.summary-button:hover,
.summary-button:focus-visible,
.quantity-button:hover,
.quantity-button:focus-visible,
.remove-button:hover,
.remove-button:focus-visible {
  transform: translateY(-1px);
}

.summary-button:focus-visible,
.quantity-button:focus-visible,
.remove-button:focus-visible,
.analyze-button:focus-visible,
.clear-upload-button:focus-visible,
.retry-upload-button:focus-visible,
.sample-menu-button:focus-visible,
.history-clear-button:focus-visible,
.history-item__load:focus-visible,
.history-item__remove:focus-visible {
  outline: 3px solid rgba(157, 57, 43, 0.24);
  outline-offset: 3px;
}

.order-summary {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(29, 26, 22, 0.12);
}

.order-summary__hint {
  margin: 0;
  color: #756c63;
  font-size: 0.84rem;
  line-height: 1.45;
}

.order-summary__title {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.order-summary__toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.summary-language {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.summary-language__button--active {
  background: #20251f;
  color: #ffffff;
}

.order-summary__items {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  color: #4f4740;
  font-size: 0.84rem;
  line-height: 1.4;
}

.order-summary__total {
  margin: 12px 0 0;
  font-size: 0.9rem;
  font-weight: 900;
}

.order-summary__display {
  margin: 12px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 12px;
  border-radius: 8px;
  background: #eef6f2;
  color: #1f3d34;
  font-family: inherit;
  font-size: 0.86rem;
  line-height: 1.55;
}

.modal-overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(29, 26, 22, 0.38);
}

.image-dialog,
.edit-dialog {
  width: min(760px, 100%);
  max-height: min(86vh, 760px);
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(29, 26, 22, 0.28);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
}

.image-dialog__empty {
  margin: 0;
  color: #756c63;
  line-height: 1.5;
}

.image-dialog__gallery {
  display: grid;
  gap: 14px;
}

.image-dialog__figure {
  margin: 0;
}

.image-dialog__figure img {
  display: block;
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  border-radius: 8px;
  background: #f1efea;
}

.image-dialog__figure figcaption {
  margin-top: 8px;
  color: #756c63;
  font-size: 0.84rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.edit-dialog {
  display: grid;
  gap: 12px;
}

.edit-field {
  display: grid;
  gap: 6px;
  color: #5c554d;
  font-size: 0.82rem;
  font-weight: 900;
}

.edit-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(29, 26, 22, 0.16);
  border-radius: 8px;
  font: inherit;
}

.edit-field select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(29, 26, 22, 0.16);
  border-radius: 8px;
  background: #ffffff;
  color: #1d1a16;
  font: inherit;
}

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 4px;
}

.edit-save-button {
  border: 0;
  background: #20251f;
  color: #ffffff;
}

@media (max-width: 980px) {
  body {
    padding-bottom: 92px;
  }

  .upload-panel,
  .upload-panel--compact,
  .history-panel {
    display: block;
    width: min(100% - 24px, 1120px);
  }

  .upload-panel,
  .upload-panel--compact {
    padding: 36px 0 24px;
  }

  .history-panel {
    margin-bottom: 20px;
  }

  .upload-panel__controls {
    margin-top: 22px;
  }

  .app-shell {
    display: block;
    width: min(100% - 24px, 1120px);
  }

  .cart-column {
    position: fixed;
    z-index: 20;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: min(680px, calc(100% - 24px));
    margin: 0 auto;
    padding-top: 0;
  }

  .mobile-cart-toggle {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 58px;
    padding: 10px 12px;
    border: 1px solid rgba(29, 26, 22, 0.14);
    border-radius: 8px;
    background: #20251f;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 18px 46px rgba(29, 26, 22, 0.22);
    text-align: left;
  }

  .mobile-cart-toggle:focus-visible {
    outline: 3px solid rgba(157, 57, 43, 0.28);
    outline-offset: 3px;
  }

  .mobile-cart-toggle__count,
  .mobile-cart-toggle__label {
    overflow: hidden;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-cart-toggle__count {
    min-width: 58px;
    color: rgba(255, 255, 255, 0.72);
  }

  .mobile-cart-toggle__total {
    font-size: 1rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  .cart-panel {
    display: none;
    max-height: min(68vh, 620px);
    margin-top: 10px;
    overscroll-behavior: contain;
  }

  .cart-column--open .cart-panel {
    display: block;
  }

  .cart-column--open .mobile-cart-toggle {
    background: #9d392b;
  }
}

@media (max-width: 640px) {
  .upload-panel__title {
    font-size: 2.45rem;
  }

  .upload-panel--compact .upload-panel__title {
    font-size: 1.55rem;
  }

  .upload-actions {
    grid-template-columns: 1fr;
  }

  .upload-preview-list {
    grid-template-columns: 1fr;
  }

  .upload-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .history-panel__header,
  .history-item {
    display: block;
  }

  .history-clear-button,
  .history-item__remove {
    width: 100%;
    margin-top: 10px;
  }

  .menu-header {
    padding: 36px 0 24px;
  }

  .menu-header__title {
    font-size: 2.55rem;
    line-height: 1;
  }

  .menu-header__stats {
    gap: 8px;
  }

  .menu-header__stat {
    grid-template-columns: 1fr;
    gap: 1px;
    min-width: calc(50% - 4px);
  }

  .menu-page {
    padding-bottom: 40px;
  }

  .quality-panel {
    display: grid;
  }

  .compare-image-button {
    width: 100%;
  }

  .category-section__header {
    display: grid;
    align-items: start;
  }

  .category-section__subtitle {
    margin-top: 4px;
  }

  .category-add-item-button {
    width: 100%;
    margin-top: 8px;
  }

  .item-card {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 16px;
    gap: 12px;
  }

  .item-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .item-card__header {
    display: block;
  }

  .item-card__price {
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-top: 8px;
    text-align: left;
  }

  .add-button {
    width: 40px;
    height: 40px;
  }

  .order-summary__toolbar {
    grid-template-columns: 1fr;
  }

  .copy-summary-button {
    width: 100%;
  }

  .cart-panel {
    padding: 14px;
  }

  .mobile-cart-toggle {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) auto;
    min-height: 56px;
    padding: 9px 10px;
  }

  .cart-item__header {
    display: block;
  }

  .cart-item__subtotal {
    margin-top: 6px;
  }
}

/* Ordering workspace */
.app-shell {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  width: min(1460px, calc(100% - 32px));
}

.menu-header {
  padding: 40px 0 26px;
}

.upload-panel--compact {
  grid-template-columns: minmax(180px, 0.5fr) minmax(460px, 1fr);
  gap: 20px;
  width: min(1460px, calc(100% - 32px));
  padding: 14px 0 4px;
  align-items: center;
}

.upload-panel--compact .upload-panel__eyebrow,
.upload-panel--compact .upload-panel__description,
.upload-panel--compact .upload-panel__mode,
.upload-panel--compact .upload-guidance {
  display: none;
}

.upload-panel--compact .upload-panel__title {
  font-size: 1.05rem;
  line-height: 1.2;
}

.upload-panel--compact .upload-panel__controls {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
  margin: 0;
  padding: 8px;
  align-items: center;
  box-shadow: none;
}

.upload-panel--compact .file-picker {
  min-height: 38px;
  padding: 8px 12px;
}

.upload-panel--compact .upload-status {
  gap: 6px;
}

.upload-panel--compact .parse-status--success,
.upload-panel--compact .upload-empty {
  display: none;
}

.menu-header__title {
  font-size: clamp(2.8rem, 5vw, 4.7rem);
}

.menu-browser {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.category-nav {
  position: sticky;
  top: 16px;
  display: flex;
  max-height: calc(100vh - 32px);
  margin: 0;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid rgba(29, 26, 22, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 32px rgba(38, 52, 45, 0.07);
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
}

.category-nav__link {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  min-height: 64px;
  padding: 10px 9px 10px 12px;
  gap: 3px 8px;
  align-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #615950;
  cursor: pointer;
  text-align: left;
  white-space: normal;
  transition:
    background-color 160ms ease,
    color 160ms ease;
}

.category-nav__link::before {
  position: absolute;
  top: 9px;
  bottom: 9px;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: transparent;
  content: "";
  transition: background-color 200ms ease;
}

.category-nav__link:hover,
.category-nav__link:focus-visible {
  background: #f0f5f1;
  transform: none;
}

.category-nav__link--active {
  background: #e7f1ec;
  color: #183e33;
}

.category-nav__link--active::before {
  background: #236f5d;
}

.category-nav__name-zh {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.25;
}

.category-nav__name-en {
  min-width: 0;
  overflow: hidden;
  color: #847a70;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-nav__count {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 24px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(29, 26, 22, 0.06);
  color: #736a61;
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  transition: background-color 200ms ease, color 200ms ease;
}

.category-nav__link--active .category-nav__count {
  background: #236f5d;
  color: #ffffff;
}

.menu-page {
  min-width: 0;
  padding: 0 0 72px;
}

.category-section {
  padding: 22px 0 34px;
  border-top: 0;
  scroll-margin-top: 16px;
}

.category-section:first-child {
  padding-top: 4px;
}

.category-section + .category-section {
  border-top: 8px solid rgba(29, 26, 22, 0.035);
}

.category-section__header {
  align-items: center;
  margin-bottom: 14px;
}

.category-section__title {
  font-size: 1.48rem;
  scroll-margin-top: 16px;
}

.category-section__subtitle {
  flex: 1;
  font-size: 0.82rem;
}

.category-add-item-button {
  display: inline-flex;
  width: 34px;
  min-width: 34px;
  height: 34px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.18rem;
}

.menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.item-card,
.item-card--compact {
  min-height: 178px;
  padding: 16px;
  gap: 14px;
  border-color: rgba(29, 26, 22, 0.1);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(38, 52, 45, 0.055);
  transition:
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.menu-animations-ready .item-card {
  opacity: 0;
  transform: translateY(12px);
}

.menu-animations-ready .item-card--revealed {
  animation: item-card-reveal 360ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (hover: hover) {
  .item-card:hover {
    border-color: rgba(35, 111, 93, 0.2);
    box-shadow: 0 12px 30px rgba(38, 52, 45, 0.09);
    transform: translateY(-2px);
  }
}

.item-card__content {
  gap: 10px;
}

.item-card__actions {
  min-width: 44px;
}

.item-card__utility-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: auto;
  padding-top: 2px;
}

.item-more-button {
  display: none;
}

.item-edit-button,
.item-delete-button {
  min-width: 0;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #81776d;
  font-size: 0.72rem;
}

.item-delete-button {
  color: #a65445;
}

.item-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.item-card__names {
  min-width: 0;
}

.item-card__name-zh {
  font-size: 1.08rem;
}

.item-card__name-en {
  font-size: 0.83rem;
}

.item-card__price {
  width: fit-content;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: #9d392b;
  font-size: 0.96rem;
  text-align: left;
}

.item-card__description {
  display: -webkit-box;
  overflow: hidden;
  color: #625950;
  font-size: 0.86rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.tag-list {
  gap: 5px;
  margin-top: 0;
}

.tag-pill {
  min-height: 23px;
  padding: 3px 7px;
  font-size: 0.68rem;
}

.item-order-control {
  display: inline-flex;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: flex-end;
}

.item-order-control--selected {
  min-width: 106px;
  padding: 4px;
  gap: 5px;
  border: 1px solid rgba(35, 111, 93, 0.2);
  border-radius: 999px;
  background: #edf7f2;
}

.item-order-control--pulse {
  animation: order-control-pop 260ms cubic-bezier(0.2, 1.45, 0.4, 1);
}

.item-order-control__button {
  display: inline-flex;
  width: 30px;
  height: 30px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #236f5d;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(38, 52, 45, 0.09);
  transition:
    background-color 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.item-order-control__button:hover,
.item-order-control__button:focus-visible {
  background: #236f5d;
  color: #ffffff;
  transform: scale(1.05);
}

.item-order-control__quantity {
  min-width: 22px;
  color: #183e33;
  font-size: 0.86rem;
  font-weight: 900;
  text-align: center;
}

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

@media (max-width: 1180px) and (min-width: 981px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr) 330px;
  }

  .menu-browser {
    grid-template-columns: 142px minmax(0, 1fr);
    gap: 18px;
  }

  .menu-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: 100%;
  }

  .menu-column {
    width: 100%;
  }

  .upload-panel--compact {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    width: calc(100% - 24px);
    padding: 10px 0 2px;
  }

  .upload-panel--compact .upload-panel__controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    margin: 0;
  }

  .upload-panel--compact:not(.upload-panel--has-files) .upload-actions {
    display: none;
  }

  .upload-panel--compact .upload-status {
    grid-column: 1 / -1;
  }

  .menu-header,
  .quality-panel {
    width: calc(100% - 32px);
    margin-right: auto;
    margin-left: auto;
  }

  .menu-header {
    padding: 30px 0 22px;
  }

  .menu-browser {
    grid-template-columns: 94px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    border-top: 1px solid rgba(29, 26, 22, 0.09);
    background: #ffffff;
  }

  .category-nav {
    top: 0;
    width: 94px;
    max-height: 100vh;
    padding: 6px;
    border: 0;
    border-right: 1px solid rgba(29, 26, 22, 0.08);
    border-radius: 0;
    background: #f1f2ef;
    box-shadow: none;
    backdrop-filter: none;
  }

  .category-nav__link {
    min-height: 66px;
    padding: 9px 7px 9px 10px;
    grid-template-columns: 1fr;
    gap: 3px;
    border-radius: 5px;
    text-align: center;
  }

  .category-nav__link::before {
    top: 10px;
    bottom: 10px;
  }

  .category-nav__name-zh {
    font-size: 0.78rem;
  }

  .category-nav__name-en {
    font-size: 0.59rem;
  }

  .category-nav__count {
    display: none;
  }

  .menu-page {
    padding: 0 0 88px;
    background: #ffffff;
    touch-action: pan-y;
  }

  .category-section,
  .category-section:first-child {
    padding: 18px 12px 24px;
    scroll-margin-top: 8px;
  }

  .category-section + .category-section {
    border-top-width: 7px;
  }

  .category-section__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 2px 8px;
    align-items: center;
    margin-bottom: 10px;
  }

  .category-section__title {
    grid-column: 1;
    font-size: 1.16rem;
  }

  .category-section__subtitle {
    grid-column: 1;
    margin: 0;
    font-size: 0.7rem;
  }

  .category-add-item-button {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 30px;
    min-width: 30px;
    height: 30px;
    margin: 0;
  }

  .menu-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .item-card,
  .item-card--compact {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 0;
    padding: 14px 0;
    gap: 10px;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: none;
  }

  .item-card:last-child {
    border-bottom: 0;
  }

  .item-card__actions {
    display: grid;
    align-content: start;
    justify-items: end;
  }

  .item-card__header {
    display: grid;
  }

  .item-card__price {
    margin-top: 1px;
  }

  .item-card__description {
    -webkit-line-clamp: 2;
  }

  .item-card__utility-actions {
    display: none;
    padding-top: 4px;
  }

  .item-card--utilities-open .item-card__utility-actions {
    display: flex;
  }

  .item-more-button {
    display: inline-flex;
    width: 38px;
    height: 28px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #81776d;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1;
  }

  .item-order-control--selected {
    min-width: 92px;
  }
}

@media (max-width: 520px) {
  .menu-header__title {
    font-size: 2.25rem;
  }

  .menu-header__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .menu-header__stat {
    min-width: 0;
  }

  .quality-panel {
    padding: 12px;
  }

  .menu-browser {
    grid-template-columns: 82px minmax(0, 1fr);
  }

  .category-nav {
    width: 82px;
    padding: 5px;
  }

  .category-nav__link {
    min-height: 62px;
    padding: 8px 5px 8px 8px;
  }

  .category-nav__name-zh {
    font-size: 0.73rem;
  }

  .category-nav__name-en {
    font-size: 0.56rem;
  }

  .category-section,
  .category-section:first-child {
    padding-right: 10px;
    padding-left: 10px;
  }

  .item-card__name-zh {
    font-size: 0.98rem;
  }

  .item-card__name-en,
  .item-card__description {
    font-size: 0.76rem;
  }

  .tag-list {
    display: none;
  }

  .item-card__details {
    font-size: 0.7rem;
  }

  .item-order-control--selected {
    min-width: 84px;
    gap: 3px;
  }

  .item-order-control__button {
    width: 27px;
    height: 27px;
  }
}

@keyframes item-card-reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes order-control-pop {
  0% {
    transform: scale(1);
  }

  55% {
    transform: scale(1.08);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes panel-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cart-column--open .cart-panel {
  animation: panel-rise 220ms ease-out;
}

.modal-overlay {
  animation: overlay-fade 200ms ease-out;
}

@keyframes overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes copy-fade {
  0%, 60% { opacity: 1; }
  100% { opacity: 0; }
}

/* Press-down effect for actual interactive controls only */
button:not(:disabled):active,
.file-picker:active,
.history-item__load:active {
  transform: scale(0.95) !important;
  transition: transform 100ms ease !important;
}

/* Stronger press feedback on mobile/touch devices */
@media (hover: none) and (pointer: coarse) {
  button:not(:disabled):active,
  .file-picker:active,
  .history-item__load:active {
    transform: scale(0.93) !important;
  }
}
button:not(:disabled),
.file-picker,
.history-item__load {
  transition: transform 120ms ease, background-color 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .menu-animations-ready .item-card {
    opacity: 1;
    transform: none;
  }
}
