:root {
  color-scheme: light;
  --ink: #193a34;
  --muted: #77847d;
  --green: #255c4b;
  --green-dark: #193f34;
  --mint: #dcebe0;
  --paper: #f4f1e9;
  --line: #e8e8df;
  --white: #fffefa;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page { width: min(100% - 48px, 1120px); min-height: 100vh; margin: 0 auto; display: flex; flex-direction: column; }
.calculator { width: min(100%, 470px); margin: 0 auto; padding: 62px 0 40px; }
.intro { margin-bottom: 29px; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: var(--green); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #a1bd87; box-shadow: 0 0 0 4px rgba(161,189,135,.18); }
h1 { margin: 0; font-size: clamp(42px, 8vw, 58px); line-height: 1.03; letter-spacing: -.065em; font-weight: 750; }
h1 span { color: var(--green); }
.intro p { margin: 17px 0 0; color: #758078; font-size: 14px; line-height: 1.6; }

.calculator-card { padding: 25px 27px 22px; border: 1px solid rgba(25,58,52,.06); border-radius: 13px; background: var(--white); box-shadow: 0 12px 36px rgba(34,54,43,.06); }
.field-label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 700; }
.price-input-wrap { display: flex; align-items: center; height: 61px; padding: 0 17px; border: 1px solid #dce1d9; border-radius: 7px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.price-input-wrap:focus-within { border-color: #5c9474; box-shadow: 0 0 0 3px rgba(92,148,116,.12); }
#meal-price { width: 100%; height: 100%; padding: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-family: inherit; font-size: 20px; font-weight: 600; letter-spacing: -.03em; }
#meal-price::placeholder { color: #b1b9b1; font-weight: 500; }
.currency { color: #89958b; font-size: 16px; font-weight: 600; }
.field-hint-row { display: flex; justify-content: space-between; min-height: 28px; padding-top: 7px; color: #a0a8a0; font-size: 10px; }
.error { color: #b04737; text-align: right; }

.result { margin-top: 13px; padding: 20px 22px 18px; border-radius: 9px; color: #fff; background: var(--green-dark); overflow: hidden; position: relative; }
.result::after { content: ''; position: absolute; right: -33px; bottom: -67px; width: 155px; height: 155px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 16px rgba(255,255,255,.025), 0 0 0 34px rgba(255,255,255,.025); pointer-events: none; }
.result-topline { display: flex; align-items: center; justify-content: space-between; color: #b5ccb9; font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.result-icon { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; font-size: 13px; }
.amount { display: flex; align-items: baseline; gap: 7px; margin-top: 5px; font-size: 58px; font-weight: 650; letter-spacing: -.07em; line-height: 1.2; }
.amount-currency { color: #a5c4ac; font-size: 27px; font-weight: 500; letter-spacing: -.03em; }
.result-caption { margin: 2px 0 0; color: #c2d1c5; font-size: 11px; line-height: 1.5; }
.result-tip { margin: 12px 0 0; padding: 9px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(255,255,255,.06); color: #e3eede; font-size: 11px; line-height: 1.55; }
.result-tip[hidden] { display: none; }
.breakdown { margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.16); }
.breakdown[hidden] { display: none; }
.breakdown-row { display: flex; justify-content: space-between; margin-top: 6px; color: #c3d2c6; font-size: 11px; }
.breakdown-row strong { color: #fff; font-weight: 600; }

.rules { display: grid; gap: 13px; margin-top: 24px; }
.rule { display: flex; align-items: baseline; gap: 13px; color: #69776e; font-size: 11px; line-height: 1.5; }
.rule-number { flex: 0 0 auto; color: #91a68f; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.fine-print { margin: 20px 0 0; color: #879187; font-size: 11px; line-height: 1.55; }
.fine-print a { color: var(--green); text-underline-offset: 2px; }
@media (max-width: 540px) {
  .page { width: min(100% - 32px, 470px); }
  .calculator { padding-top: 34px; }
  .intro { margin-bottom: 23px; }
  .intro p { font-size: 14px; }
  .calculator-card { border-radius: 12px; }
  .calculator-card { padding: 21px 19px 19px; }
  .amount { font-size: 54px; }
  .rules { gap: 12px; margin-top: 20px; }
  .rule { font-size: 12px; }
}

@media (max-width: 360px) {
  .page { width: calc(100% - 24px); }
  .calculator { padding-top: 28px; }
  .calculator-card { padding-right: 15px; padding-left: 15px; }
  .field-hint-row { flex-wrap: wrap; gap: 3px; }
  .field-hint-row > span:first-child { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
