:root {
  --fl-bg:      #feeee8;
  --fl-border:  #f8c8b0;
  --fl-text:    #903018;
  --fl-icon-bg: #feeee8;
}

.app-hero{border-bottom:1px solid var(--color-border);padding:1.25rem 1.5rem 1.1rem}
.app-hero--peach{background:var(--fl-bg);border-bottom-color:var(--fl-border)}
.app-hero__inner{margin:0 auto}
.app-hero__title{font-size:clamp(1.4rem,3vw,2rem);font-weight:800;color:var(--fl-text);letter-spacing:-.02em;margin:0 0 .5rem;line-height:1.2}
.app-hero__desc{font-size:.9rem;color:var(--color-text-secondary);max-width:660px;line-height:1.6;margin:0 0 .85rem}
.app-hero__chips{display:flex;flex-wrap:wrap;gap:.35rem}
.hero-chip{display:inline-flex;align-items:center;padding:.22rem .65rem;font-size:.72rem;font-weight:700;background:var(--color-surface);border:1.5px solid var(--fl-border);border-radius:var(--radius-full);color:var(--fl-text);white-space:nowrap}

.app-wrap {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.5rem 1rem 3rem;
}
.pane-in { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 1rem; }
.pane-out { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }

.card {
  background: var(--color-surface);
  border: 1px solid var(--fl-border);
  border-radius: var(--radius-xl);
  padding: 1rem 1.125rem;
}
.card-title {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--fl-text); margin: 0 0 .75rem;
}

.field { margin-bottom: .75rem; }
.field:last-child { margin-bottom: 0; }

label.lbl {
  display: block; font-size: .72rem; font-weight: 600;
  color: var(--color-text-muted); margin-bottom: .28rem;
}

input.num-in, select.sel {
  width: 100%; box-sizing: border-box;
  padding: .4rem .6rem; font-size: .9rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg); color: var(--color-text);
  transition: border-color .15s;
}
input.num-in:focus, select.sel:focus { outline: none; border-color: var(--fl-text); }

/* Device rows */
.device-row {
  display: flex; gap: .4rem; align-items: center;
  margin-bottom: .5rem; padding-bottom: .5rem;
  border-bottom: 1px dashed var(--color-border);
}
.device-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.device-tag {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  color: var(--fl-text); background: var(--fl-bg); border: 1px solid var(--fl-border);
  border-radius: var(--radius-sm); padding: .2rem .35rem; flex-shrink: 0;
}
.device-row select.sel { flex: 1; }
.btn-remove {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: var(--radius-md);
  border: 1.5px solid var(--color-border); background: var(--color-bg);
  color: var(--color-text-muted); font-size: .9rem; font-weight: 700;
  cursor: pointer; line-height: 1;
}
.btn-remove:hover { border-color: #f0b0b0; color: #b02020; }

.add-row { display: flex; gap: .5rem; margin-top: .5rem; }
.btn-add {
  flex: 1; padding: .4rem .5rem; font-size: .76rem; font-weight: 700;
  border: 1.5px dashed var(--fl-border); border-radius: var(--radius-md);
  background: var(--fl-bg); color: var(--fl-text); cursor: pointer;
  transition: background .15s;
}
.btn-add:hover { background: var(--color-surface); }

/* Budget bar */
.budget-bar-wrap {
  width: 100%; height: 14px; border-radius: var(--radius-full);
  background: var(--color-bg); border: 1px solid var(--color-border);
  overflow: hidden; margin-bottom: .85rem;
}
.budget-bar {
  height: 100%; border-radius: var(--radius-full);
  background: var(--fl-text); transition: width .2s, background .2s;
  width: 0%;
}
.budget-bar.over { background: #b02020; }

/* Results grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .6rem;
}
.result-cell {
  background: var(--fl-bg); border: 1px solid var(--fl-border);
  border-radius: var(--radius-md); padding: .6rem .75rem;
}
.result-cell--wide { grid-column: 1 / -1; }
.result-lbl {
  font-size: .62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--color-text-muted); margin-bottom: .2rem;
  display: flex; align-items: center; gap: .25rem;
}
.result-val {
  font-size: 1.4rem; font-weight: 800; color: var(--fl-text); line-height: 1;
}
.result-val.sm { font-size: 1rem; }
.result-sub { font-size: .65rem; color: var(--color-text-muted); margin-top: .2rem; }

.overload-warning {
  margin: .75rem 0 0; padding: .5rem .7rem; font-size: .78rem; font-weight: 600;
  background: #ffeaea; color: #b02020; border: 1.5px solid #f0b0b0;
  border-radius: var(--radius-md);
}

.disclaimer {
  font-size: .74rem; line-height: 1.55; color: var(--color-text-secondary);
  background: var(--fl-bg); border: 1px solid var(--fl-border);
  border-radius: var(--radius-md); padding: .65rem .8rem; margin: 0;
}

@media (max-width: 720px) {
  .app-wrap { flex-direction: column; }
  .pane-in { width: 100%; }
  .results-grid { grid-template-columns: 1fr; }
}
