:root {
  --subway-green-light: #00843D;
  --accent-purple: #6a0dad;
  --ios-green-btn: #2fa84f;
  --ios-green-on: #f3fff7;
  --kcal-muted: #71757d;
  --glass-bg: rgba(246,247,249,0.84);
  --glass-border: rgba(203,206,213,0.62);
  --glass-highlight: rgba(255,255,255,0.62);
  --glass-shadow: 0 18px 34px rgba(34,36,42,0.16);
  --glass-blur: 16px;
  --glass-sat: 135%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  background:
    radial-gradient(130% 140% at 10% -18%, rgba(255,255,255,0.98) 0%, rgba(242,245,250,0.9) 40%, rgba(223,229,238,0.86) 100%),
    radial-gradient(95% 84% at 86% 108%, rgba(186,196,214,0.22) 0%, rgba(186,196,214,0) 70%),
    linear-gradient(180deg, #f3f6fb 0%, #dde3ec 100%);
  margin: 0;
  padding: 14px 20px 20px;
  color: #161b24;
  line-height: 1.45;
  padding-bottom: calc(180px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
  touch-action: manipulation;
  overscroll-behavior-y: contain;
}

.logo {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, system-ui;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  -webkit-font-smoothing: antialiased;
}

.logo .sub {
  color: #FFC20E;
  letter-spacing: -1px;
}

.logo .way {
  color: #00843D;
  letter-spacing: -1px;
}

.logo .title-sub {
  font-size: 18px;
  color: #596174;
  letter-spacing: 0;
  font-weight: 500;
  margin-left: 10px;
  transform: translateY(-1px);
}

.top-actions {
  position: fixed;
  top: calc(6px + env(safe-area-inset-top));
  right: 14px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
  margin: 0;
}

.reset-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 0;
  margin-bottom: 10px;
}

.icon-symbol-btn {
  border: none;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
  width: auto;
  height: auto;
  padding: 0 2px;
  color: #656a73;
  font-size: 30px;
  line-height: 1;
  font-weight: 420;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.icon-symbol-btn:hover {
  color: #4f545f;
  transform: translateY(-1px);
  filter: none;
}

.icon-symbol-btn:active {
  transform: translateY(0);
}

.reset-btn {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 999px;
  border: none;
  background: rgba(131,136,145,0.42);
  color: #ffffff;
  font-size: 19px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.reset-btn:hover {
  color: #ffffff;
  background: rgba(121,126,136,0.5);
}

.reset-btn:active {
  background: rgba(109,115,126,0.56);
}

.reset-btn.animating {
  animation: resetBtnSpin 0.38s cubic-bezier(.22,.61,.36,1);
}

.double-meat-label {
  font-size: 13px;
  color: #60697a;
  font-weight: 600;
  line-height: 1.1;
}

.card {
  background: var(--glass-bg);
  border-radius: 28px;
  padding: 20px 18px;
  margin-bottom: 20px;
  box-shadow: var(--glass-shadow), inset 0 1px 0 rgba(255,255,255,0.58);
  border: none;
  position: relative;
  z-index: 0;
  transition: 0.15s ease;
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
}

.card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 28px;
  pointer-events: none;
  background: linear-gradient(180deg, var(--glass-highlight) 0%, rgba(255,255,255,0.14) 50%, rgba(255,255,255,0) 100%);
  opacity: 0.86;
}

/* Lean sections: title outside, only picker rows visible */
.option-section {
  margin-bottom: 20px;
}

.option-section-main {
  margin-bottom: 14px;
}

.section-head {
  margin-bottom: 4px;
}

.section-head-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.section-head-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.section-head-inline {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.section-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

.section-toggle-under {
  margin-top: 6px;
  justify-content: flex-end;
}

.section-picker-top {
  margin-top: 6px;
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  color: rgba(47,51,60,0.92);
  line-height: 1.26;
  letter-spacing: 0.01em;
}

.section-subtitle {
  color: rgba(130,134,142,0.9);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.34;
  letter-spacing: 0.01em;
}

.section-subtitle-inline {
  white-space: nowrap;
}

.section-clear-btn {
  border: none;
  background: transparent;
  color: rgba(122,128,140,0.9);
  font-size: 12px;
  line-height: 1;
  font-weight: 520;
  letter-spacing: 0.01em;
  padding: 2px 0;
  margin-right: 12px;
  transform: translateY(2px);
  cursor: pointer;
  transition: color 0.16s ease, opacity 0.16s ease;
}

.section-clear-btn:hover {
  color: rgba(98,104,116,0.96);
}

.section-clear-btn:active {
  color: rgba(88,94,106,0.96);
}

label {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #1c1c1e;
  display: flex;
  align-items: center;
}

select {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border-radius: 28px;
  border: 1px solid #e5e5ea;
  background: #f9f9f9;
  color: #000;
  font-size: 17px;
  line-height: 1.4;
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  z-index: 1;
  font-weight: 400;
  transition: all 0.15s ease;
  cursor: pointer;
  transform-origin: center;
  -webkit-tap-highlight-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg fill='%238e8e93' height='20' viewBox='0 0 20 20' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M5 7l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
select option {
  font-size: 17px;
}

select:hover {
  background-color: #fff;
  border-color: #d1d1d6;
}
select:active {
  background: #fff;
}

button:hover {
  filter: brightness(1.05);
}
button:active {
  filter: brightness(0.95);
}

select:focus {
  outline: none;
  border-color: var(--ios-green-btn);
  box-shadow: 0 0 0 2px rgba(47,168,79,0.22);
}

select:focus-visible {
  box-shadow: 0 0 0 2px rgba(47,168,79,0.22);
}

.picker-field {
  padding: 12px 12px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.44);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.26) 0%, rgba(230,236,245,0.16) 100%),
    radial-gradient(125% 125% at 8% -20%, rgba(255,255,255,0.68) 0%, rgba(255,255,255,0) 62%);
  color: rgba(40,49,63,0.92);
  font-size: 17px;
  line-height: 1.3;
  min-height: 48px;
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(22px) saturate(146%);
  -webkit-backdrop-filter: blur(22px) saturate(146%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
}

.picker-field:not(.picker-field--plus) {
  padding-right: 12px;
}

.picker-field:not(.picker-field--plus)::after {
  content: none;
}

.picker-field-with-minus::after {
  content: none !important;
}

.picker-field::before {
  content: none;
}

.picker-field-fill {
  flex: 1;
}

.picker-field--placeholder {
  color: rgba(123,131,146,0.9);
}

.picker-field--plus {
  justify-content: center;
  text-align: center;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0;
  color: rgba(136,145,160,0.9);
}

.picker-zh-line {
  display: block;
  line-height: 1.28;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker-en-break {
  display: block;
  margin-top: 3px;
  line-height: 1.28;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(94,103,119,0.88);
  font-size: 0.9em;
}

.picker-zh-inline {
  line-height: 1.28;
  letter-spacing: 0.005em;
}

.picker-en-inline {
  color: rgba(94,103,119,0.88);
  font-size: 0.82em;
  margin-left: 10px;
  letter-spacing: 0.01em;
  line-height: 1.28;
  display: inline-block;
  transform: translateY(0.6px);
}

.picker-field.picker-field--bilingual-break {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
}

.picker-field.picker-field--plus {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.26) 0%, rgba(230,236,245,0.16) 100%),
    radial-gradient(125% 125% at 8% -20%, rgba(255,255,255,0.68) 0%, rgba(255,255,255,0) 62%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
}

.modal-search-input {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 6px 0 10px;
  padding: 10px 12px 10px 44px;
  border-radius: 28px;
  border: 1px solid rgba(170,174,182,0.56);
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='11' cy='11' r='6.5' stroke='%236a6f78' stroke-width='2.8' fill='none'/><line x1='15.7' y1='15.7' x2='20.2' y2='20.2' stroke='%236a6f78' stroke-width='2.8' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 18px 18px;
  color: #232933;
  font-size: 16px;
  outline: none;
  backdrop-filter: blur(12px) saturate(130%);
  -webkit-backdrop-filter: blur(12px) saturate(130%);
}

.modal-search-input:focus {
  border-color: rgba(188,192,199,0.72);
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
}

.modal-item-title {
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.005em;
}

.modal-item-title.modal-title-break {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.modal-zh-inline {
  color: inherit;
  line-height: 1.28;
}

.modal-panel-title {
  font-size: 16px;
  font-weight: 650;
  line-height: 1.3;
  margin-bottom: 8px;
  color: rgba(98,104,116,0.9);
}

.modal-en-inline {
  color: inherit;
  margin-left: 4px;
  font-size: 0.88em;
  letter-spacing: 0;
  line-height: 1.3;
  display: inline-block;
  transform: translateY(0.5px);
}

.modal-en-break {
  display: block;
  color: inherit;
  font-size: 0.88em;
  line-height: 1.3;
  letter-spacing: 0.01em;
  margin-top: 2px;
}

.item-efficiency {
  font-size: 11px;
  color: var(--kcal-muted);
}

.modal-recent-hint {
  font-size: 10px;
  color: #74809a;
  padding: 6px 12px 6px;
  letter-spacing: 0.2px;
  line-height: 1;
}

.modal-recent-shortcuts {
  padding: 4px 12px 10px;
  border-bottom: 1px solid #e7e8ed;
  margin-bottom: 2px;
}

.modal-recent-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.modal-recent-row::-webkit-scrollbar {
  display: none;
}

.modal-recent-btn {
  border: 1px solid rgba(47,168,79,0.35);
  background: rgba(47,168,79,0.1);
  color: #1f8f44;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  white-space: nowrap;
}

.swipe-hint {
  font-size: 11px;
  color: #768198;
  margin-top: 6px;
  margin-bottom: 2px;
}

.minus-btn {
  border: 1px solid rgba(199,58,51,0.3);
  background: rgba(199,58,51,0.12);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: #c73a33;
  transition: all 0.15s ease;
  opacity: 0.9;
}

.picker-row-with-minus {
  position: relative;
  display: block;
}

.picker-row-with-minus .minus-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.picker-row-with-minus.swiped .minus-btn {
  opacity: 1;
  pointer-events: auto;
}

.picker-row-with-minus:hover .minus-btn,
.picker-row-with-minus:focus-within .minus-btn {
  opacity: 1;
  pointer-events: auto;
}

.picker-field-with-minus {
  padding-right: 12px;
  transition: transform 0.2s ease;
}

.picker-select-flash {
  animation: pickerSelectFlash 0.26s cubic-bezier(.22,.61,.36,1);
}

.picker-soft-appear {
  animation: pickerSoftAppear 0.24s cubic-bezier(.22,.61,.36,1);
}

.picker-row-with-minus.row-enter {
  animation: rowEnterPop 0.28s cubic-bezier(.2,.7,.2,1);
}

@keyframes pickerSelectFlash {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(95,211,125,0);
  }
  45% {
    transform: scale(0.995);
    box-shadow: 0 0 0 3px rgba(95,211,125,0.16);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(95,211,125,0);
  }
}

@keyframes pickerSoftAppear {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(0.995);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rowEnterPop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.986);
    filter: saturate(0.96);
  }
  65% {
    opacity: 1;
    transform: translateY(-1px) scale(1.003);
    filter: saturate(1.02);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: none;
  }
}

.picker-row-with-minus.removing,
.swipe-row.removing {
  pointer-events: none;
  will-change: transform, opacity;
  animation: rowDeleteOut 0.34s cubic-bezier(.20,.72,.28,1) forwards;
}

.picker-row-with-minus.removing .picker-field,
.swipe-row.removing .picker-field {
  opacity: 0.9;
  will-change: transform, opacity, filter;
  animation: deletePopField 0.34s cubic-bezier(.20,.72,.28,1) forwards;
}

.picker-row-with-minus.removing .minus-btn,
.swipe-row.removing .swipe-clear-btn {
  opacity: 0;
  transition: opacity 0.18s ease;
}

.swipe-row {
  position: relative;
}

.swipe-row .picker-field {
  transition: transform 0.2s ease;
  touch-action: pan-y;
}

.swipe-row.swipe-dragging .picker-field {
  transition: none;
}

body.swipe-dragging {
  user-select: none;
  -webkit-user-select: none;
  cursor: grabbing;
}

.swipe-clear-btn {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  transform: translateX(-10px);
  width: 56px;
  height: 100%;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.44);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(230,236,245,0.18) 100%),
    radial-gradient(120% 120% at 8% -20%, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 62%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.62);
  color: rgba(52,60,73,0.92);
  font-size: 17px;
  font-weight: 420;
  letter-spacing: 0.005em;
  backdrop-filter: blur(22px) saturate(146%);
  -webkit-backdrop-filter: blur(22px) saturate(146%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, width 0.18s ease, transform 0.18s ease;
  z-index: 2;
  overflow: hidden;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  --clearLabelOpacity: 0;
  color: rgba(52,60,73,var(--clearLabelOpacity));
}

.swipe-row.swipe-dragging .swipe-clear-btn {
  transition: none;
}

.swipe-row.swiped .swipe-clear-btn {
  opacity: 1;
  pointer-events: auto;
}

@media (hover: hover) and (pointer: fine) {
  .swipe-hint {
    display: none !important;
  }
}

/* First sauce row clear animation (without removing DOM node) */
.picker-field.main-removing,
.picker-field.sauce-main-removing {
  animation: sauceMainClearOut 0.18s cubic-bezier(.22,.61,.36,1);
}

@keyframes sauceMainClearOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0.56;
    transform: translateX(-10px) scale(0.992);
  }
}

@keyframes rowDeleteOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  35% {
    opacity: 0.92;
    transform: translateX(-16px) scale(0.998);
  }
  100% {
    opacity: 0;
    transform: translateX(-72px) scale(0.99);
  }
}

@keyframes deletePopField {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: saturate(1);
  }
  45% {
    opacity: 0.78;
    transform: translateX(-8px) scale(0.998);
    filter: saturate(0.95);
  }
  100% {
    opacity: 0.38;
    transform: translateX(-14px) scale(0.995);
    filter: saturate(0.88);
  }
}

#addonList .addon-row .picker-field {
  margin-top: 0;
  font-weight: 400;
  position: relative;
  z-index: 1;
}

.footer-detail {
  font-size: 10.5px;
  color: #6c7589;
  line-height: 1.68;
  letter-spacing: 0.15px;
  margin-top: 8px;
}

.footer-detail-static {
  margin-top: 18px;
  padding: 0 2px 4px;
}

.footer-line,
.footer-links,
.footer-subline,
.footer-version {
  margin: 0;
}

.footer-line {
  font-weight: 520;
}

.footer-line + .footer-line,
.footer-line + .footer-links,
.footer-links + .footer-subline,
.footer-subline + .footer-version {
  margin-top: 8px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.3;
}

.footer-links + .footer-version {
  margin-top: 14px;
}

.footer-link-sep {
  color: #7a8498;
  font-size: 11px;
}

.footer-subline {
  font-size: 10.5px;
  color: #738098;
}

.footer-version {
  font-size: 10px;
  color: #77829a;
  letter-spacing: 0.2px;
}

.footer-inline-link {
  color: #2fa84f;
  text-decoration: none;
  font-weight: 580;
}

.result {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 9999;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.28) 0%, rgba(229,235,244,0.18) 100%),
    radial-gradient(125% 125% at 8% -20%, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 62%);
  padding: 18px;
  border-radius: 28px;
  font-size: 18px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.64);
  color: rgba(36,45,59,0.94);
  border: 1px solid rgba(255,255,255,0.48);
  backdrop-filter: blur(22px) saturate(146%);
  -webkit-backdrop-filter: blur(22px) saturate(146%);
  transition: box-shadow 0.2s ease;
  overflow: hidden;
  margin-bottom: 10px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, box-shadow 0.2s ease;
}

.result.active {
  transform: none;
  opacity: 1;
}

.result.pop {
  animation: resultPopIn 0.34s cubic-bezier(.22,.61,.36,1);
}

@keyframes resultPopIn {
  0% {
    transform: translateY(14px) scale(0.97);
    opacity: 0.45;
  }
  65% {
    transform: translateY(-3px) scale(1.01);
    opacity: 1;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}
button {
  -webkit-tap-highlight-color: transparent;
}

button:active {
  transition: none;
}
.result::before {
  /* removed decorative gradient overlay */
}

/* .result.update removed */

.result strong {
  font-size: 20px;
  color: var(--subway-green-light);
}

.result-copy-btn {
  border: none;
  background: rgba(131,136,145,0.42);
  color: #ffffff;
  border-radius: 999px;
  line-height: 1;
  width: 46px;
  height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: none;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.result-copy-btn:hover {
  background: rgba(121,126,136,0.5);
}

.result-copy-btn:active {
  transform: scale(0.96);
}

.copy-icon-stack {
  position: relative;
  width: 20px;
  height: 20px;
  display: block;
  transform: translateY(0.2px);
  opacity: 1;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.copy-icon-stack svg {
  width: 100%;
  height: 100%;
  display: block;
}

.copy-icon-check {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  line-height: 1;
  font-weight: 360;
  opacity: 0;
  transform: translateY(0.2px) scale(0.76);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.result-copy-btn.copied .copy-icon-stack {
  opacity: 0;
  transform: scale(0.76);
}

.result-copy-btn.copied .copy-icon-check {
  opacity: 1;
  transform: scale(1);
}

.result-detail-btn {
  border: none;
  background: transparent;
  color: #66738c;
  border-radius: 0;
  min-width: 20px;
  height: 20px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease, transform 0.2s ease;
}

.result-detail-icon {
  font-size: 15px;
  line-height: 1;
  display: inline-block;
  transform: translateY(-1px) rotate(0deg);
  transition: transform 0.22s cubic-bezier(.22,.61,.36,1);
}

.result-detail-btn.expanded .result-detail-icon {
  transform: translateY(-1px) rotate(180deg);
}

.modal-checkmark {
  color: var(--ios-green-btn);
  font-size: 14px;
  font-weight: 800;
  min-width: 14px;
  text-align: center;
  flex: 0 0 14px;
}

.modal-item-meta-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 92px;
}

.modal-item-meta-wrap--efficiency {
  min-width: 108px;
}

.modal-item-kcal {
  font-size: 12px;
  color: var(--kcal-muted);
  white-space: nowrap;
  text-align: right;
  line-height: 1.2;
}

.modal-item-kcal--efficiency {
  white-space: nowrap;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: calc(110px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(8px);
  background: rgba(28,30,36,0.92);
  color: #f7f8fb;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 11000;
}

#mainModal,
#addonModal,
#sauceModal,
#quickSearchModal {
  background: rgba(34,36,41,0.24) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#mainModal > div,
#addonModal > div,
#sauceModal > div,
#quickSearchModal > div {
  background: rgba(246,247,249,0.9) !important;
  color: #1b2230 !important;
  box-shadow: 0 -18px 40px rgba(25,27,33,0.2), inset 0 1px 0 rgba(255,255,255,0.85);
  border-top-left-radius: 28px !important;
  border-top-right-radius: 28px !important;
  border: 1px solid rgba(190,194,203,0.7);
  border-bottom: none;
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
}

#mainCategoriesWrapper,
#addonCategoriesWrapper {
  background: transparent !important;
}

#mainItems > div,
#addonItems > div,
#sauceItems > div,
#quickSearchItems > div {
  border-bottom: 1px solid rgba(181,185,194,0.28) !important;
}

#mainItems,
#addonItems,
#sauceItems,
#quickSearchItems {
  overflow-x: hidden !important;
}

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

body.resetting .card {
  animation: resetCardBounce 0.34s cubic-bezier(.22,.61,.36,1);
}

body.resetting .option-section {
  animation: resetCardBounce 0.34s cubic-bezier(.22,.61,.36,1);
}

@keyframes resetCardBounce {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  45% { transform: translateY(6px) scale(0.992); opacity: 0.88; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes resetBtnSpin {
  0% { transform: rotate(0deg) scale(1); }
  45% { transform: rotate(-24deg) scale(0.95); }
  100% { transform: rotate(0deg) scale(1); }
}
/* iOS style switch */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 54px;
  height: 26px;
  background: #cfd1d7;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
  outline: none;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.35);
}

input[type="checkbox"]::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 22px;
  background: #fff;
  border-radius: 999px;
  top: 1px;
  left: 1px;
  transition: transform 0.24s cubic-bezier(.22,.61,.36,1), box-shadow 0.24s ease;
  box-shadow: none;
}

input[type="checkbox"]:checked {
  background: var(--ios-green-btn);
  animation: toggleTrackPop 0.22s cubic-bezier(.22,.61,.36,1);
}

input[type="checkbox"]:checked::after {
  transform: translateX(20px);
  box-shadow: none;
}

input[type="checkbox"]:active::after {
  transform: scale(1.04);
}

input[type="checkbox"]:active {
  transform: scale(0.985);
}

@keyframes toggleTrackPop {
  0% { transform: scale(1); }
  55% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

#sauce2Container {
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s ease;
}
#sauce2Container.show {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-color-scheme: dark) {
  body {
    background:
      radial-gradient(120% 130% at 14% -22%, #2f3034 0%, #23262c 40%, #1b1e24 100%),
      radial-gradient(88% 75% at 86% 108%, rgba(44,66,110,0.22) 0%, rgba(44,66,110,0) 68%),
      linear-gradient(180deg, #2a2d33 0%, #1b1f26 100%);
    color: #fff;
    --kcal-muted: #969ba4;
    --glass-bg: rgba(46,48,54,0.64);
    --glass-border: rgba(172,176,185,0.2);
    --glass-highlight: rgba(255,255,255,0.08);
    --glass-shadow: 0 18px 34px rgba(8,9,12,0.32);
    --glass-blur: 22px;
    --glass-sat: 150%;
  }

  .card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  }

  select {
    background: #34363d;
    color: #fff;
    border: 1px solid #4a4d56;
  }

  select:hover {
    background: #3a3d45;
  }

  .result {
    background: linear-gradient(180deg, rgba(95,98,104,0.44) 0%, rgba(73,76,82,0.4) 100%);
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 28px;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    backdrop-filter: blur(24px) saturate(155%);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
  }

  label {
    color: #f2f2f7;
  }

  .section-title {
    color: rgba(242,242,247,0.94);
  }

  .section-subtitle {
    color: rgba(159,165,178,0.88);
  }

  .section-clear-btn {
    color: rgba(165,171,183,0.92);
  }

  .section-clear-btn:hover {
    color: rgba(190,196,208,0.96);
  }

  .section-clear-btn:active {
    color: rgba(176,182,194,0.96);
  }

  .logo .title-sub {
    color: #aaa;
  }

  .reset-btn {
    background: rgba(118,120,125,0.48);
    color: #f4f4f2;
    box-shadow: none;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .reset-btn:hover {
    background: rgba(132,134,139,0.56);
    color: #f4f4f2;
  }

  .reset-btn:active {
    background: rgba(106,108,113,0.58);
    color: #f4f4f2;
  }

  .icon-symbol-btn {
    color: #c8cad1;
  }

  .icon-symbol-btn:hover {
    color: #eceef2;
  }

  .double-meat-label {
    color: #b8bbc3;
  }

  input[type="checkbox"] {
    background: #5a5d66;
    border-color: rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.06);
  }

  input[type="checkbox"]::after {
    background: #fff;
  }

  #mainModal > div,
  #addonModal > div,
  #sauceModal > div,
  #quickSearchModal > div {
    background: rgba(40,42,48,0.78) !important;
    color: #f2f2f7 !important;
    box-shadow: 0 -14px 38px rgba(0,0,0,0.36);
    border-top-left-radius: 28px !important;
    border-top-right-radius: 28px !important;
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
  }

  #mainModal,
  #addonModal,
  #sauceModal,
  #quickSearchModal {
    background: rgba(24,25,29,0.34) !important;
  }

  #mainCategoriesWrapper,
  #addonCategoriesWrapper {
    background: transparent !important;
  }

  #mainItems > div,
  #addonItems > div,
  #sauceItems > div,
  #quickSearchItems > div {
    border-bottom: 1px solid rgba(121,125,133,0.32) !important;
  }

  .picker-field {
    background:
      linear-gradient(180deg, rgba(106,110,118,0.4) 0%, rgba(82,86,95,0.34) 100%),
      radial-gradient(120% 120% at 10% -20%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 62%) !important;
    color: rgba(242,242,247,0.92) !important;
    border: 1px solid rgba(255,255,255,0.16) !important;
    backdrop-filter: blur(24px) saturate(155%);
    -webkit-backdrop-filter: blur(24px) saturate(155%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important;
  }

  .picker-field:not(.picker-field--plus)::after {
    color: rgba(167,172,181,0.86);
  }

  .picker-en-break,
  .picker-en-inline {
    color: rgba(168,174,185,0.9);
    font-size: 0.82em;
    line-height: 1.28;
  }

  .picker-field::before {
    content: none;
  }

  .picker-field--placeholder {
    color: #a2a6af !important;
  }

  .picker-field--plus {
    color: #a2a6af !important;
  }

  .picker-field.picker-field--plus {
    border-color: rgba(255,255,255,0.14) !important;
    background:
      linear-gradient(180deg, rgba(106,110,118,0.4) 0%, rgba(82,86,95,0.34) 100%),
      radial-gradient(120% 120% at 10% -20%, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0) 62%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12) !important;
  }

  .footer-detail {
    color: #969ead;
  }

  .footer-link-sep {
    color: #5a6170;
  }

  .footer-subline {
    color: #8d93a1;
  }

  .footer-version {
    color: #767f91;
  }

  .modal-search-input {
    background-color: transparent;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><circle cx='11' cy='11' r='6.5' stroke='%23f2f2f7' stroke-width='2.8' fill='none'/><line x1='15.7' y1='15.7' x2='20.2' y2='20.2' stroke='%23f2f2f7' stroke-width='2.8' stroke-linecap='round'/></svg>");
    color: #f2f2f7;
    border-color: rgba(171,175,184,0.28);
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 18px 18px;
    backdrop-filter: blur(14px) saturate(150%);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
  }

  .modal-search-input:focus {
    border-color: rgba(184,188,196,0.5);
    box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
  }

  .modal-search-input::placeholder {
    color: #9aa0ad;
  }

  .modal-panel-title {
    color: rgba(170,176,186,0.9);
  }

  .modal-recent-hint {
    color: #9aa0ad;
  }

  .modal-recent-shortcuts {
    border-bottom-color: #2f3440;
  }

  .modal-recent-btn {
    color: #73d892;
    border-color: rgba(95,211,125,0.35);
    background: rgba(95,211,125,0.14);
  }

  .swipe-hint {
    color: #8f96a4;
  }

  .swipe-clear-btn {
    border: 1px solid rgba(255,255,255,0.16);
    background:
      linear-gradient(180deg, rgba(106,110,118,0.4) 0%, rgba(82,86,95,0.34) 100%),
      radial-gradient(120% 120% at 8% -20%, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 62%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
    color: rgba(243,244,246,0.94);
    --clearLabelOpacity: 0;
  }

  .footer-inline-link {
    color: #73d892;
  }


  .result-copy-btn {
    background: rgba(118,120,125,0.48);
    color: #f4f4f2;
    box-shadow: none;
  }

  .result-copy-btn:hover {
    background: rgba(132,134,139,0.56);
  }

  .result-copy-btn:active {
    background: rgba(106,108,113,0.58);
  }

  .result-detail-btn {
    background: transparent;
    border: none;
    color: #a5afbf;
  }

  .minus-btn {
    background: rgba(255,106,97,0.16);
    border-color: rgba(255,106,97,0.34);
    color: #ff7f78;
  }

  .modal-checkmark {
    color: #5ec87a;
  }

  .copy-toast {
    background: rgba(9,10,13,0.95);
    border: 1px solid #3b404b;
    color: #f2f2f7;
  }

  #mainPicker:not(.picker-field--placeholder) {
    color: rgba(255,255,255,0.94) !important;
  }

}
