:root {
  --fl-bg:      var(--c-sakura-bg);
  --fl-border:  var(--c-sakura-border);
  --fl-text:    var(--c-sakura-text);
  --fl-icon-bg: var(--c-sakura-icon-bg);
}

/* ---- HERO ---- */

.app-hero { border-bottom: 1px solid var(--color-border); padding: 1.25rem 1.5rem 1.1rem; }
.app-hero--sakura { 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; }

/* ---- LAYOUT ---- */

.app-wrap {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.pane-in {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pane-out {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ---- CARDS ---- */

.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;
}

/* ---- FIELDS ---- */

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

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

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

.area-row {
  display: flex;
  gap: .5rem;
}
.area-row input { flex: 1; }
.area-row select { width: 80px; flex-shrink: 0; }

.slider-row { display: flex; align-items: center; gap: .5rem; }
.slider-row input[type=range] { flex: 1; accent-color: var(--fl-text); height: 4px; }
.slider-val {
  font-size: .75rem;
  font-weight: 700;
  color: var(--fl-text);
  min-width: 36px;
  text-align: right;
}

/* ---- RESULT TABLE ---- */

.colour-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.colour-table thead th {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--color-text-muted);
  padding: .3rem .5rem;
  text-align: left;
  border-bottom: 1.5px solid var(--fl-border);
}
.colour-table tbody tr:not(:last-child) td {
  border-bottom: 1px dashed var(--color-border);
}
.colour-table tbody td {
  padding: .5rem .5rem;
  color: var(--color-text-secondary);
}
.colour-table tbody td:first-child {
  font-weight: 600;
  color: var(--color-text-primary);
}
.colour-table tbody td:last-child {
  font-weight: 700;
  color: var(--fl-text);
  text-align: right;
}

/* ---- TOTALS CARD ---- */

.totals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}

.total-cell {
  background: var(--fl-bg);
  border: 1px solid var(--fl-border);
  border-radius: var(--radius-md);
  padding: .6rem .75rem;
  text-align: center;
}
.total-lbl {
  font-size: .64rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--color-text-muted);
  margin-bottom: .2rem;
}
.total-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--fl-text);
  line-height: 1;
}
.total-sub {
  font-size: .65rem;
  color: var(--color-text-muted);
  margin-top: .2rem;
}

/* ---- RESPONSIVE ---- */

@media (max-width: 680px) {
  .app-wrap { flex-direction: column; }
  .pane-in { width: 100%; }
  .totals-grid { grid-template-columns: repeat(2, 1fr); }
}
