:root {
  --bg: #f7fbf5;
  --paper: rgba(255,255,255,.86);
  --paper-strong: #ffffff;
  --ink: #20342e;
  --muted: #6a7d75;
  --line: #dbece2;
  --line-strong: #bfe2cc;
  --green: #62d98b;
  --green-strong: #28b866;
  --green-soft: #e3f8ea;
  --amber: #f2b84b;
  --red: #dd6b6b;
  --shadow: 0 20px 60px rgba(27, 70, 47, .12);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); min-height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% -10%, rgba(119, 222, 150, .28), transparent 30%),
    radial-gradient(circle at 110% 20%, rgba(255, 228, 194, .72), transparent 35%),
    linear-gradient(180deg, #f6faf4 0%, #fbf6ef 100%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 16px 14px calc(94px + var(--safe-bottom));
  position: relative;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 4px 14px; }
.brand { display:flex; align-items:center; gap:10px; font-weight: 900; letter-spacing: -.04em; font-size: 28px; }
.logo-dot { width: 36px; height: 36px; border-radius: 14px; background: linear-gradient(135deg, #bff7cf, #58d983); display:grid; place-items:center; box-shadow: 0 10px 24px rgba(46, 179, 97, .25); }
.logo-dot::after { content: ''; width: 11px; height: 18px; border: 4px solid #1e5d3b; border-left: 0; border-top: 0; transform: rotate(42deg) translate(-1px,-1px); }
.status-pill { border: 1px solid var(--line); background: rgba(255,255,255,.64); color: var(--muted); border-radius: 999px; padding: 8px 11px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.status-pill.ok { color: #167845; background: #e8f9ed; border-color: #bde8cc; }
.status-pill.warn { color: #93631e; background: #fff5dc; border-color: #f0dca1; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-xl); box-shadow: var(--shadow); backdrop-filter: blur(16px); padding: 20px; margin: 12px 0; }
.card.tight { padding: 16px; border-radius: var(--radius-lg); box-shadow: none; }
.hero { padding: 24px 20px; background: linear-gradient(160deg, rgba(255,255,255,.93), rgba(226,250,233,.82)); overflow:hidden; position: relative; }
.hero::after { content:''; position:absolute; right:-60px; top:-70px; width:180px; height:180px; background: radial-gradient(circle, rgba(98,217,139,.4), transparent 65%); }
h1 { margin: 0; font-size: clamp(38px, 10vw, 58px); line-height: .94; letter-spacing: -.07em; }
h2 { margin: 0 0 10px; font-size: 26px; line-height: 1.04; letter-spacing: -.05em; }
h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -.03em; }
p { margin: 8px 0 0; color: var(--muted); line-height: 1.5; }
.small { color: var(--muted); font-size: 13px; line-height: 1.42; }
.micro { color: var(--muted); font-size: 12px; line-height: 1.36; }
.label { display:block; margin: 15px 0 7px; font-size: 14px; font-weight: 850; color: #31483f; }
.input, .select, textarea.input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(255,255,255,.76); color: var(--ink); outline: none; padding: 15px 16px; min-height: 54px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input:focus, .select:focus, textarea.input:focus { border-color: #6bdd98; box-shadow: 0 0 0 4px rgba(98,217,139,.16); background: #fff; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.row { display:flex; gap:10px; align-items:center; }
.row > * { min-width:0; }
.grid2 { display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.segment { display:grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0 4px; }
.segment.two { grid-template-columns: repeat(2, 1fr); }
.choice { border: 1px solid var(--line); background: rgba(255,255,255,.7); min-height: 48px; border-radius: 17px; color: #395149; font-weight: 750; padding: 8px; }
.choice.active { background: var(--green-soft); border-color: #62d98b; color: #1d5d3b; box-shadow: inset 0 0 0 1px rgba(98,217,139,.25); }
.btn { border: 0; border-radius: 19px; min-height: 54px; padding: 14px 18px; font-weight: 900; color: #173126; background: linear-gradient(180deg, #abf3c1, #6edc94); box-shadow: 0 15px 30px rgba(56, 184, 103, .24); width: 100%; }
.btn:disabled { opacity: .55; cursor: default; box-shadow: none; }
.btn.secondary { background: rgba(255,255,255,.68); border: 1px solid var(--line); box-shadow: none; color: #36524a; }
.btn.ghost { background: transparent; border: 1px dashed var(--line-strong); box-shadow: none; color: #477063; }
.btn.dark { background: #20342e; color: #fff; box-shadow: 0 18px 38px rgba(32,52,46,.18); }
.btn.warning { background: #fff4d6; border: 1px solid #f2d994; box-shadow: none; color: #79500f; }
.action-grid { display:grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.action-grid .btn { min-height: 64px; font-size: 20px; border-radius: 22px; }
.kpi { display:grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 16px; }
.kpi .box { background: rgba(255,255,255,.72); border:1px solid var(--line); border-radius: 21px; padding: 12px 10px; }
.kpi .num { display:block; font-size: 24px; font-weight: 950; letter-spacing: -.05em; }
.kpi .cap { display:block; color: var(--muted); font-size: 11px; font-weight: 750; margin-top:2px; }
.progress-shell { margin-top: 18px; height: 15px; border-radius: 999px; background: #e7f2ea; overflow:hidden; border:1px solid #d7eadf; }
.progress-bar { height:100%; border-radius:999px; background: linear-gradient(90deg, #68db91, #28b866); width:0%; transition: width .25s; }
.progress-bar.over { background: linear-gradient(90deg, #f0b44d, #dd6b6b); }
.quote { border-left: 4px solid #72dc98; padding: 2px 0 2px 12px; color: #486159; font-weight: 700; }
.message { border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; margin: 12px 0; background: #fff; color: #345047; font-size: 14px; }
.message.ok { background: #e9faee; border-color: #bdeaca; color:#176c41; }
.message.warn { background: #fff7e2; border-color: #efd693; color:#745015; }
.message.bad { background: #fff0ef; border-color: #edc2bd; color:#8a2d24; }
.tabs { position: fixed; z-index: 30; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 520px); padding: 8px 10px calc(8px + var(--safe-bottom)); background: rgba(250,255,250,.88); border-top: 1px solid var(--line); backdrop-filter: blur(18px); display:grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tab { border:0; background: transparent; color: #6c8078; border-radius: 16px; padding: 9px 4px 8px; min-height: 54px; font-size: 11px; font-weight: 850; display:grid; gap:2px; place-items:center; }
.tab span { font-size: 19px; line-height: 1; }
.tab.active { background: #e3f8ea; color: #1c7446; }
.plan-list { display:grid; gap:8px; margin-top: 12px; }
.plan-day { display:grid; grid-template-columns: 56px 1fr auto; gap:10px; align-items:center; padding: 11px; border:1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.63); }
.plan-day.today { border-color:#65d990; background:#e9faee; }
.barline { height:10px; background:#e7f1ea; border-radius:999px; overflow:hidden; }
.barline > i { display:block; height:100%; background:#62d98b; border-radius:999px; width: 0; }
.stat-row { display:grid; grid-template-columns: 54px 1fr 42px; align-items:center; gap:10px; margin: 9px 0; }
.lock { display:inline-flex; align-items:center; gap:6px; padding: 6px 9px; border-radius:999px; background:#f0f3ee; color:#63746e; font-size:12px; font-weight:850; }
.pro-badge { display:inline-flex; align-items:center; gap:6px; padding: 8px 10px; border-radius:999px; background:#20342e; color:#fff; font-size:12px; font-weight:900; }
.feature { display:flex; gap:10px; align-items:flex-start; padding: 10px 0; border-bottom: 1px solid rgba(196,222,207,.6); }
.feature:last-child { border-bottom:0; }
.check { width:24px; height:24px; border-radius: 9px; background:#dcf8e5; display:grid; place-items:center; color:#159350; font-weight:950; flex:none; }
.install-steps { counter-reset: step; display:grid; gap:10px; margin-top: 18px; }
.install-step { counter-increment: step; display:flex; align-items:center; gap:12px; padding: 13px; border:1px solid var(--line); background:#fff; border-radius: 20px; }
.install-step::before { content: counter(step); width:32px; height:32px; display:grid; place-items:center; background:#20342e; color:#fff; border-radius: 12px; font-weight:900; flex:none; }
.footer-links { display:flex; flex-wrap:wrap; gap:10px; margin: 16px 2px 0; }
.footer-links a { color:#5b7169; font-size:12px; text-decoration:none; border-bottom:1px solid rgba(91,113,105,.28); }
.hidden { display:none !important; }
@media (max-width: 370px) {
  .app-shell { padding-left: 10px; padding-right: 10px; }
  .card { padding: 16px; border-radius: 26px; }
  h1 { font-size: 40px; }
  .segment { grid-template-columns:1fr; }
  .kpi { grid-template-columns:1fr; }
}
