:root {
  --bg: #fbf6ee;
  --card: #ffffff;
  --ink: #2a2118;
  --muted: #5e5246;
  --green: #1f6f4a;
  --green-dark: #165238;
  --warm: #b34a12;
  --warm-bg: #fff0e0;
  --line: #e2d6c4;
  --err: #a3200f;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 18px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: 84px;
}
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--green); color: #fff;
}
.brand { font-size: 1.25rem; margin: 0; line-height: 1.2; }
.lang-btn {
  min-height: 48px; min-width: 88px; padding: 0 14px; font: inherit; font-weight: 700;
  border: 2px solid #fff; border-radius: 12px; background: transparent; color: #fff; cursor: pointer;
}
main { max-width: 640px; margin: 0 auto; padding: 16px; }
h2 { font-size: 1.5rem; margin: 8px 0; line-height: 1.25; }
h3 { font-size: 1.2rem; margin: 24px 0 6px; }
.lead { margin: 0 0 16px; }
.hint { color: var(--muted); font-size: 1rem; margin: 2px 0 8px; }
.field { margin: 0 0 18px; }
label { display: block; font-weight: 700; margin-bottom: 2px; }
input[type=text], input[type=date], input[type=number], input[type=datetime-local], select {
  width: 100%; min-height: 52px; padding: 10px 12px; font: inherit; color: var(--ink);
  background: #fff; border: 2px solid #8a7b6a; border-radius: 12px;
}
input:focus, select:focus, button:focus, a:focus { outline: 3px solid #0b57d0; outline-offset: 2px; }
.btn {
  display: block; width: 100%; min-height: 52px; margin: 10px 0; padding: 12px 16px; font: inherit; font-weight: 700;
  text-align: center; text-decoration: none; border-radius: 14px; border: 2px solid var(--green); cursor: pointer;
}
.btn-main { background: var(--green); color: #fff; }
.btn-main:active { background: var(--green-dark); }
.btn-ghost { background: #fff; color: var(--green-dark); }
.btn-warm { background: var(--warm-bg); color: var(--warm); border-color: var(--warm); }
.btn-danger { background: #fff; color: var(--err); border-color: var(--err); }
.row-btns { display: grid; grid-template-columns: 1fr; gap: 0; }
.link { display: inline-block; margin-top: 6px; color: var(--green-dark); font-weight: 600; padding: 10px 0; }
.error { color: var(--err); font-weight: 700; min-height: 1.5em; margin: 6px 0; }
.day {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 10px;
}
.day-name { font-weight: 700; margin: 0 0 6px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 400; margin: 0; }
.check input { width: 28px; height: 28px; flex: none; accent-color: var(--green); }
.result {
  background: var(--card); border: 2px solid var(--green); border-radius: 16px; padding: 16px; margin: 20px 0;
}
.result h3 { margin-top: 0; }
.big { font-size: 1.9rem; font-weight: 800; margin: 4px 0; line-height: 1.2; }
.big.plus { color: var(--green-dark); }
.stat { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.stat span:last-child { font-weight: 700; white-space: nowrap; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.note { background: #f3ebdd; border-radius: 14px; padding: 4px 16px 12px; margin: 20px 0; }
.note p { margin: 6px 0; }
.note a { color: var(--green-dark); font-weight: 600; }
.warn { background: var(--warm-bg); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }
.strong { font-weight: 700; }
.legal { font-size: 1rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.foot { font-size: 1rem; color: var(--muted); margin: 4px 0 20px; }
.xsell { background: var(--warm-bg); border: 1px solid #e9c9a6; border-radius: 16px; padding: 4px 16px 10px; margin: 28px 0 8px; }
.xsell h3 { margin-top: 12px; }
.xsell p { margin: 4px 0; }
.clock-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 12px 0; }
.clock-status { font-weight: 700; margin: 0 0 8px; }
.totals .stat { background: var(--card); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); margin: 0 0 6px; }
.entry { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 0 0 10px; }
.entry p { margin: 0 0 6px; }
.entry-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.entry-btns .btn { margin: 4px 0; }
.links { padding-left: 0; list-style: none; }
.links li { margin: 0 0 8px; }
.links a { display: block; padding: 14px 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--green-dark); font-weight: 700; text-decoration: none; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px 12px; margin: 0 0 10px; }
.step h3 { margin: 12px 0 4px; }
.step p { margin: 0; }
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  background: #fff; border-top: 2px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabs a {
  display: flex; align-items: center; justify-content: center; min-height: 64px; text-align: center;
  font-weight: 700; color: var(--muted); text-decoration: none; padding: 6px;
}
.tabs a[aria-current=page] { color: var(--green-dark); box-shadow: inset 0 4px 0 var(--green); background: #eef6f0; }
.print-area { display: none; }
[hidden] { display: none !important; }
@media print {
  body { background: #fff; padding: 0; font-size: 12pt; }
  .top, main, .tabs { display: none !important; }
  .print-area { display: block; }
  .print-area h1 { font-size: 18pt; }
}
@media (min-width: 560px) {
  .row-btns { grid-template-columns: 1fr 1fr; gap: 10px; }
}
.unit { position: relative; }
.unit-mark { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; font-weight: 700; color: var(--muted); pointer-events: none; }
.unit-before .unit-mark { left: 14px; }
.unit-before input { padding-left: 30px; }
.unit-after .unit-mark { right: 14px; }
.unit-after input { padding-right: 34px; }
.echo { color: var(--green-dark); font-weight: 700; font-size: 1rem; margin: 4px 0 0; min-height: 1.5em; }
.inline-link { color: var(--green-dark); font-weight: 700; }
.check[hidden] { display: none; }
.warn:empty { display: none; }
