:root {
  --bg: #0f172a;
  --card: #ffffff;
  --text: #111827;
  --muted: #64748b;
  --line: #e5e7eb;
  --primary: #f97316;
  --primary-dark: #ea580c;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow: 0 18px 45px rgba(15, 23, 42, .14);
  --radius: 22px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: linear-gradient(180deg, #111827 0%, #f8fafc 240px); }
button, input, select, textarea { font: inherit; }
.app-shell { width: min(720px, 100%); margin: 0 auto; padding: 18px 14px 32px; }
.hero { color: #fff; padding: 18px 4px 16px; }
.hero__badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fed7aa; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.hero h1 { margin: 12px 0 6px; font-size: 34px; line-height: 1.05; }
.hero p { margin: 0; color: #cbd5e1; line-height: 1.45; }
.card { background: var(--card); border: 1px solid rgba(229, 231, 235, .9); border-radius: var(--radius); padding: 16px; margin: 14px 0; box-shadow: var(--shadow); }
.hidden { display: none !important; }
.section-title { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.section-title > span { flex: 0 0 auto; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: #ffedd5; color: #c2410c; font-weight: 800; }
.section-title h2 { margin: 0; font-size: 19px; }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.service-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
.service-card { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 14px; text-align: left; cursor: pointer; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.service-card:hover, .service-card.active { border-color: #fdba74; background: #fff7ed; transform: translateY(-1px); }
.service-card strong { display: block; font-size: 16px; }
.service-card small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; }
.form label > span { font-size: 13px; font-weight: 750; color: #334155; }
.form input, .form select, .form textarea { width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 12px 13px; background: #fff; color: var(--text); outline: none; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: #fb923c; box-shadow: 0 0 0 4px rgba(249, 115, 22, .12); }
.form-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.btn { width: 100%; border: 0; border-radius: 16px; padding: 13px 15px; background: #e5e7eb; color: #111827; font-weight: 800; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:active { transform: scale(.99); }
.btn-primary { background: var(--primary); color: #fff; margin-top: 12px; }
.btn-primary:hover { background: var(--primary-dark); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.result-box { display: grid; gap: 10px; }
.result-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.result-row:last-child { border-bottom: 0; }
.result-row span { color: var(--muted); }
.result-row strong { text-align: right; }
.total { padding: 14px; border-radius: 18px; background: #fff7ed; border: 1px solid #fed7aa; }
.total strong { font-size: 24px; color: #c2410c; }
.master-card { display: grid; gap: 12px; }
.master-head { display: flex; gap: 12px; align-items: center; }
.master-avatar { width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(135deg, #fed7aa, #fb923c); display: grid; place-items: center; color: #7c2d12; font-weight: 900; font-size: 22px; overflow: hidden; }
.master-avatar img { width: 100%; height: 100%; object-fit: cover; }
.master-head h3 { margin: 0; font-size: 18px; }
.master-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.master-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.master-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; line-height: 1.2; }
.master-badge-top { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.master-badge-verified { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.confidence { height: 10px; background: #e5e7eb; border-radius: 999px; overflow: hidden; }
.confidence > div { height: 100%; background: linear-gradient(90deg, #fb923c, #16a34a); border-radius: inherit; }
.alert { border-radius: 16px; padding: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; line-height: 1.45; }
.success-icon { width: 60px; height: 60px; border-radius: 22px; display: grid; place-items: center; background: #dcfce7; color: var(--success); font-size: 34px; font-weight: 900; margin-bottom: 12px; }
#successStep h2 { margin: 0 0 8px; }
#successStep p { margin: 0 0 14px; color: var(--muted); line-height: 1.45; }
@media (min-width: 640px) { .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .app-shell { padding-top: 26px; } }

.mini-section { border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: grid; gap: 10px; background: #fff; }
.mini-section h3 { margin: 0; font-size: 15px; color: #0f172a; }
.dynamic-list { display: grid; gap: 10px; }
.dynamic-row { display: grid; gap: 10px; border: 1px dashed var(--line); border-radius: 16px; padding: 10px; background: #f8fafc; }
.btn-small { padding: 10px 12px; border-radius: 12px; font-size: 13px; margin-top: 0; }
.masters-list { display: grid; gap: 12px; }
.master-card.selectable { width: 100%; border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #fff; text-align: left; cursor: pointer; }
.master-card.selectable.active { border-color: #fb923c; background: #fff7ed; box-shadow: 0 0 0 4px rgba(249,115,22,.12); }
.custom-size { display: grid; gap: 12px; }
@media (min-width: 640px) { .dynamic-row { grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; } .custom-size { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.field-error{display:block;margin-top:6px;color:#b42318;font-size:12px;line-height:1.35}.field-error.hidden{display:none}.input-error{border-color:#f04438!important;box-shadow:0 0 0 3px rgba(240,68,56,.12)!important}
.masters-toolbar { display: flex; gap: 12px; align-items: end; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; }
.masters-toolbar label { min-width: 180px; margin: 0; }
.masters-toolbar small { color: var(--muted); padding-bottom: 12px; }
.btn-more { width: 100%; justify-content: center; margin-top: 12px; }
.form-note a { color: #ea580c; font-weight: 700; text-decoration: underline; }
.custom-size.hidden, .custom-floor-size.hidden { display: none; }

.hero-banner { margin-top: 16px; border-radius: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); box-shadow: 0 18px 45px rgba(0,0,0,.18); }
.hero-banner img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.app-footer { padding: 18px 4px 4px; }
.app-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; }
.app-footer a { color: #475569; text-decoration: none; font-size: 13px; font-weight: 700; }
.app-footer a:hover { color: #ea580c; text-decoration: underline; }

.price-old { color: #64748b; text-decoration: line-through; font-weight: 800; margin-right: 8px; }
.discount-badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 11px; font-weight: 900; white-space: nowrap; }
.discount-line { margin-top: -4px; padding: 8px 10px; border-radius: 12px; background: #fef2f2; color: #b91c1c; font-size: 12px; font-weight: 800; }
.total .discount-badge { margin-bottom: 6px; }


/* V1.4.4 — tile wizard bottom navigation and master filter fix */
.tile-wizard{border:1px solid rgba(234,88,12,.22);background:#fff7ed;border-radius:16px;padding:14px;margin:12px 0 16px}
.tile-progress-head{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:14px;color:#7c2d12;margin-bottom:8px}
.tile-progress{height:8px;background:#fed7aa;border-radius:999px;overflow:hidden}
.tile-progress>div{height:100%;background:#ea580c;border-radius:999px;transition:width .2s ease}
.tile-step-title{margin:10px 0;color:#431407;font-weight:700}
.tile-step-actions{display:flex;gap:8px;justify-content:space-between;align-items:center;margin-top:8px}
.tile-step-actions .btn[disabled]{opacity:.45;cursor:not-allowed}
.calc-inline-error{border:1px solid #fecaca;background:#fef2f2;color:#991b1b;border-radius:12px;padding:10px 12px;font-size:14px;margin:12px 0}
.input-error{border-color:#ef4444!important;box-shadow:0 0 0 3px rgba(239,68,68,.14)!important}
.field-error-inline{display:block;color:#b91c1c;font-size:12px;margin-top:5px}
.result-box{transition:opacity .18s ease}
@media (max-width:520px){.tile-step-actions{position:sticky;bottom:8px;background:#fff7ed;padding-top:8px}.tile-step-actions .btn{flex:1}}

.calc-actions{display:flex;gap:8px;align-items:center;margin-top:12px}
.calc-actions .btn{flex:1;margin-top:0}
.calc-actions #calcButton{flex:2}
@media (max-width:520px){.calc-actions{position:sticky;bottom:8px;background:#fff7ed;padding-top:8px;z-index:5}}
