*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  background: var(--bg-studio);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
textarea,
select {
  font-family: inherit;
  color: inherit;
}

button,
.calc-key,
.tap-value {
  touch-action: manipulation;
}

/* Cross-OS clean number inputs (hide bulky Windows/Firefox spinner arrows inside narrow fields) */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
}

/* Sleek cross-OS scrollbars on Windows/Linux/Firefox */
.app-scroll,
.catalog-list,
.sheet-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--separator-strong) transparent;
  overscroll-behavior-y: contain;
}
.app-scroll::-webkit-scrollbar,
.catalog-list::-webkit-scrollbar,
.sheet-panel::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
.app-scroll::-webkit-scrollbar-track,
.catalog-list::-webkit-scrollbar-track,
.sheet-panel::-webkit-scrollbar-track {
  background: transparent;
}
.app-scroll::-webkit-scrollbar-thumb,
.catalog-list::-webkit-scrollbar-thumb,
.sheet-panel::-webkit-scrollbar-thumb {
  background: var(--separator-strong);
  border-radius: 999px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

/* Desktop Studio Shell */
.studio-wrapper {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 16px 28px;
  gap: 14px;
}

.studio-toolbar {
  width: 100%;
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 16px;
  box-shadow: var(--shadow-card);
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
}

.studio-brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--text-on-accent);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
}

.studio-brand-sub {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 12px;
}

.studio-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-seg {
  display: inline-flex;
  background: var(--bg-pill);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.studio-seg-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.studio-seg-btn.is-active {
  background: var(--bg-pill-active);
  color: var(--text-primary);
  box-shadow: var(--shadow-pill);
}

/* Device Viewport Frame */
.device-frame {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: min(860px, calc(100vh - 104px));
  height: min(860px, calc(100dvh - 104px));
  min-height: 640px;
  background: var(--bg-app);
  border-radius: 44px;
  border: 8px solid var(--device-bezel);
  box-shadow: var(--shadow-device);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: max-width 360ms var(--spring-ease), border-radius 360ms var(--spring-ease);
}

.device-frame.is-wide {
  max-width: 960px;
  border-radius: 24px;
  border-width: 1px;
  border-color: var(--separator);
  height: auto;
  min-height: calc(100vh - 110px);
  min-height: calc(100dvh - 110px);
}

.dynamic-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 112px;
  height: 28px;
  background: #000000;
  border-radius: 20px;
  z-index: 40;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.device-frame.is-wide .dynamic-island {
  display: none;
}

/* App Top Header */
.app-header {
  padding: 46px 16px 10px;
  background: var(--bg-app);
  border-bottom: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 10;
}

.device-frame.is-wide .app-header {
  padding-top: 16px;
}

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

.dish-picker-group {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: stretch;
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 14px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.dish-picker-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 8px 8px 8px 11px;
  cursor: pointer;
  text-align: left;
  transition: transform 140ms var(--spring-snappy), background 140ms ease;
}

.dish-picker-btn:active {
  transform: scale(0.985);
}

.dish-rename-btn {
  width: 34px;
  border: none;
  border-left: 1px solid var(--separator);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 140ms ease, background 140ms ease, transform 140ms var(--spring-snappy);
}

@media (hover: hover) and (pointer: fine) {
  .dish-rename-btn:hover {
    color: var(--accent);
    background: var(--accent-soft);
  }
}

.dish-rename-btn:active {
  transform: scale(0.9);
}

.dish-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 7px;
  border-radius: 7px;
  flex-shrink: 0;
}

.dish-picker-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.dish-picker-chevron {
  color: var(--text-tertiary);
  font-size: 12px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: var(--bg-surface);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
  transition: transform 140ms var(--spring-snappy), background 140ms ease;
}

.icon-btn:active {
  transform: scale(0.92);
}

.icon-btn.is-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}

.sbornik-header-btn {
  height: 38px;
  padding: 0 11px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: var(--bg-surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: var(--shadow-card);
  transition: transform 140ms var(--spring-snappy), border-color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .sbornik-header-btn:hover {
    border-color: var(--accent);
  }
}

.sbornik-header-btn:active {
  transform: scale(0.93);
}

/* Morphing Segmented Tabs */
.mode-switcher {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--bg-pill);
  border-radius: 13px;
  padding: 3px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.mode-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc((100% - 6px) / 5);
  height: calc(100% - 6px);
  background: var(--bg-pill-active);
  border-radius: 10px;
  box-shadow: var(--shadow-pill);
  transition: transform 340ms var(--spring-ease), box-shadow 180ms ease;
  pointer-events: none;
  will-change: transform;
}

.mode-indicator.is-dragging {
  transition: box-shadow 120ms ease;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.mode-tab-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 7px 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 10px;
  transition: color 200ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tab-alert-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

.tab-alert-dot.is-expired {
  background: var(--red);
}

.mode-tab-btn.is-active {
  color: var(--text-primary);
}

/* Main Scroll Area */
.app-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px 16px 92px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  -webkit-overflow-scrolling: touch;
}

/* Calculator Hero Display */
.hero-card {
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 24px;
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-top-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hero-main-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.hero-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.hero-value-btn {
  border: 1px dashed transparent;
  background: transparent;
  padding: 2px 6px 2px 0;
  margin-left: -2px;
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

@media (hover: hover) and (pointer: fine) {
  .hero-value-btn:hover {
    border-color: var(--separator-strong);
  }
}

.hero-big-num {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-primary);
}

.hero-sub-hint {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Portion Stepper Capsule */
.portion-capsule {
  display: inline-flex;
  align-items: center;
  background: var(--bg-app);
  border: 1px solid var(--separator);
  border-radius: 16px;
  padding: 3px;
  gap: 2px;
  flex-shrink: 0;
}

.portion-step-btn {
  width: 30px;
  height: 32px;
  border: none;
  border-radius: 12px;
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.portion-step-btn:active {
  transform: scale(0.9);
}

.portion-count-btn {
  border: none;
  background: transparent;
  padding: 4px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.portion-count-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}

.portion-count-lbl {
  font-size: 10px;
  color: var(--text-tertiary);
  font-weight: 600;
}

/* Hero Metric Grid */
.hero-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric-tile {
  background: var(--bg-app);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
}

.metric-tile.is-clickable {
  cursor: pointer;
}

.metric-tile-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.metric-tile-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.metric-tile-val.is-good { color: var(--green); }
.metric-tile-val.is-warn { color: var(--amber); }
.metric-tile-val.is-bad  { color: var(--red); }
.metric-tile-val.is-accent { color: var(--accent); }

/* KBZHU Strip */
.kbzhu-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--separator);
}

.kbzhu-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.kbzhu-pill {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-chip);
  padding: 4px 8px;
  border-radius: 8px;
}

.kbzhu-pill strong {
  color: var(--text-primary);
}

.kbzhu-toggle {
  border: none;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

/* Ingredient Section */
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

.section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
}

.add-ing-btn {
  border: none;
  background: var(--accent);
  color: var(--text-on-accent);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 10px rgba(255, 107, 0, 0.25);
  transition: transform 140ms var(--spring-snappy);
}

.add-ing-btn:active {
  transform: scale(0.94);
}

.ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.ing-card {
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ing-top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.ing-title-wrap {
  min-width: 0;
  flex: 1;
}

.ing-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.25;
}

.ing-sub-flow {
  margin-top: 3px;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ing-actions-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.value-pill {
  border: 1px solid var(--separator);
  background: var(--bg-app);
  border-radius: 11px;
  padding: 6px 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.value-pill.is-accent {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
}

.ing-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.loss-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.loss-chip {
  border: 1px solid var(--separator);
  background: var(--bg-surface-secondary);
  border-radius: 8px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.loss-chip.is-swell {
  color: var(--green);
  background: var(--green-soft);
  border-color: transparent;
}

.ing-delete-btn {
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 7px;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .ing-delete-btn:hover {
    color: var(--red);
    background: var(--red-soft);
  }
}

.share-bar-track {
  width: 100%;
  height: 4px;
  background: var(--bg-pill);
  border-radius: 999px;
  overflow: hidden;
}

.share-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

/* Technology Tab */
.tech-card {
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 20px;
  padding: 15px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
  display: block;
}

.ios-input,
.ios-textarea,
.ios-select {
  width: 100%;
  background: var(--bg-app);
  border: 1px solid var(--separator);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 160ms ease;
}

.ios-input:focus,
.ios-textarea:focus,
.ios-select:focus {
  border-color: var(--accent);
}

.ios-textarea {
  min-height: 70px;
  resize: vertical;
  line-height: 1.4;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 18px;
  padding: 12px 13px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.step-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.step-card-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.step-photo-add-btn {
  border: 1px dashed var(--separator-strong);
  background: var(--bg-app);
  color: var(--text-secondary);
  border-radius: 13px;
  padding: 9px 12px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color 150ms ease, color 150ms ease, transform 140ms var(--spring-snappy);
}

@media (hover: hover) and (pointer: fine) {
  .step-photo-add-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
  }
}

.step-photo-add-btn:active {
  transform: scale(0.97);
}

.step-photo-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--separator);
  background: var(--bg-app);
}

.step-photo-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  cursor: zoom-in;
}

.step-photo-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 9px;
  background: var(--bg-surface-secondary);
  border-top: 1px solid var(--separator);
  font-size: 11.5px;
}

.lightbox-overlay {
  position: absolute;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  gap: 12px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 76%;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #FFFFFF;
  font-size: 13px;
  text-align: center;
  max-width: 90%;
  line-height: 1.35;
}

/* Official GOST / OP-1 Printable Blank */
.blank-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.blank-sheet {
  background: #FFFFFF;
  color: #111111;
  border-radius: 16px;
  padding: 18px 16px;
  border: 1px solid var(--separator);
  box-shadow: var(--shadow-card);
  font-size: 11px;
  line-height: 1.38;
}

.blank-header-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 10px;
  color: #444;
}

.blank-title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  margin: 6px 0 4px;
  text-transform: uppercase;
}

.blank-subtitle {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.blank-table-wrap {
  overflow-x: auto;
  margin: 10px 0;
}

.blank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10.5px;
}

.blank-table th,
.blank-table td {
  border: 1px solid #333;
  padding: 4px 6px;
  vertical-align: top;
}

.blank-table th {
  background: #F4F4F6;
  font-weight: 700;
  text-align: center;
}

.blank-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.blank-section-h {
  font-size: 11px;
  font-weight: 700;
  margin: 11px 0 4px;
  text-transform: uppercase;
}

.gost-top-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 10px;
}

.gost-org-block {
  font-size: 10.5px;
  line-height: 1.35;
}

.gost-approval-stamp {
  border: 1px solid #222222;
  padding: 7px 10px;
  font-size: 10px;
  line-height: 1.35;
  text-align: left;
  break-inside: avoid;
}

.gost-sub-h {
  font-size: 10.5px;
  font-weight: 700;
  margin: 6px 0 3px;
}

.blank-signs {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  font-size: 10.5px;
  break-inside: avoid;
}

.blank-sign-line {
  border-top: 1px solid #333;
  padding-top: 3px;
  margin-top: 18px;
  color: #555;
  font-size: 9.5px;
}

/* Modal & Keypad Sheets */
.sheet-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: var(--backdrop-dim);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.device-frame.is-wide .sheet-overlay,
.device-frame.is-wide .lightbox-overlay {
  position: fixed;
  inset: 0;
  align-items: center;
}

.device-frame.is-wide .sheet-panel {
  width: 100%;
  max-width: 520px;
}

.toast-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  bottom: max(24px, calc(16px + env(safe-area-inset-bottom)));
  transform: translateX(-50%);
  z-index: 90;
  background: rgba(28, 28, 30, 0.92);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
}

.sheet-panel {
  background: var(--bg-surface);
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  box-shadow: var(--shadow-sheet);
  padding: 10px 14px 18px;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--separator-strong);
  margin: 0 auto 2px;
  flex-shrink: 0;
}

/* Keypad Specific */
.keypad-panel {
  background: var(--bg-keypad);
}

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

.keypad-title {
  font-size: 14px;
  font-weight: 700;
}

.keypad-close-btn {
  border: none;
  background: var(--bg-chip);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.keypad-screen {
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.keypad-expr {
  font-size: 13px;
  color: var(--text-secondary);
  min-height: 18px;
  text-align: right;
}

.keypad-main-readout {
  font-size: 34px;
  font-weight: 700;
  text-align: right;
  letter-spacing: -0.02em;
  line-height: 1.1;
  word-break: break-all;
}

.keypad-live-preview {
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  text-align: right;
  min-height: 16px;
}

.keypad-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.keypad-chip {
  border: 1px solid var(--separator);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}

.keypad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.calc-key {
  height: 50px;
  border: none;
  border-radius: 15px;
  font-size: 21px;
  font-weight: 600;
  background: var(--key-num);
  color: var(--text-primary);
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.calc-key.is-fn {
  background: var(--key-fn);
  font-size: 17px;
}

.calc-key.is-op {
  background: var(--key-op);
  color: var(--text-on-accent);
  font-size: 22px;
}

.calc-key.is-zero {
  grid-column: span 2;
}

.calc-key.is-done {
  background: var(--green);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 700;
}

/* Loss Adjuster Dual Switch */
.dual-loss-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.dual-loss-tab {
  border: 1px solid var(--separator);
  background: var(--bg-surface);
  border-radius: 12px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.dual-loss-tab.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Catalog / Dish List Items */
.catalog-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 52vh;
  max-height: 52dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.catalog-item {
  border: 1px solid var(--separator);
  background: var(--bg-app);
  border-radius: 14px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

@media (hover: hover) and (pointer: fine) {
  .catalog-item:hover {
    border-color: var(--accent);
  }
}

.pill-btn {
  border: 1px solid var(--separator);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.pill-btn.is-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-on-accent);
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  background: var(--bg-surface);
  border: 1px dashed var(--separator-strong);
  border-radius: 18px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Shelf-Life Status & Printable Kitchen Prep Labels */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
}

.status-pill.is-ok {
  color: var(--green);
  background: var(--green-soft);
}

.status-pill.is-warning {
  color: var(--amber);
  background: var(--amber-soft);
}

.status-pill.is-expired {
  color: var(--red);
  background: var(--red-soft);
}

.share-bar-fill.is-ok {
  background: var(--green);
}

.share-bar-fill.is-warning {
  background: var(--amber);
}

.share-bar-fill.is-expired {
  background: var(--red);
}

.prep-labels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.prep-label-box {
  border: 1.5px dashed #222222;
  border-radius: 10px;
  padding: 10px 12px;
  background: #FFFFFF;
  color: #111111;
  font-size: 11px;
  line-height: 1.35;
  break-inside: avoid;
}

.prep-label-head {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #555555;
  border-bottom: 1px solid #222222;
  padding-bottom: 3px;
  margin-bottom: 5px;
  display: flex;
  justify-content: space-between;
}

.prep-label-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.prep-label-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  border-bottom: 1px dotted #CCCCCC;
}

.prep-label-exp {
  margin-top: 6px;
  padding: 4px 6px;
  background: #F4F4F6;
  border: 1px solid #222222;
  border-radius: 5px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
}

.prep-label-allergens {
  margin-top: 5px;
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid #B45309;
  background: #FFFBEB;
  color: #78350F;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1.25;
}

/* Allergen Badges & Selector */
.allergen-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--separator);
  flex-wrap: wrap;
}

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

.allergen-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--amber-soft);
  color: var(--amber);
}

.allergen-pill.is-clean {
  background: var(--green-soft);
  color: var(--green);
}

.allergen-pill.is-trace {
  background: transparent;
  color: var(--text-secondary);
  border: 1px dashed var(--separator-strong);
  font-weight: 600;
}

.ing-allergen-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--amber-soft);
  color: var(--amber);
}

.allergen-chip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.allergen-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  text-align: left;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--separator);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
}

.allergen-toggle-card.is-active {
  border-color: var(--amber);
  background: var(--amber-soft);
}

.allergen-toggle-card.is-trace-active {
  border-style: dashed;
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Semi-Finished (П/Ф) & Scale Workup Badges */
.pf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--blue-soft);
  color: var(--blue);
  border: 1px solid transparent;
}

button.pf-badge {
  cursor: pointer;
  transition: transform 140ms var(--spring-snappy), border-color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
  button.pf-badge:hover {
    border-color: var(--blue);
  }
}

button.pf-badge:active {
  transform: scale(0.95);
}

.parent-return-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--blue-soft);
  border: 1px solid rgba(0, 122, 255, 0.24);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.workup-grid-card {
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 15px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.workup-inputs-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.workup-result-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 11px;
  padding-top: 6px;
  border-top: 1px dashed var(--separator);
  color: var(--text-secondary);
}

/* Procurement Shopping List */
.proc-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
  margin: 6px 2px 2px;
}

.proc-item-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  padding: 9px 11px;
  border-radius: 13px;
  border: 1px solid var(--separator);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
}

.proc-item-row.is-instock {
  opacity: 0.52;
  background: var(--bg-app);
}

.proc-item-row.is-instock .proc-item-name {
  text-decoration: line-through;
}

.proc-check-box {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid var(--separator-strong);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
}

.proc-item-row.is-instock .proc-check-box {
  background: var(--green);
  border-color: var(--green);
}

/* Delivery Economics & What-If Price Matrix */
.delivery-econ-box {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--bg-app);
  border: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-matrix-card {
  background: var(--bg-surface);
  border: 1px solid var(--separator);
  border-radius: 18px;
  padding: 12px 13px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.price-matrix-head,
.price-matrix-row {
  display: grid;
  grid-template-columns: 1.05fr 0.85fr 1fr 1fr;
  align-items: center;
  gap: 6px;
}

.price-matrix-head {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-tertiary);
  text-transform: uppercase;
  padding: 0 8px 2px;
}

.price-matrix-row {
  width: 100%;
  border: 1px solid var(--separator);
  background: var(--bg-app);
  border-radius: 11px;
  padding: 7px 8px;
  font-size: 12px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: transform 130ms var(--spring-snappy), border-color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .price-matrix-row:hover {
    border-color: var(--accent);
  }
}

.price-matrix-row:active {
  transform: scale(0.98);
}

.price-matrix-row.is-current {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Kitchen Station Mini-TTK («На цех») */
.kitchen-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 10px;
}

.kitchen-plating-photo {
  width: 150px;
  height: 105px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #CCCCCC;
}

.kitchen-kpis {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.kitchen-kpi-pill {
  border: 1px solid #333333;
  background: #F6F6F8;
  border-radius: 7px;
  padding: 3px 8px;
  font-size: 10.5px;
  font-weight: 700;
}

.kitchen-step-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 5px 0;
  border-bottom: 1px dotted #DDDDDD;
}

.kitchen-step-thumb {
  width: 84px;
  height: 56px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid #CCCCCC;
  flex-shrink: 0;
}

/* In-App System Appearance Zone (Visually separated from dish cards & centered) */
.app-footer {
  margin-top: auto;
  padding-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.app-promo-strip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 107, 0, 0.28);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

.app-promo-strip a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.app-footer-divider {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-footer-line {
  flex: 1;
  height: 1px;
  background: var(--separator);
}

.app-footer-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  white-space: nowrap;
}

.app-theme-plate {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  padding: 11px 14px 12px;
  border-radius: 22px;
  background: rgba(120, 120, 128, 0.08);
  border: 1px solid var(--separator);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 9px;
}

.app-footer-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}

.app-theme-seg {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-pill);
  border-radius: 12px;
  padding: 3px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.theme-indicator {
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  height: calc(100% - 6px);
  background: var(--bg-pill-active);
  border-radius: 9px;
  box-shadow: var(--shadow-pill);
  transition: transform 300ms var(--spring-ease), box-shadow 160ms ease;
  pointer-events: none;
  will-change: transform;
}

.theme-indicator.is-dragging {
  transition: box-shadow 120ms ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.app-theme-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 4px;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-align: center;
  white-space: nowrap;
  transition: color 180ms ease;
}

.app-theme-btn.is-active {
  color: var(--text-primary);
}

/* Hide fake iPhone notch on real touch devices (Android phones, tablets, iPads) */
@media (pointer: coarse) {
  .dynamic-island {
    display: none;
  }
  .app-header {
    padding-top: max(14px, env(safe-area-inset-top));
  }
}

/* Mobile Edge-to-Edge (iOS & Android phones) */
@media (max-width: 640px) {
  .studio-wrapper {
    padding: 0;
  }
  .studio-toolbar,
  .dynamic-island {
    display: none;
  }
  .device-frame {
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100dvh;
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .app-header {
    padding-top: max(14px, env(safe-area-inset-top));
  }
  .sheet-panel {
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
  .ios-input,
  .ios-textarea,
  .ios-select {
    font-size: 16px;
  }
  .kitchen-hero-grid,
  .gost-top-grid {
    grid-template-columns: 1fr;
  }
}

/* Hide native numeric spin arrows on Windows/macOS/Firefox so right-aligned /кг suffixes never overlap */
input[type='number'].ios-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type='number'].ios-input::-webkit-inner-spin-button,
input[type='number'].ios-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Prevent iOS & iPadOS Safari auto-zoom on form fields even when inline compact font-size is set */
@supports (-webkit-touch-callout: none) {
  .ios-input,
  .ios-textarea,
  .ios-select {
    font-size: 16px !important;
  }
  input[data-pl-price-key] {
    width: 96px !important;
  }
}

/* Sprint 5: AI Technologist, Supplier Invoice Radar & Hands-Free Voice UI */
.ai-tech-banner {
  background: linear-gradient(135deg, rgba(0, 122, 255, 0.1), rgba(88, 86, 214, 0.12));
  border: 1px solid rgba(88, 86, 214, 0.28);
  border-radius: 16px;
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-action-btn {
  border: none;
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  background: linear-gradient(135deg, #007AFF, #5856D6);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(88, 86, 214, 0.25);
  transition: transform 0.14s ease, opacity 0.14s ease;
}

.ai-action-btn:active {
  transform: scale(0.98);
}

.ai-action-btn[disabled],
.ai-action-btn.is-loading {
  opacity: 0.72;
  cursor: wait;
}

.voice-dictate-box {
  background: var(--bg-app);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.voice-mic-btn {
  border: 1px solid rgba(255, 59, 48, 0.35);
  background: rgba(255, 59, 48, 0.1);
  color: var(--red, #FF3B30);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.18s ease, transform 0.14s ease;
}

.voice-mic-btn.is-recording {
  background: #FF3B30;
  color: #FFFFFF;
  border-color: #FF3B30;
  animation: voicePulseRing 1.25s infinite ease-in-out;
}

@keyframes voicePulseRing {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.45);
  }
  70% {
    box-shadow: 0 0 0 9px rgba(255, 59, 48, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0);
  }
}

.radar-row-card {
  background: var(--bg-app);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.radar-diff-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  white-space: nowrap;
}

.radar-diff-pill.is-up {
  background: rgba(255, 59, 48, 0.14);
  color: #FF3B30;
}

.radar-diff-pill.is-down {
  background: rgba(52, 199, 89, 0.15);
  color: var(--green);
}

.radar-breach-card {
  background: var(--bg-app);
  border: 1px solid var(--separator);
  border-radius: 14px;
  padding: 9px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.radar-breach-card.is-breached {
  background: rgba(255, 59, 48, 0.08);
  border-color: rgba(255, 59, 48, 0.38);
}

/* Stage 1: Menu Engineering Matrix & Excel / POS Export Hub */
.me-quadrant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.me-quadrant-tile {
  border: 1px solid var(--separator);
  background: var(--bg-app);
  border-radius: 14px;
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.me-quadrant-tile:active {
  transform: scale(0.985);
}

.me-quadrant-tile.is-active {
  border-color: var(--accent);
  background: rgba(0, 122, 255, 0.08);
}

.me-quadrant-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-chip);
  color: var(--text-primary);
  white-space: nowrap;
}

.me-quadrant-badge.is-star {
  background: rgba(52, 199, 89, 0.16);
  color: var(--green);
}

.me-quadrant-badge.is-plowhorse {
  background: rgba(0, 122, 255, 0.14);
  color: var(--accent);
}

.me-quadrant-badge.is-puzzle {
  background: rgba(175, 82, 222, 0.15);
  color: #AF52DE;
}

.me-quadrant-badge.is-dog {
  background: var(--bg-chip);
  color: var(--text-secondary);
}

.export-hub-item {
  width: 100%;
  border: 1px solid var(--separator);
  background: var(--bg-app);
  border-radius: 14px;
  padding: 11px 12px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: transform 0.12s ease, border-color 0.15s ease;
}

.export-hub-item:active {
  transform: scale(0.985);
}

.export-hub-item.is-featured {
  background: linear-gradient(135deg, rgba(52, 199, 89, 0.12), rgba(0, 122, 255, 0.1));
  border-color: rgba(52, 199, 89, 0.36);
}

/* Print / PDF Styles for GOST 31987-2012 (ТТК / ТК) & OP-1 */
@page {
  size: A4;
  margin: 12mm;
}

@media print {
  html,
  body,
  .studio-wrapper,
  .device-frame {
    display: block !important;
    position: static !important;
    background: #FFFFFF !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .studio-toolbar,
  .dynamic-island,
  .app-header,
  .app-footer,
  .blank-controls,
  .sheet-overlay,
  .lightbox-overlay,
  .toast-banner,
  .ai-tech-banner,
  .voice-dictate-box {
    display: none !important;
  }

  .app-scroll {
    display: block !important;
    padding: 0 !important;
    overflow: visible !important;
    height: auto !important;
  }

  .blank-sheet {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #000000 !important;
  }

  .blank-table-wrap {
    overflow: visible !important;
  }

  .kitchen-hero-grid {
    grid-template-columns: 1fr auto !important;
  }

  .gost-top-grid {
    grid-template-columns: 1fr 1.15fr !important;
  }

  .blank-table th,
  .blank-table td {
    border-color: #000000 !important;
  }

  .blank-table {
    break-inside: auto;
  }

  .blank-table tr,
  .kitchen-step-row,
  .prep-label-box {
    break-inside: avoid;
  }
}
