@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600;700&display=swap');

.gomotive-app{
  --bg: #F0EDE3;
  --bg-card: #FFFFFF;
  --ink: #1F2A24;
  --ink-soft: #5B6B60;
  --green: #2F4A3D;
  --green-soft: #E4EBE4;
  --gold: #D9A441;
  --gold-soft: #FBF0D8;
  --plum: #6B4E71;
  --plum-soft: #EEE6F0;
  --line: #DDD8C9;
  --danger: #B5563F;
  --radius-card: 18px;
  --radius-pill: 999px;
  font-family: "Work Sans", -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  max-width: 430px;
  margin: 0 auto;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--line);
}
.gomotive-app *{ box-sizing: border-box; }

.gomotive-app header.top { padding: 22px 20px 8px; }
.gomotive-app .brand { display: flex; align-items: baseline; justify-content: space-between; }
.gomotive-app .brand h1 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: 28px;
  margin: 0;
  color: var(--green);
  letter-spacing: -0.01em;
}
.gomotive-app .brand .date { font-size: 13px; color: var(--ink-soft); }
.gomotive-app .tagline { font-size: 13px; color: var(--ink-soft); margin-top: 2px; }

.gomotive-app main { padding: 8px 20px 100px; }
.gomotive-app .view { display: none; }
.gomotive-app .view.active { display: block; animation: gomotive-fadein .25s ease; }
@keyframes gomotive-fadein { from{opacity:0; transform: translateY(4px)} to{opacity:1; transform: none} }

.gomotive-app .gauge-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 20px;
  margin: 14px 0;
}
.gomotive-app .gauge-num { flex: 1; }
.gomotive-app .gauge-num .big { font-family: "Fraunces", serif; font-size: 34px; font-weight: 600; color: var(--green); line-height: 1; }
.gomotive-app .gauge-num .label { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

.gomotive-app .card { background: var(--bg-card); border-radius: var(--radius-card); padding: 16px 18px; margin-bottom: 12px; }
.gomotive-app .card h3 { font-family: "Fraunces", serif; font-size: 16px; margin: 0 0 10px; color: var(--green); font-weight: 600; }
.gomotive-app .row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.gomotive-app .row:last-child { border-bottom: none; }
.gomotive-app .row .name { font-size: 14px; }
.gomotive-app .row .sub { font-size: 12px; color: var(--ink-soft); }
.gomotive-app .row .pts { font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; white-space:nowrap; margin-left: 10px;}
.gomotive-app .row .del { background:none; border:none; color: var(--ink-soft); cursor:pointer; font-size: 16px; padding: 2px 6px; }

.gomotive-app .pill-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; }
.gomotive-app .pill {
  flex: none;
  background: var(--green-soft);
  color: var(--green);
  border: none;
  border-radius: var(--radius-pill);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.gomotive-app .pill:active { background: var(--gold-soft); }

.gomotive-app form.inline { display:flex; gap:8px; margin-top: 8px; }
.gomotive-app input, .gomotive-app select {
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.gomotive-app label.field { display:block; font-size: 12px; color: var(--ink-soft); margin: 10px 0 4px; }
.gomotive-app button.primary {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 12px;
}
.gomotive-app button.primary:active { opacity: .85; }
.gomotive-app .empty { text-align:center; padding: 24px 10px; color: var(--ink-soft); font-size: 13px; }

.gomotive-app .chart-box { padding: 6px 0 2px; }

.gomotive-app nav.bottom {
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--line);
  display: flex;
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
}
.gomotive-app nav.bottom button {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 11px;
  font-family: inherit;
}
.gomotive-app nav.bottom button.active { color: var(--green); font-weight: 600; }
.gomotive-app nav.bottom svg { width: 22px; height: 22px; }

.gomotive-app .progress-track { height: 8px; border-radius: 999px; background: var(--green-soft); overflow: hidden; margin-top: 8px;}
.gomotive-app .progress-fill { height: 100%; background: var(--gold); border-radius: 999px; transition: width .4s ease; }

.gomotive-app .stat-grid { display:flex; gap: 10px; }
.gomotive-app .stat { flex:1; background: var(--bg-card); border-radius: var(--radius-card); padding: 14px; text-align:center; }
.gomotive-app .stat .v { font-family:"Fraunces",serif; font-size: 22px; font-weight:600; color: var(--plum); }
.gomotive-app .stat .l { font-size: 11px; color: var(--ink-soft); margin-top: 2px; }

.gomotive-app .toast {
  position: sticky; bottom: 90px; margin: 0 auto; width: fit-content;
  background: var(--green); color:#fff; padding: 9px 18px; border-radius: 999px;
  font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .3s ease;
}
.gomotive-app .toast.show { opacity: 1; }
