.mx-calc,
.mx-calc * { box-sizing: border-box; }

.mx-calc {
  --mx-calc-ink: #241f1a;
  --mx-calc-muted: #5c564c;
  --mx-calc-line: #241f1a;
  --mx-calc-paper: #f6f1e6;
  --mx-calc-card: #fffdf8;
  --mx-calc-accent: #7ea85a;
  --mx-calc-action: #315334;
  --mx-ui-font: "Segoe UI", Arial, sans-serif;
  position: fixed;
  z-index: 60;
  top: var(--mx-calc-top, 86px);
  right: var(--mx-calc-right, 14px);
  width: var(--mx-calc-sign-width, 220px);
  max-height: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-height: 0;
  color: var(--mx-calc-ink);
  font-family: var(--mx-ui-font);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  font-synthesis: none;
  letter-spacing: normal;
  pointer-events: none;
}

.mx-calc[hidden] { display: none !important; }

.mx-calc.is-open {
  width: var(--mx-calc-width, 380px);
  max-height: calc(100dvh - var(--mx-calc-top, 86px) - 12px);
}

.mx-calc-sign,
.mx-calc-panel,
.mx-calc-policy { pointer-events: auto; }

.mx-calc-sign {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: var(--mx-calc-sign-width, 220px);
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 8px 14px 10px 16px;
  border: 0;
  background: transparent;
  color: var(--mx-calc-ink);
  cursor: pointer;
  font-family: inherit;
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
}

.mx-calc-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.mx-calc-frame path {
  fill: rgba(246, 241, 230, 0.94);
  stroke: #241f1a;
  stroke-width: 2.4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mx-calc-sign-label,
.mx-calc-sign-mark { position: relative; z-index: 1; }

.mx-calc-sign-label {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mx-calc-sign-mark {
  flex: none;
  width: auto;
  min-width: 1em;
  font-family: inherit;
  font-style: normal;
  font-weight: 500;
  font-size: 18px;
  line-height: 1;
  text-align: center;
}

.mx-calc-panel {
  display: none;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  margin-top: 6px;
  background: var(--mx-calc-paper);
  border: 1.5px solid var(--mx-calc-line);
  border-radius: 3px 6px 4px 7px / 6px 4px 7px 3px;
  box-shadow: 1px 1px 0 rgba(36, 31, 26, 0.18);
  overflow: hidden;
}

.mx-calc.is-open .mx-calc-panel {
  display: flex;
  flex: 1;
}

.mx-calc-panel[hidden] { display: none !important; }

.mx-calc-summary {
  flex: none;
  padding: 8px 12px 6px;
  border-bottom: 1.5px solid var(--mx-calc-line);
}

.mx-calc-summary p { margin: 0 0 2px; }

.mx-calc-count { color: var(--mx-calc-muted); font-size: 14px; font-weight: 500; }

.mx-calc-pre,
.mx-calc-once,
.mx-calc-month { font-size: 14px; font-weight: 600; }

.mx-calc-month { color: var(--mx-calc-action); }

.mx-calc-conflict { color: #6b3a2a; font-size: 14px; font-weight: 500; }

.mx-calc-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: 8px 12px 12px;
}

.mx-calc-group-note,
.mx-calc-line-note,
.mx-calc-hint,
.mx-calc-gate,
.mx-calc-total-note,
.mx-calc-total-conflict {
  color: var(--mx-calc-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.mx-calc-cat { border-bottom: 1.5px solid rgba(36, 31, 26, 0.35); }

.mx-calc-cat-btn,
.mx-calc-tier,
.mx-calc-remove,
.mx-calc-send,
.mx-calc-jump,
.mx-calc-policy-close {
  font: inherit;
  color: var(--mx-calc-ink);
  cursor: pointer;
}

.mx-calc-cat-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 6px 2px;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.mx-calc-cat-btn > span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.mx-calc-cat-btn:after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 1.5px solid var(--mx-calc-ink);
  border-bottom: 1.5px solid var(--mx-calc-ink);
  transform: rotate(45deg);
  flex: none;
}

.mx-calc-cat-btn[aria-expanded="true"]:after { transform: rotate(225deg); margin-top: 4px; }

.mx-calc-badge {
  margin-left: auto;
  min-width: 22px;
  padding: 0 6px;
  border: 1px solid var(--mx-calc-line);
  border-radius: 2px 4px 3px 5px;
  background: #e7f3dc;
  color: var(--mx-calc-action);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-align: center;
}

.mx-calc-cat-panel { padding: 0 0 8px; }

.mx-calc-group + .mx-calc-group { margin-top: 8px; }

.mx-calc-group h3 {
  margin: 0 0 2px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.mx-calc-group-note { margin: 0 0 6px; }

.mx-calc-tiers { display: grid; gap: 6px; }

.mx-calc-tier {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 8px;
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 1.5px solid var(--mx-calc-line);
  border-radius: 2px 5px 3px 6px / 5px 3px 6px 2px;
  background: var(--mx-calc-card);
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.mx-calc-tier > span:first-child { min-width: 0; overflow-wrap: anywhere; }

.mx-calc-tier > span:empty { display: none; }

.mx-calc-tier[aria-checked="true"] {
  background: #e7f3dc;
  box-shadow: inset 0 0 0 1.5px var(--mx-calc-action);
}

.mx-calc-tier-price {
  color: var(--mx-calc-action);
  font-weight: 600;
  white-space: normal;
}

.mx-calc-picked { margin: 10px 0; }

.mx-calc-picked h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; line-height: 1.4; }

.mx-calc-line {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  align-items: baseline;
  padding: 6px 0;
  border-top: 1.5px solid rgba(36, 31, 26, 0.35);
}

.mx-calc-line strong { flex: 1 1 160px; min-width: 0; }

.mx-calc-line > span { overflow-wrap: anywhere; }

.mx-calc-line strong { font-weight: 600; overflow-wrap: anywhere; }

.mx-calc-line.is-conflict strong { color: #6b3a2a; }

.mx-calc-line.is-included span { color: var(--mx-calc-action); }

.mx-calc-remove {
  min-height: 44px;
  padding: 4px 2px;
  border: 0;
  background: transparent;
  color: var(--mx-calc-action);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.mx-calc-line-note { grid-column: 1 / -1; margin: 0; }

.mx-calc-form { display: grid; gap: 8px; }

.mx-calc-total {
  padding: 8px 2px 2px;
  border-top: 1.5px solid var(--mx-calc-line);
}

.mx-calc-total-line {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.mx-calc-total-fee { display: block; }

.mx-calc-total-note,
.mx-calc-total-conflict { margin: 4px 0 0; }

.mx-calc-total.is-conflict .mx-calc-total-line { color: #6b3a2a; }

.mx-calc-total-detail { display: grid; gap: 4px; margin-top: 4px; }

.mx-calc-jump {
  min-height: 44px;
  padding: 4px 8px;
  border: 1.5px solid var(--mx-calc-line);
  border-radius: 2px 4px 3px 5px;
  background: #fffdf8;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.45;
}

.mx-calc-field { display: grid; gap: 2px; }

.mx-calc-field span { font-size: 14px; font-weight: 500; line-height: 1.4; }

.mx-calc-field input,
.mx-calc-field textarea {
  width: 100%;
  min-height: 44px;
  padding: 6px 8px;
  border: 1.5px solid var(--mx-calc-line);
  border-radius: 2px 5px 3px 6px / 5px 3px 6px 2px;
  background: var(--mx-calc-card);
  color: var(--mx-calc-ink);
  font-family: var(--mx-ui-font);
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.45;
  font-synthesis: none;
}

.mx-calc-field textarea { min-height: 72px; resize: vertical; }

.mx-calc-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.mx-calc-consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.mx-calc-consent input {
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  flex: none;
  border: 1.5px solid var(--mx-calc-line);
  border-radius: 2px 3px 2px 4px;
  background: var(--mx-calc-card);
}

.mx-calc-consent input:checked {
  background: var(--mx-calc-action);
  box-shadow: inset 0 0 0 3px var(--mx-calc-card);
}

.mx-calc-consent label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.mx-calc-consent a { color: var(--mx-calc-action); }

.mx-calc-gate { margin: 0; }

.mx-calc-send {
  min-height: 46px;
  padding: 6px 12px;
  border: 1.5px solid #1d3420;
  border-radius: 3px 6px 4px 7px / 6px 3px 7px 3px;
  background: var(--mx-calc-action);
  color: #f6f1e6;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.mx-calc-send:disabled {
  opacity: 0.5;
  cursor: default;
}

.mx-calc-status { min-height: 1.4em; margin: 0; font-size: 14px; font-weight: 500; line-height: 1.45; }

.mx-calc-status.is-error { color: #6b3a2a; }

.mx-calc-status.is-ok { color: var(--mx-calc-action); }

.mx-calc :focus-visible {
  outline: 2px solid #3f6b28;
  outline-offset: 2px;
}

.mx-calc-policy[hidden] { display: none !important; }

.mx-calc-policy {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(36, 31, 26, 0.35);
}

.mx-calc-policy-card {
  width: min(720px, 100%);
  max-height: min(80dvh, 760px);
  display: flex;
  flex-direction: column;
  background: var(--mx-calc-paper);
  border: 1.5px solid var(--mx-calc-line);
  border-radius: 3px 6px 4px 7px;
  overflow: hidden;
}

.mx-calc-policy-card h3 { margin: 0; padding: 12px 12px 0; font-size: 16px; font-weight: 600; line-height: 1.4; }

.mx-calc-policy-body {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 8px 12px 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.mx-calc-policy-body a { color: var(--mx-calc-action); }

.mx-calc-policy-close {
  margin: 0 12px 12px;
  min-height: 44px;
  border: 1.5px solid var(--mx-calc-line);
  border-radius: 3px 5px 4px 6px;
  background: var(--mx-calc-card);
}

html.mx-live .mx-hud,
html.mx-fallback .mx-hud,
html.mx-js-ui .mx-hud { z-index: 70; }

html.mx-calc-dock .mx-panel {
  left: 12px;
  right: calc(var(--mx-calc-width) + var(--mx-calc-right) + 12px);
  width: auto;
  top: var(--mx-calc-top);
  height: calc(100dvh - var(--mx-calc-top) - 12px);
  transform: none;
  animation: none;
}

html.mx-calc-dock .mx-dialog {
  z-index: 40;
  padding: var(--mx-calc-top) calc(var(--mx-calc-width) + var(--mx-calc-right) + 16px) 16px 16px;
  justify-content: flex-start;
  align-items: stretch;
}

html.mx-calc-dock .mx-dialog-top { z-index: 45; }

html.mx-calc-dock .mx-dialog-card,
html.mx-calc-dock .mx-dialog-card-narrow {
  width: 100%;
  max-width: 1440px;
  height: auto;
  max-height: none;
  flex: 1;
}

html.mx-calc-dock .mx-dialog-card-narrow { max-width: 640px; margin-right: auto; }

html.mx-fallback.mx-calc-dock .mx-fallback-root,
html.mx-fallback.mx-calc-dock .mx-static {
  margin-right: calc(var(--mx-calc-width) + var(--mx-calc-right) + 8px);
}

@media (max-width: 800px) {
  .mx-calc,
  .mx-calc.is-open {
    left: auto;
    right: var(--mx-calc-right, 10px);
    width: min(var(--mx-calc-sign-width, 220px), calc(100vw - var(--mx-calc-right, 10px) - 8px));
    max-height: none;
  }

  .mx-calc-sign {
    width: 100%;
    font-size: 15px;
  }

  .mx-calc.is-open .mx-calc-panel {
    position: fixed;
    left: 8px;
    right: 8px;
    top: auto;
    bottom: calc(8px + env(safe-area-inset-bottom));
    width: auto;
    height: min(50dvh, calc(100dvh - 120px));
    max-height: min(50dvh, calc(100dvh - 120px));
    margin-top: 0;
  }

  .mx-calc-field input,
  .mx-calc-field textarea {
    font-size: 16px;
  }

  html.mx-calc-sheet .mx-panel {
    top: calc(58px + env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    bottom: auto;
    width: auto;
    height: 34dvh;
    max-height: 34dvh;
    transform: none;
  }

  html.mx-calc-sheet .mx-dialog { padding: 0; align-items: stretch; }

  html.mx-calc-sheet .mx-dialog-card,
  html.mx-calc-sheet .mx-dialog-card-narrow {
    top: calc(58px + env(safe-area-inset-top));
    left: 8px;
    right: 8px;
    bottom: auto;
    width: auto;
    height: 32dvh;
    max-height: 32dvh;
    max-width: none;
  }
}

@media (max-width: 800px) and (max-height: 700px) {
  .mx-calc.is-open .mx-calc-panel {
    height: min(46dvh, calc(100dvh - 110px));
    max-height: min(46dvh, calc(100dvh - 110px));
  }
  html.mx-calc-sheet .mx-panel { height: 30dvh; max-height: 30dvh; }
}

.mx-calc-notice {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.mx-calc-scope {
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
}

.mx-calc-scope summary { cursor: pointer; }

.mx-calc-scope ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

@media (max-width: 800px) {
  html:not(.mx-calc-sheet) .mx-panel,
  html:not(.mx-calc-sheet) .mx-dialog-card,
  html:not(.mx-calc-sheet) .mx-dialog-card-narrow {
    top: calc(var(--mx-calc-top, 86px) + var(--mx-calc-sign-height, 52px) + 10px);
  }

  .mx-price .mx-tabs,
  .mx-price .mx-cats-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }

  .mx-price .mx-tabs button,
  .mx-price .mx-cats-tabs button {
    white-space: normal;
    text-align: left;
  }
}

@media (min-width: 801px) {
  html:not(.mx-calc-dock) .mx-dialog {
    padding-top: calc(var(--mx-calc-top, 86px) + var(--mx-calc-sign-height, 52px) + 10px);
  }
}

.mx-calc button,
.mx-calc a,
.mx-calc input,
.mx-calc textarea,
.mx-calc label,
.mx-calc p,
.mx-calc span,
.mx-calc li,
.mx-calc h3,
.mx-calc summary,
.mx-calc strong,
.mx-calc-field input::placeholder,
.mx-calc-field textarea::placeholder {
  font-family: var(--mx-ui-font);
  font-style: normal;
  font-synthesis: none;
  letter-spacing: normal;
}

.mx-app .mx-hud-tools,
.mx-app .mx-hud-tools button,
.mx-app .mx-hud-tools a {
  font-family: "Segoe UI", Arial, sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: 15px;
  line-height: 1.4;
  font-synthesis: none;
  letter-spacing: normal;
  white-space: normal;
}

.mx-app .mx-hud-extra {
  max-width: min(280px, calc(100vw - 24px));
}

.mx-app .mx-hud-extra button,
.mx-app .mx-hud-extra a {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 800px) {
  .mx-app .mx-hud-tools button,
  .mx-app .mx-hud-tools a {
    font-size: 14px;
  }
}
