:root {
      --ui-scale: 1;
      --bg: #f4f7fb;
      --card: #ffffff;
      --text: #111827;
      --muted: #667085;
      --line: #d8e1ee;
      --blue: #2563eb;
      --blue-light: #e8f0ff;
      --green: #079455;
      --green-light: #dcfae6;
      --green-soft: #f0fdf4;
      --orange: #f79009;
      --orange-light: #fff4df;
      --orange-soft: #fffbeb;
      --purple-light: #f3e8ff;
      --shadow: 0 10px 26px rgba(17, 24, 39, .10);
    }

    html {
      -webkit-text-size-adjust: 100%;
      text-size-adjust: 100%;
      zoom: var(--ui-scale);
    }

    html[data-ui-scale="sm"] {
      --ui-scale: 0.86;
    }

    html[data-ui-scale="md"] {
      --ui-scale: 1;
    }

    html[data-ui-scale="lg"] {
      --ui-scale: 1.22;
    }

    * {
      box-sizing: border-box;
      -webkit-tap-highlight-color: transparent;
      -webkit-touch-callout: none;
    }

    body {
      margin: 0;
      min-height: 100vh;
      background:
        radial-gradient(circle at 12% 0%, rgba(37, 99, 235, .10), transparent 30%),
        radial-gradient(circle at 92% 8%, rgba(7, 148, 85, .10), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
      user-select: none;
      -webkit-user-select: none;
    }

    button,
    input,
    select {
      font: inherit;
    }

    button {
      border: 0;
      cursor: pointer;
      user-select: none;
      transition: transform .06s ease, filter .12s ease;
    }

    button:active {
      transform: scale(.96);
      filter: brightness(.96);
    }

    .app {
      width: min(760px, 100%);
      margin: 0 auto;
      padding: 10px;
    }

    .app.keypad-open {
      padding-bottom: 292px;
    }

    .app.mode-mill .sell-only,
    .app.mode-buy .sell-only,
    .app.mode-sell .mill-only,
    .app.mode-mill .buy-only,
    .app.mode-sell .buy-only,
    .app.mode-buy .self-only,
    .app.mode-sell .self-only {
      display: none !important;
    }

    .mode-tabs {
      position: sticky;
      top: 8px;
      z-index: 25;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 6px;
      margin-bottom: 6px;
      padding: 3px;
      border-radius: 18px;
      background: rgba(255, 255, 255, .92);
      border: 1px solid var(--line);
      box-shadow: 0 6px 18px rgba(17, 24, 39, .08);
    }

    .mode-tab {
      min-height: 42px;
      border-radius: 14px;
      background: transparent;
      color: var(--muted);
      font-size: 16px;
      font-weight: 1000;
    }

    .mode-tab.mill.active {
      background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
      color: #fff;
      box-shadow: 0 4px 14px rgba(37, 99, 235, .32);
    }

    .mode-tab.buy.active {
      background: linear-gradient(180deg, #2dd4bf 0%, #0f766e 100%);
      color: #fff;
      box-shadow: 0 4px 14px rgba(15, 118, 110, .32);
    }

    .mode-tab.sell.active {
      background: linear-gradient(180deg, #fb923c 0%, #ea580c 100%);
      color: #fff;
      box-shadow: 0 4px 14px rgba(234, 88, 12, .32);
    }


    .bottom-settings-toggle {
      display: block;
      min-height: 44px;
      margin: 10px auto 0;
      padding: 0 22px;
      border-radius: 999px;
      background: rgba(255, 255, 255, .88);
      border: 1px solid var(--line);
      color: #344054;
      font-size: 16px;
      font-weight: 900;
    }

    .result {
      position: sticky;
      top: 62px;
      z-index: 20;
      display: block;
      min-height: 88px;
      padding: 6px 12px 8px;
      margin-bottom: 6px;
      border-radius: 18px;
      border: 3px solid var(--line);
      background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
      box-shadow: var(--shadow);
      cursor: pointer;
    }

    .result.pay {
      background: linear-gradient(135deg, var(--green-light) 0%, var(--green-soft) 100%);
      border-color: rgba(7, 148, 85, .32);
    }

    .result.refund {
      background: linear-gradient(135deg, var(--orange-light) 0%, var(--orange-soft) 100%);
      border-color: rgba(247, 144, 9, .45);
    }

    .result.warning {
      background: linear-gradient(135deg, var(--orange-light) 0%, #fff7ed 100%);
      border-color: rgba(247, 144, 9, .45);
    }

    .result-label {
      display: inline-block;
      max-width: 55%;
      vertical-align: middle;
      font-size: clamp(18px, 4.6vw, 28px);
      font-weight: 1000;
      white-space: nowrap;
    }

    .result-money {
      float: right;
      font-size: clamp(32px, 8.5vw, 52px);
      line-height: 1;
      font-weight: 1000;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    .change-row {
      display: flex;
      visibility: hidden;
      clear: both;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      min-height: 26px;
      padding-top: 2px;
      font-size: 15px;
      font-weight: 900;
    }

    .change-row.show {
      visibility: visible;
    }

    .change-row strong {
      font-size: 22px;
      font-weight: 1000;
      font-variant-numeric: tabular-nums;
    }

    .change-row.change {
      color: #b45309;
    }

    .change-row.short {
      color: #9a5800;
    }

    .change-row.exact {
      color: var(--green);
    }

    .pay .result-label,
    .pay .result-money {
      color: var(--green);
    }

    .refund .result-label,
    .refund .result-money {
      color: #b45309;
    }

    .warning .result-label,
    .warning .result-money {
      color: #9a5800;
    }

    .result-note {
      clear: both;
      min-height: 16px;
      margin-top: 0;
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      text-align: left;
      line-height: 1.35;
    }

    .result-hint {
      clear: both;
      margin-top: 2px;
      color: #98a2b3;
      font-size: 12px;
      font-weight: 800;
    }

    .calc-dialog {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 200;
      align-items: center;
      justify-content: center;
      padding: 18px;
    }

    .calc-dialog.show {
      display: flex;
    }

    .calc-dialog-backdrop {
      position: absolute;
      inset: 0;
      background: rgba(17, 24, 39, .42);
    }

    .calc-dialog-card {
      position: relative;
      width: min(420px, 100%);
      max-height: min(86vh, 720px);
      overflow: auto;
      padding: 18px 16px 16px;
      border-radius: 22px;
      background: #fff;
      box-shadow: 0 18px 48px rgba(17, 24, 39, .22);
    }

    .calc-dialog-title {
      margin: 0 0 12px;
      font-size: 20px;
      font-weight: 1000;
    }

    .calc-dialog-body {
      display: grid;
      gap: 10px;
    }

    .calc-step {
      display: grid;
      gap: 2px;
    }

    .calc-step-name {
      color: var(--muted);
      font-size: 14px;
      font-weight: 900;
    }

    .calc-step-expr {
      font-size: 18px;
      font-weight: 900;
      line-height: 1.35;
      font-variant-numeric: tabular-nums;
    }

    .calc-step-expr b {
      font-weight: 1000;
    }

    .calc-step.buy .calc-step-expr b {
      color: #0f766e;
    }

    .calc-step.process .calc-step-expr b {
      color: #1d4ed8;
    }

    .calc-step.bran .calc-step-expr b {
      color: #c2410c;
    }

    .calc-step.total,
    .calc-step.cash {
      padding-top: 10px;
      border-top: 1px dashed var(--line);
    }

    .calc-step.total .calc-step-expr,
    .calc-step.cash .calc-step-expr {
      font-size: 20px;
    }

    .calc-step.total .calc-step-expr b,
    .calc-step.cash.change .calc-step-expr b {
      color: #b45309;
    }

    .calc-step.cash.pay .calc-step-expr b,
    .calc-step.cash.exact .calc-step-expr b {
      color: var(--green);
    }

    .calc-step.cash.short .calc-step-expr b {
      color: #9a5800;
    }

    .calc-dialog-note {
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
      line-height: 1.45;
    }

    .calc-dialog-close {
      width: 100%;
      min-height: 48px;
      margin-top: 16px;
      border-radius: 14px;
      background: var(--blue);
      color: #fff;
      font-size: 20px;
      font-weight: 900;
    }

    .calculation-line {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      margin: 8px 0;
      gap: 8px;
    }

    .calculation-card {
      min-width: 0;
      min-height: 74px;
      padding: 9px 6px 7px;
      border: 1px solid rgba(216, 225, 238, .9);
      border-radius: 17px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
      box-shadow: 0 4px 12px rgba(17, 24, 39, .05);
      text-align: center;
    }

    .calculation-card.wheat-buy {
      background: linear-gradient(180deg, #ccfbf1 0%, #ffffff 100%);
      border-color: rgba(15, 118, 110, .22);
    }

    .calculation-card.process {
      background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
      border-color: rgba(37, 99, 235, .2);
    }

    .calculation-card.bran {
      background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
      border-color: rgba(247, 144, 9, .24);
    }

    .calculation-card.rate {
      background: linear-gradient(180deg, #f3e8ff 0%, #ffffff 100%);
      border-color: rgba(126, 34, 206, .2);
    }

    .calculation-card span {
      display: block;
      color: var(--muted);
      font-size: 15px;
      font-weight: 900;
      white-space: nowrap;
    }

    .calculation-card .unit-price {
      font-weight: 1000;
      font-variant-numeric: tabular-nums;
    }

    .calculation-card.process .unit-price {
      color: #1d4ed8;
    }

    .calculation-card.bran .unit-price {
      color: #b45309;
    }

    .calculation-card strong {
      display: block;
      margin-top: 4px;
      color: var(--text);
      font-size: clamp(23px, 5vw, 34px);
      line-height: 1;
      font-weight: 1000;
      font-variant-numeric: tabular-nums;
      white-space: nowrap;
    }

    .calculation-card.wheat-buy strong {
      color: #0f766e;
    }

    .calculation-card.process strong {
      color: #1d4ed8;
    }

    .calculation-card.bran strong {
      color: #b45309;
    }

    .calculation-card.rate strong {
      color: #7e22ce;
    }

    .calculation-card.rate.warning {
      border-color: rgba(247, 144, 9, .5);
      background: linear-gradient(180deg, #fff4df 0%, #ffffff 100%);
    }

    .calculation-card.rate.warning strong {
      color: #9a5800;
    }

    .settings {
      display: none;
      grid-template-columns: 1fr 1fr;
      gap: 8px;
      padding: 10px;
      margin-bottom: 10px;
      border-radius: 20px;
      background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
      box-shadow: var(--shadow);
    }

    .settings.show {
      display: grid;
    }

    .setting {
      display: grid;
      gap: 4px;
    }

    .setting label {
      color: var(--muted);
      font-size: 14px;
      font-weight: 800;
    }

    .setting input,
    .setting select {
      width: 100%;
      height: 46px;
      border: 2px solid var(--line);
      border-radius: 14px;
      background: #fff;
      outline: 0;
      text-align: center;
      font-size: 20px;
      font-weight: 900;
    }

    .setting-scale,
    .setting-round,
    .setting.sell-only {
      grid-column: 1 / -1;
    }

    .scale-tabs {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 6px;
      padding: 4px;
      border: 2px solid var(--line);
      border-radius: 16px;
      background: #eef2f7;
    }

    .scale-tab {
      min-height: 46px;
      border-radius: 12px;
      background: transparent;
      color: var(--muted);
      font-weight: 1000;
    }

    .scale-tab[data-ui-scale="sm"] {
      font-size: 15px;
    }

    .scale-tab[data-ui-scale="md"] {
      font-size: 18px;
    }

    .scale-tab[data-ui-scale="lg"] {
      font-size: 22px;
    }

    .scale-tab.active {
      background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
      color: #fff;
      box-shadow: 0 4px 12px rgba(37, 99, 235, .28);
    }

    .save-setting {
      grid-column: 1 / -1;
      height: 48px;
      border-radius: 14px;
      background: var(--blue);
      color: #fff;
      font-size: 20px;
      font-weight: 900;
    }

    .input-panel {
      display: grid;
      gap: 10px;
      margin-bottom: 10px;
    }

    .row-input {
      position: relative;
      overflow: hidden;
      display: grid;
      grid-template-columns: minmax(128px, 168px) 1fr auto auto;
      align-items: center;
      gap: 8px;
      min-height: 72px;
      padding: 8px 10px;
      border-radius: 22px;
      border: 3px solid var(--line);
      background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
      box-shadow: 0 4px 14px rgba(17, 24, 39, .06);
    }

    .row-input::before {
      content: "";
      position: absolute;
      inset: 0 auto 0 0;
      width: 6px;
      background: transparent;
      border-radius: 20px 0 0 20px;
    }

    .row-input.wheat {
      border-color: rgba(37, 99, 235, .32);
      background: linear-gradient(135deg, #eff6ff 0%, #ffffff 86%);
    }

    .row-input.bran {
      border-color: rgba(247, 144, 9, .34);
      background: linear-gradient(135deg, #fff7ed 0%, #ffffff 86%);
    }

    .row-input:focus-within {
      border-color: var(--blue);
      background: linear-gradient(135deg, var(--blue-light) 0%, #f8fbff 100%);
      box-shadow: 0 0 0 4px rgba(37, 99, 235, .18), 0 8px 20px rgba(37, 99, 235, .12);
    }

    .row-input.active {
      border-color: var(--blue);
      background: linear-gradient(135deg, var(--blue-light) 0%, #f8fbff 100%);
      box-shadow: 0 0 0 4px rgba(37, 99, 235, .18), 0 8px 20px rgba(37, 99, 235, .12);
    }

    .row-input.wheat:focus-within::before,
    .row-input.wheat.active::before {
      background: var(--blue);
    }

    .row-input.bran:focus-within {
      border-color: var(--orange);
      background: linear-gradient(135deg, var(--orange-light) 0%, #ffffff 100%);
      box-shadow: 0 0 0 4px rgba(247, 144, 9, .18), 0 8px 20px rgba(247, 144, 9, .12);
    }

    .row-input.bran.active {
      border-color: var(--orange);
      background: linear-gradient(135deg, var(--orange-light) 0%, #ffffff 100%);
      box-shadow: 0 0 0 4px rgba(247, 144, 9, .18), 0 8px 20px rgba(247, 144, 9, .12);
    }

    .row-input.bran:focus-within::before,
    .row-input.bran.active::before {
      background: var(--orange);
    }

    .row-input.wheat .name,
    .row-input.wheat .unit {
      color: #1d4ed8;
    }

    .row-input.bran .name,
    .row-input.bran .unit {
      color: #b45309;
    }

    .row-price {
      color: var(--muted);
      font-size: 13px;
      font-weight: 800;
      line-height: 1.2;
      white-space: nowrap;
    }

    .row-price .unit-price {
      font-size: 13px;
      font-weight: 1000;
      font-variant-numeric: tabular-nums;
    }

    .row-input.wheat .row-price .unit-price {
      color: #1d4ed8;
    }

    .row-input.wheat .row-price.buy-price .unit-price {
      color: #0f766e;
    }

    .row-input.bran .row-price .unit-price {
      color: #c2410c;
    }

    .row-input.wheat .input-status,
    .row-input.bran .input-status,
    .row-input.sell-only .input-status {
      display: none !important;
    }

    .cash-row {
      display: grid;
      border-color: rgba(7, 148, 85, .34);
      background: linear-gradient(135deg, #ecfdf3 0%, #ffffff 86%);
    }

    .cash-row.inactive {
      opacity: .55;
      border-style: dashed;
      border-color: rgba(148, 163, 184, .55);
      background: linear-gradient(135deg, #f3f4f6 0%, #ffffff 86%);
    }

    .cash-row.inactive .name,
    .cash-row.inactive .unit {
      color: var(--muted);
    }

    .cash-row.inactive::before {
      background: #cbd5e1;
    }

    .cash-row.inactive .clear-field {
      color: #98a2b3;
      background: #eef2f6;
    }

    .cash-row:focus-within {
      border-color: var(--green);
      background: linear-gradient(135deg, var(--green-light) 0%, #ffffff 100%);
      box-shadow: 0 0 0 4px rgba(7, 148, 85, .18), 0 8px 20px rgba(7, 148, 85, .12);
    }

    .cash-row.active {
      border-color: var(--green);
      background: linear-gradient(135deg, var(--green-light) 0%, #ffffff 100%);
      box-shadow: 0 0 0 4px rgba(7, 148, 85, .18), 0 8px 20px rgba(7, 148, 85, .12);
    }

    .cash-row:focus-within::before,
    .cash-row.active::before {
      background: var(--green);
    }

    .cash-row .name,
    .cash-row .unit {
      color: var(--green);
    }

    .name {
      font-size: clamp(21px, 5.4vw, 30px);
      font-weight: 1000;
      white-space: nowrap;
    }

    .name-block {
      display: flex;
      min-width: min-content;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 1px;
    }

    .input-status {
      display: none;
      padding: 1px 6px;
      border-radius: 999px;
      font-size: 11px;
      line-height: 1.35;
      font-weight: 1000;
      white-space: nowrap;
    }

    .row-input:focus-within .input-status,
    .row-input.active .input-status {
      display: inline-block;
    }

    .row-input.wheat .input-status {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .row-input.bran .input-status {
      background: #ffedd5;
      color: #b45309;
    }

    .row-input.cash-row .input-status {
      background: #d1fae5;
      color: #047857;
    }

    .cash-row.inactive .input-status {
      display: none;
    }

    .number {
      width: 100%;
      min-width: 0;
      height: 52px;
      border: 0;
      outline: 0;
      background: transparent;
      color: var(--text);
      text-align: right;
      font-size: clamp(34px, 9.5vw, 58px);
      line-height: 1;
      font-weight: 1000;
      font-variant-numeric: tabular-nums;
      user-select: text;
      -webkit-user-select: text;
      -webkit-touch-callout: none;
    }

    .number::placeholder {
      color: #b8c2d1;
    }

    .unit {
      color: var(--muted);
      font-size: clamp(22px, 6vw, 32px);
      font-weight: 900;
    }

    .clear-field {
      min-height: 40px;
      min-width: 50px;
      padding: 0 12px;
      border-radius: 999px;
      background: #eef2f7;
      color: var(--muted);
      font-size: 16px;
      font-weight: 900;
    }


    .hint {
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
      text-align: center;
      padding-bottom: env(safe-area-inset-bottom);
    }

    .history-section {
      margin-top: 18px;
      padding-bottom: env(safe-area-inset-bottom);
    }

    .history-toggle {
      width: 100%;
      min-height: 46px;
      border-radius: 16px;
      background: rgba(255, 255, 255, .72);
      border: 1px solid var(--line);
      color: var(--muted);
      font-size: 16px;
      font-weight: 900;
    }

    .history-count {
      display: inline-block;
      min-width: 24px;
      padding: 2px 7px;
      margin-left: 4px;
      border-radius: 999px;
      background: var(--purple-light);
      color: #7e22ce;
      font-size: 13px;
    }

    .history-panel {
      display: none;
      margin-top: 8px;
      padding: 10px;
      border-radius: 18px;
      background: rgba(255, 255, 255, .86);
      border: 1px solid var(--line);
      box-shadow: 0 5px 16px rgba(17, 24, 39, .06);
    }

    .history-panel.show {
      display: block;
    }

    .history-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 8px;
      margin-bottom: 8px;
    }

    .history-head strong {
      font-size: 17px;
    }

    .history-clear {
      min-height: 34px;
      padding: 0 10px;
      border-radius: 999px;
      background: var(--orange-light);
      color: #9a5800;
      font-size: 14px;
      font-weight: 900;
    }

    .history-list {
      display: grid;
      gap: 8px;
    }

    .history-empty {
      padding: 18px 8px;
      color: var(--muted);
      text-align: center;
      font-size: 15px;
    }

    .history-item {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      padding: 10px;
      border-radius: 14px;
      background: #f8fafc;
      border: 1px solid #e7edf5;
    }

    .history-main {
      min-width: 0;
    }

    .history-kind {
      display: inline-block;
      padding: 1px 6px;
      margin-right: 4px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 1000;
      vertical-align: 1px;
    }

    .history-kind.mill {
      background: #dbeafe;
      color: #1d4ed8;
    }

    .history-kind.sell {
      background: #ffedd5;
      color: #c2410c;
    }

    .history-kind.buy {
      background: #ccfbf1;
      color: #0f766e;
    }

    .history-time {
      color: var(--muted);
      font-size: 12px;
      margin-bottom: 3px;
    }

    .history-weight {
      font-size: 15px;
      font-weight: 800;
      line-height: 1.45;
    }

    .history-result {
      align-self: center;
      font-size: 21px;
      font-weight: 1000;
      white-space: nowrap;
    }

    .history-result.pay {
      color: var(--green);
    }

    .history-result.refund {
      color: #b45309;
    }

    .history-result.zero {
      color: var(--muted);
    }

    .custom-keypad {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 100;
      display: none;
      padding: 12px 10px calc(12px + env(safe-area-inset-bottom));
      background: rgba(244, 247, 251, .96);
      border-top: 2px solid rgba(148, 163, 184, .55);
      border-radius: 22px 22px 0 0;
      box-shadow: 0 -12px 32px rgba(17, 24, 39, .16);
      backdrop-filter: blur(10px);
    }

    .custom-keypad.show {
      display: block;
    }

    .keypad-inner {
      width: min(760px, 100%);
      margin: 0 auto;
    }

    .keypad-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 9px;
    }

    .key {
      min-height: 62px;
      border-radius: 16px;
      background: rgba(255, 255, 255, .92);
      border: 1px solid rgba(216, 225, 238, .9);
      color: var(--text);
      font-size: 31px;
      line-height: 1;
      font-weight: 1000;
      box-shadow: 0 4px 12px rgba(17, 24, 39, .06);
    }

    .key.action {
      color: #b45309;
      background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
      font-size: 20px;
    }

    .key.done {
      color: #ffffff;
      background: linear-gradient(180deg, #fb923c 0%, #f97316 100%);
      border-color: rgba(249, 115, 22, .45);
      font-size: 22px;
    }

    .key.next {
      color: #1d4ed8;
      background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
      font-size: 20px;
    }

    .key.order {
      color: #ffffff;
      background: linear-gradient(180deg, #34d399 0%, #059669 100%);
      border-color: rgba(5, 150, 105, .45);
      font-size: 20px;
    }

    .key:disabled {
      opacity: .42;
      filter: grayscale(.35);
    }

    @media (max-width: 520px) {
      .app {
        padding: 8px;
      }

      .app.keypad-open {
        padding-bottom: 274px;
      }

      .mode-tab {
        min-height: 40px;
        font-size: 15px;
      }

      .result {
        top: 56px;
        min-height: 82px;
        padding: 6px 10px;
        margin-bottom: 6px;
        border-radius: 16px;
        border-width: 2px;
      }

      .result-note {
        font-size: 13px;
      }

      .calculation-line {
        margin: 7px 0;
        gap: 5px;
      }

      .calculation-card {
        min-height: 68px;
        padding: 8px 3px 6px;
        border-radius: 15px;
      }

      .calculation-card span {
        font-size: 12px;
      }

      .calculation-card strong {
        margin-top: 4px;
        font-size: 22px;
      }

      .change-row {
        font-size: 14px;
      }

      .change-row strong {
        font-size: 20px;
      }

      .row-input {
        grid-template-columns: 128px 1fr auto auto;
        min-height: 66px;
        padding: 7px 8px;
        border-radius: 20px;
        border-width: 2px;
      }

      .row-price,
      .row-price .unit-price {
        font-size: 12px;
      }

      .number {
        height: 48px;
      }

      .clear-field {
        min-height: 38px;
        min-width: 44px;
        padding: 0 8px;
        font-size: 15px;
      }

      .custom-keypad {
        padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
      }

      .keypad-grid {
        gap: 8px;
      }

      .key {
        min-height: 58px;
        border-radius: 14px;
        font-size: 29px;
      }

      .key.action,
      .key.next,
      .key.order,
      .key.done {
        font-size: 18px;
      }

    }

    @media (max-width: 380px) {
      .row-input {
        grid-template-columns: 128px 1fr auto;
      }

      .clear-field {
        display: none;
      }
    }
