/* Palkkapino – mobile first, iPhone-turva-alueet huomioitu. */

:root {
  --bg: #06110d;
  --card-bg: #0d1f19;
  --sheet: #10241d;
  --input: #0a1914;
  --line: rgba(160, 255, 210, 0.08);
  --line-2: rgba(160, 255, 210, 0.14);
  --text: #ecf7f1;
  --muted: #92a99f;
  --faint: #61766d;
  --accent: #2fd27a;
  --accent-2: #19b865;
  --gold: #f6c453;
  --danger: #ff6b6b;
  --warn: #ffb547;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --tabbar-h: 58px;
  --rail-w: 0px;

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
html.sheet-open, html.sheet-open body { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(47, 210, 122, 0.12), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior-y: none;
}
input, textarea { -webkit-user-select: text; user-select: text; }
button { touch-action: manipulation; }
img { -webkit-user-drag: none; }
h1, h2, h3, p { margin: 0; }

/* Tilarivin (kello, Dynamic Island) taakse jäävä sumennettu kaistale */
.status-shield {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--sat);
  z-index: 50;
  background: rgba(6, 17, 13, 0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  pointer-events: none;
}

.views {
  max-width: 600px;
  margin: 0 auto;
  padding:
    calc(var(--sat) + 14px)
    max(16px, var(--sar))
    calc(var(--tabbar-h) + var(--sab) + 28px)
    max(16px, var(--sal));
}
.view { animation: viewIn 0.22s ease-out; }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- Alapalkki ---------------- */

.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 4px max(4px, var(--sal)) calc(4px + var(--sab)) max(4px, var(--sar));
  background: rgba(8, 21, 17, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(20px);
  backdrop-filter: saturate(160%) blur(20px);
  border-top: 1px solid var(--line);
}
.tab {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  color: var(--faint);
  font: inherit;
  font-size: clamp(10px, 2.75vw, 11px);
  font-weight: 600;
  min-height: 50px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 14px;
  cursor: pointer;
  transition: color 0.15s;
}
.tab .ico { width: 25px; height: 25px; stroke-width: 1.9; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.015em; }
.tab.on { color: var(--accent); }
.tab:active { transform: scale(0.94); }

/* ---------------- Yleiset ---------------- */

.ico { width: 20px; height: 20px; flex: none; }

.card {
  display: block;
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 10px 30px -18px rgba(0, 0, 0, 0.6);
}
button.card { width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer; }
button.card:active { transform: scale(0.99); }
.card-title { font-size: 17px; font-weight: 750; margin-bottom: 12px; }

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.muted { color: var(--muted); }

.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 2px 2px 14px; }
.hello-text { min-width: 0; }
.hello-sub { color: var(--muted); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello-title { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }

.view-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 2px 16px; min-height: 44px; }
.view-head h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line-2);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  flex: none;
}

/* ---------------- Painikkeet ---------------- */

.btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  font: inherit;
  font-size: 16px;
  font-weight: 650;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s, background 0.2s, opacity 0.2s;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .tab:focus-visible, .seg-btn:focus-visible, .badge:focus-visible, .shift-row:focus-visible, .link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn-lg { min-height: 56px; font-size: 17px; border-radius: 16px; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn-sm .ico { width: 18px; height: 18px; }
.btn-primary { background: linear-gradient(180deg, #3ee08c, #1fbf6c); color: #04150c; }
.btn-ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-2); }
.btn-text { background: transparent; color: var(--muted); }
.btn-danger, .btn-stop { background: linear-gradient(180deg, #ff8073, #e5484d); color: #fff; }
.btn-gold { background: linear-gradient(180deg, #ffdc80, #eaa936); color: #2b1b00; }
.danger { color: var(--danger) !important; }
.wide { width: 100%; }
.btn-stack { display: grid; gap: 10px; margin: 12px 0 6px; }

.btn-start {
  width: 100%;
  min-height: 68px;
  font-size: 20px;
  font-weight: 750;
  border-radius: 20px;
  background: linear-gradient(180deg, #43e391, #17b763);
  color: #03130b;
  box-shadow: 0 12px 30px -10px rgba(47, 210, 122, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-start .ico { width: 24px; height: 24px; }

.icon-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  cursor: pointer;
}
.icon-btn.sm { width: 36px; height: 36px; }
.icon-btn .ico { width: 18px; height: 18px; }

.link {
  -webkit-appearance: none;
  appearance: none;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  min-height: 44px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.link .ico { width: 16px; height: 16px; }

/* ---------------- Rahapino ---------------- */

.pile-card {
  overflow: hidden;
  padding-bottom: 14px;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(246, 196, 83, 0.11), transparent 62%),
    linear-gradient(180deg, #11291f, #0b1c17);
}
.big-money {
  font-family: var(--font-round);
  font-size: clamp(38px, 11.5vw, 56px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff7da 0%, #f6c453 58%, #e3a034 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.pile-meta { color: var(--muted); font-size: 14px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.pile-stage { position: relative; margin: 6px -8px 4px; }
.pile-svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 420 / 232;
  max-width: 470px;
  margin: 0 auto;
  overflow: visible;
  color: var(--muted);
  font-family: var(--font-round);
}
.pile-svg .drop { animation: pdrop 0.55s cubic-bezier(0.25, 1.25, 0.5, 1) both; }
.pile-svg .pc.drop { animation-duration: 0.45s; }
@keyframes pdrop {
  0% { transform: translateY(-110px); opacity: 0; }
  45% { opacity: 1; }
  100% { transform: translateY(0); opacity: 1; }
}
.pempty { opacity: 0.4; }
.pmore { fill: var(--muted); font-size: 15px; font-weight: 800; }
.pile-unit {
  position: absolute;
  right: 12px;
  top: 2px;
  font-size: 12px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--line);
}
.seg-btn {
  -webkit-appearance: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: clamp(11.5px, 3.4vw, 14px);
  font-weight: 650;
  min-height: 40px;
  padding: 0 2px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.seg-btn.on { background: rgba(255, 255, 255, 0.12); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.seg-sm .seg-btn { min-height: 40px; font-size: 13px; padding: 0 10px; }

/* ---------------- Vuorokortti ---------------- */

.shift-card { padding: 14px; }
.shift-card.live {
  border-color: rgba(47, 210, 122, 0.35);
  background: linear-gradient(180deg, rgba(47, 210, 122, 0.13), rgba(47, 210, 122, 0.03)), var(--card-bg);
}
.shift-card.paused { border-color: rgba(255, 181, 71, 0.4); background: linear-gradient(180deg, rgba(255, 181, 71, 0.1), rgba(255, 181, 71, 0.02)), var(--card-bg); }
.live-head { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; flex-wrap: wrap; }
.live-since { color: var(--muted); font-weight: 500; margin-left: auto; font-size: 14px; }
.live-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
  animation: pulse 1.6s infinite;
}
.paused .live-dot { background: var(--warn); animation: none; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 210, 122, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(47, 210, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 210, 122, 0); }
}
.live-grid { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 12px 0 2px; }
.live-money {
  font-family: var(--font-round);
  font-size: clamp(28px, 8.6vw, 36px);
  font-weight: 800;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}
.paused .live-money { color: var(--warn); }
.live-right { text-align: right; }
.live-time { font-family: var(--font-round); font-size: clamp(22px, 6.6vw, 28px); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.live-label { color: var(--muted); font-size: 13px; }
.live-rate { color: var(--faint); font-size: 13px; margin-top: 6px; font-variant-numeric: tabular-nums; }
.live-rate.ot { color: #ffd36b; font-weight: 650; text-shadow: 0 0 12px rgba(246, 196, 83, 0.35); }
.live-site { margin-top: 10px; max-width: 100%; cursor: pointer; font-weight: 650; }
.live-site > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.live-site .ico { width: 17px; height: 17px; flex: none; color: var(--accent); }
.live-site.empty { color: var(--muted); border-style: dashed; background: transparent; }
.live-site.empty .ico { color: var(--muted); }
.btn-row { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; margin-top: 14px; }
.warn-text { display: block; color: var(--warn); font-size: 14px; font-style: normal; margin-top: 8px; line-height: 1.35; }
.idle-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 2px 10px; margin-top: 8px; }

.live-row { display: flex; align-items: center; gap: 12px; border-color: rgba(47, 210, 122, 0.35); }

/* ---------------- Pienet kortit ---------------- */

.mini-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.mini-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14.5px; color: var(--muted); font-weight: 600; }
.mini-head b { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini-head > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-sub { font-size: 13.5px; color: var(--muted); }
.next-ach { flex-direction: row; align-items: center; gap: 14px; }
.next-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.next-name { font-weight: 700; font-size: 16px; color: var(--text); }
.nudge { border-color: rgba(246, 196, 83, 0.25); }
.nudge .btn { margin-top: 2px; }

.bar { display: block; width: 100%; height: 8px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), #5ff0a5); transition: width 0.5s ease; }
.bar.gold i { background: linear-gradient(90deg, #e9a93a, #ffd978); }
.bar.sm { height: 5px; }
.bar.lg { height: 12px; }

.install-banner {
  display: flex;
  align-items: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(246, 196, 83, 0.16), rgba(47, 210, 122, 0.1));
  border: 1px solid rgba(246, 196, 83, 0.3);
  border-radius: 18px;
  padding: 4px 6px 4px 4px;
  margin-bottom: 14px;
}
.install-main {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 6px;
  min-height: 56px;
  cursor: pointer;
}
.install-main img { border-radius: 11px; flex: none; }
.install-main > span { flex: 1; min-width: 0; }
.install-main b { display: block; font-size: 16px; }
.install-main small { display: block; color: var(--muted); font-size: 13px; }
.install-main .ico { color: var(--muted); }

/* ---------------- Mitalit ---------------- */

.medal {
  --m1: #2a3a34; --m2: #18241f; --m3: #3a4d46;
  position: relative;
  width: 64px; height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: radial-gradient(circle at 32% 28%, var(--m1), var(--m2) 72%);
  box-shadow: inset 0 0 0 3px var(--m3), inset 0 -6px 12px rgba(0, 0, 0, 0.25), 0 6px 14px rgba(0, 0, 0, 0.35);
}
.medal .emoji { font-size: 30px; line-height: 1; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35)); }
.medal.sm { width: 44px; height: 44px; }
.medal.sm .emoji { font-size: 21px; }
.medal.xl { width: 112px; height: 112px; box-shadow: inset 0 0 0 5px var(--m3), inset 0 -10px 20px rgba(0, 0, 0, 0.25), 0 12px 30px rgba(0, 0, 0, 0.45); }
.medal.xl .emoji { font-size: 54px; }
.tier-1 { --m1: #f6cfa8; --m2: #a5643a; --m3: #dc9c68; }
.tier-2 { --m1: #ffffff; --m2: #8592a0; --m3: #cfd8e0; }
.tier-3 { --m1: #fff3b0; --m2: #c58c14; --m3: #f3cb52; }
.tier-4 { --m1: #e2fdff; --m2: #6656d6; --m3: #a6ecff; }
.medal.pop { animation: medalPop 0.6s cubic-bezier(0.2, 1.5, 0.4, 1) both; }
@keyframes medalPop { from { transform: scale(0.3) rotate(-25deg); } to { transform: none; } }

/* ---------------- Tilastot ---------------- */

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.kpi { background: var(--card-bg); border: 1px solid var(--line); border-radius: 18px; padding: 13px 14px; min-width: 0; }
.kpi-label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-val { display: block; font-family: var(--font-round); font-size: clamp(18px, 5.4vw, 22px); font-weight: 800; margin: 3px 0 1px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-sub { display: block; font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.ot .kpi-val { color: #ffd36b; }

.goal-card { display: flex; align-items: center; gap: 16px; }
.ring-wrap { position: relative; width: 116px; height: 116px; flex: none; }
.ring { width: 100%; height: 100%; display: block; }
.ring-bg { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 11; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round; transition: stroke-dashoffset 0.6s ease; }
.ring-fg.full { stroke: var(--gold); }
.ring-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-text b { font-family: var(--font-round); font-size: 24px; font-weight: 800; line-height: 1; }
.ring-text span { font-size: 11px; color: var(--muted); margin-top: 3px; max-width: 80px; line-height: 1.2; }
.goal-side { flex: 1; min-width: 0; }
.goal-num { color: var(--muted); font-size: 14px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.goal-num b { color: var(--text); font-size: 18px; }
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; align-items: end; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wd-bar { display: flex; align-items: flex-end; width: 100%; max-width: 22px; height: 56px; border-radius: 7px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.wd-bar i { display: block; width: 100%; background: linear-gradient(180deg, #5ff0a5, var(--accent-2)); border-radius: 7px; }
.wd-l { font-size: 11px; color: var(--faint); font-weight: 600; }
.wd.today .wd-l { color: var(--gold); }
.wd.today .wd-bar { box-shadow: inset 0 0 0 1.5px rgba(246, 196, 83, 0.6); }

.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { font-size: 17px; font-weight: 750; }
.chart-sel { display: flex; flex-direction: column; min-height: 46px; margin-bottom: 4px; }
.chart-sel b { font-family: var(--font-round); font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-sel span { font-size: 13px; color: var(--muted); }
.chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.chart .grid { stroke: rgba(255, 255, 255, 0.07); stroke-width: 1; }
.chart .grid-l { fill: var(--faint); font-size: 10px; }
.chart .bar-r { fill: var(--accent); opacity: 0.8; transition: opacity 0.2s; }
.chart .cur .bar-r { fill: var(--gold); opacity: 0.95; }
.chart .sel .bar-r { opacity: 1; fill: #7af5b6; }
.chart .cur.sel .bar-r { fill: #ffe08a; }
.chart .bar-0 { fill: rgba(255, 255, 255, 0.12); }
.chart .bar-hit { cursor: pointer; }
.chart .bar-l { fill: var(--faint); font-size: 10px; font-weight: 600; }
.chart .bar-l.cur { fill: var(--gold); }
.chart .bar-l.sel { fill: var(--text); }

.rec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rec { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; min-width: 0; }
.rec span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.rec b { display: block; font-family: var(--font-round); font-size: 18px; font-weight: 800; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.rec small { display: block; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- Vuorolista ---------------- */

.month { margin-bottom: 18px; }
.month-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px 8px; }
.month-head h2 { font-size: 17px; font-weight: 750; }
.month-head span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
.shift-list { list-style: none; margin: 0; padding: 0; background: var(--card-bg); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.shift-list li + li { border-top: 1px solid var(--line); }
.shift-row {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  min-height: 64px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.shift-row:active { background: rgba(255, 255, 255, 0.04); }
.sr-date { width: 38px; flex: none; text-align: center; }
.sr-date b { display: block; font-family: var(--font-round); font-size: 21px; line-height: 1.05; }
.sr-date small { color: var(--muted); font-size: 12px; font-weight: 600; }
.sr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sr-time { font-weight: 650; font-variant-numeric: tabular-nums; }
.sr-sub, .sr-note { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-note { color: var(--faint); font-style: italic; }
.sr-money { font-weight: 750; font-variant-numeric: tabular-nums; color: var(--accent); white-space: nowrap; flex: none; }
.tag { font-style: normal; font-size: 11px; padding: 1px 5px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); color: var(--muted); vertical-align: 1px; }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); display: grid; gap: 12px; justify-items: center; }
.empty-ico { font-size: 44px; }

/* ---------------- Saavutukset ---------------- */

.ach-summary { display: flex; align-items: center; gap: 16px; }
.ach-count { flex: none; font-family: var(--font-round); }
.ach-count b { font-size: 40px; font-weight: 800; color: var(--gold); }
.ach-count span { font-size: 18px; color: var(--muted); font-weight: 700; margin-left: 2px; }
.ach-sum-body { flex: 1; min-width: 0; display: grid; gap: 10px; }
.tier-counts { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 700; color: var(--muted); }
.ach-cat { margin: 18px 0 6px; }
.ach-cat h2 { font-size: 15px; font-weight: 750; color: var(--muted); margin: 0 4px 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.badge {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 6px 12px;
  min-height: 148px;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}
.badge:active { transform: scale(0.97); }
.badge.done { border-color: rgba(246, 196, 83, 0.22); background: linear-gradient(180deg, rgba(246, 196, 83, 0.08), transparent 70%), var(--card-bg); }
.badge:not(.done) .medal { background: #13211c; box-shadow: inset 0 0 0 2px #22342d; }
.badge:not(.done) .emoji { filter: grayscale(1); opacity: 0.32; }
.badge-name { font-size: 13px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; -webkit-hyphens: manual; hyphens: manual; }
.badge-sub { font-size: 12px; color: var(--muted); margin-top: auto; }
.badge .bar { width: 72%; margin-top: auto; }

.ach-detail { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 6px 4px 14px; }
.ach-detail h2 { font-size: 24px; font-weight: 800; margin-top: 4px; }
.ach-detail p { color: var(--muted); max-width: 320px; }
.ach-detail:not(.done) .medal { filter: grayscale(0.85) brightness(0.8); }
.ach-detail .bar { max-width: 260px; margin-top: 6px; }
.ach-date { color: var(--gold) !important; font-weight: 700; }
.ach-prog { font-weight: 700; color: var(--text) !important; font-variant-numeric: tabular-nums; }
.tier-name { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--m3); }

/* ---------------- Juhlinta ---------------- */

#celebrate {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: calc(var(--sat) + 20px) 20px calc(var(--sab) + 20px);
  background: radial-gradient(circle at 50% 42%, rgba(246, 196, 83, 0.2), rgba(0, 0, 0, 0.78) 62%);
  opacity: 0;
  transition: opacity 0.2s;
}
#celebrate.show { opacity: 1; }
.cele-card {
  width: min(360px, 100%);
  background: var(--sheet);
  border-radius: 28px;
  padding: 28px 22px 20px;
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 1px solid rgba(246, 196, 83, 0.35);
  box-shadow: 0 0 70px rgba(246, 196, 83, 0.22), 0 20px 50px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.32s cubic-bezier(0.2, 1.4, 0.4, 1);
}
#celebrate.show .cele-card { transform: none; }
.cele-card .eyebrow { color: var(--gold); margin-top: 8px; }
.cele-card h2 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.cele-desc { color: var(--muted); margin-bottom: 10px; }
.cele-card .btn { width: 100%; margin-top: 8px; }
.cele-list { display: grid; gap: 8px; width: 100%; max-height: 50vh; overflow-y: auto; margin: 6px 0; text-align: left; }
.cele-item { display: flex; align-items: center; gap: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.04); border-radius: 14px; padding: 6px 10px; }

#confetti { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 80; pointer-events: none; display: none; }
#confetti.on { display: block; }

/* ---------------- Asetukset ---------------- */

.group { padding: 4px 16px; }
.group .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  border-bottom: 1px solid var(--line);
}
.group .row:last-child { border-bottom: 0; }
.group .row > span:first-child { font-weight: 550; min-width: 0; }
.group .row > .suffix, .group .row > input:not(.switch) { width: 148px; flex: none; }
.group .row input:not(.switch) { text-align: right; }
.row-title { font-weight: 750; font-size: 16px; padding: 14px 0 4px; }
.group-text { color: var(--muted); font-size: 14.5px; line-height: 1.45; margin: 4px 0; }
.group > .btn-text { width: 100%; }
.group-note { color: var(--faint); font-size: 13px; line-height: 1.4; margin: 2px 6px 14px; }
.group .group-note { margin: 8px 0 12px; }
.goal-form { padding: 6px 0 4px; }
.goal-form .group-note { margin: 0 0 6px; }
.goal-now { display: grid; gap: 8px; padding: 8px 0 6px; }
.version { text-align: center; color: var(--faint); font-size: 12.5px; margin: 6px 0 10px; }

input.switch {
  -webkit-appearance: none;
  appearance: none;
  width: 51px;
  height: 31px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
  flex: none;
  margin: 0;
  cursor: pointer;
  transition: background 0.2s;
}
input.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s;
}
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(20px); }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------------- Lomakkeet ---------------- */

input:not([type]), input[type="text"], input[type="date"], input[type="time"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 50px;
  margin: 0;
  font: inherit;
  font-size: 17px;
  color: var(--text);
  background: var(--input);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  padding: 0 14px;
  line-height: 48px;
}
input[type="date"], input[type="time"] { text-align: left; font-variant-numeric: tabular-nums; }
input::-webkit-date-and-time-value { text-align: left; min-height: 1.2em; }
input::-webkit-calendar-picker-indicator { filter: invert(0.8); opacity: 0.7; }
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-color: rgba(47, 210, 122, 0.7); box-shadow: 0 0 0 3px rgba(47, 210, 122, 0.18); }

.suffix { position: relative; display: block; min-width: 0; }
.suffix input { padding-right: 54px; }
.suffix i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none; font-size: 15px; }
.group .row .suffix input { padding-right: 46px; }
.group .row .suffix i { right: 12px; }

.form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field > span:first-child { font-size: 13px; font-weight: 650; color: var(--muted); padding-left: 2px; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.form-preview {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(47, 210, 122, 0.08);
  border: 1px solid rgba(47, 210, 122, 0.2);
  text-align: center;
}
.form-preview b { font-family: var(--font-round); font-size: 30px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1.15; }
.form-preview b.muted { color: var(--faint); }
.form-preview span { color: var(--muted); font-size: 14px; }
.form-preview .warn-text { margin-top: 2px; font-size: 13px; }
.form-error { color: var(--danger); font-size: 14.5px; font-weight: 650; }
.form-error:empty { display: none; }

/* ---------------- Arkit ---------------- */

#sheetRoot { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.58); opacity: 0; transition: opacity 0.22s; }
#sheetRoot.show .sheet-backdrop { opacity: 1; }
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  margin: 0 auto;
  max-width: 560px;
  max-height: calc(100% - var(--sat) - 10px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  background: var(--sheet);
  border: 1px solid var(--line-2);
  border-bottom: 0;
  border-radius: 26px 26px 0 0;
  padding: 6px max(18px, var(--sar)) calc(18px + var(--sab)) max(18px, var(--sal));
  transform: translateY(105%);
  transition: transform 0.28s cubic-bezier(0.2, 0.85, 0.25, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
  -webkit-user-select: none;
  user-select: none;
}
#sheetRoot.show .sheet { transform: none; }
.sheet-grip { width: 38px; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.18); margin: 4px auto 6px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; margin-bottom: 8px; }
.sheet-head h2 { font-size: 21px; font-weight: 800; }
.sheet-actions { display: grid; gap: 8px; margin-top: 8px; }
.sheet-center .sheet-head { margin-bottom: 0; }

.onb-hero { text-align: center; display: grid; justify-items: center; gap: 8px; padding: 8px 6px 18px; }
.onb-icon { border-radius: 18px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45); }
.onb-hero h2 { font-size: 25px; font-weight: 800; margin-top: 6px; }
.onb-hero p { color: var(--muted); max-width: 320px; }

.steps { list-style: none; margin: 4px 0 16px; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.45; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(47, 210, 122, 0.16); color: var(--accent); font-weight: 800; font-size: 15px; }
.ico.inline { width: 19px; height: 19px; vertical-align: -4px; color: #5aa9ff; }
.callout { display: grid; gap: 10px; background: rgba(246, 196, 83, 0.08); border: 1px solid rgba(246, 196, 83, 0.25); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; color: var(--muted); font-size: 14.5px; line-height: 1.45; }

.import-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.import-summary div { background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; min-width: 0; }
.import-summary b { display: block; font-family: var(--font-round); font-size: 20px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.import-summary span { font-size: 12.5px; color: var(--muted); }

/* ---------------- Ilmoitukset ---------------- */

#toasts {
  position: fixed;
  left: var(--rail-w);
  right: 0;
  bottom: calc(var(--tabbar-h) + var(--sab) + 12px);
  z-index: 75;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  max-width: 520px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(24, 42, 35, 0.97);
  color: var(--text);
  border: 1px solid var(--line-2);
  padding: 10px 12px 10px 16px;
  min-height: 48px;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
  font-size: 15px;
  font-weight: 550;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
}
.toast.show { transform: none; opacity: 1; }
.toast.error { border-color: rgba(255, 107, 107, 0.55); }
.toast-btn {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-weight: 800;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0 6px;
  min-height: 40px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------------- Vaakatila ja isot näytöt ---------------- */

@media (orientation: landscape) and (max-height: 500px) {
  .pile-stage { max-width: 420px; margin-left: auto; margin-right: auto; }
  .hello-title, .view-head h1 { font-size: 26px; }
}

@media (min-width: 700px) {
  .sheet {
    top: 50%;
    bottom: auto;
    border-radius: 26px;
    border-bottom: 1px solid var(--line-2);
    max-height: min(86vh, 760px);
    padding-bottom: 20px;
    transform: translateY(-46%) scale(0.98);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
  }
  #sheetRoot.show .sheet { transform: translateY(-50%); opacity: 1; }
  .sheet-grip { display: none; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  :root { --rail-w: 104px; --tabbar-h: 0px; }
  body { padding-left: var(--rail-w); }
  .tabbar {
    top: 0;
    right: auto;
    width: var(--rail-w);
    grid-template-columns: 1fr;
    grid-auto-rows: 74px;
    align-content: start;
    gap: 6px;
    padding: 28px 10px;
    border-top: 0;
    border-right: 1px solid var(--line);
  }
  .tab { font-size: 12px; }
  .views { padding-top: 32px; padding-bottom: 48px; }
  #toasts { bottom: 28px; }
}

@media (hover: hover) {
  .btn:hover { filter: brightness(1.08); }
  .tab:hover { color: var(--muted); }
  .tab.on:hover { color: var(--accent); }
  .badge:hover, .shift-row:hover, button.card:hover { background-color: rgba(255, 255, 255, 0.03); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; opacity: 0; }

/* ---------------- Tukivertailu ---------------- */

.pile-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 36px; }
.pile-top .eyebrow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-mini { flex: none; padding: 3px; gap: 2px; border-radius: 12px; }
.seg-mini .seg-btn { min-height: 36px; font-size: 12.5px; padding: 0 9px; border-radius: 9px; }
.seg-mini .seg-btn.on { background: rgba(246, 196, 83, 0.18); color: #ffe39a; }

.big-money.extra { background: linear-gradient(180deg, #f2fff7 0%, #5ff0a5 52%, #f6c453 100%); -webkit-background-clip: text; background-clip: text; }
.big-money.todo { background: none; color: #dfe9e4; -webkit-text-fill-color: currentColor; }

.cmp-strip:empty { display: none; }
.cmp-strip { margin-top: 8px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cmp-line { display: block; line-height: 1.35; }
.cmp-line b.plus, b.plus { color: var(--accent); }
b.minus { color: var(--danger); }
.cmp-cover { display: grid; gap: 7px; }
.cmp-cover .bar { height: 9px; }

.live-left { min-width: 0; }
.live-money.extra { color: #f6c453; }
.live-money.todo { color: #dfe9e4; }
.live-sub:empty { display: none; }
.live-sub { display: grid; gap: 6px; margin-top: 8px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Legendaarinen pino: vain tuen ylittävä raha, kultaa ja hohtoa */
.pile-svg .halo { transform-box: fill-box; transform-origin: center; animation: haloPulse 2.8s ease-in-out infinite; }
@keyframes haloPulse { 0%, 100% { opacity: 0.6; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.04); } }
.pile-svg .spark { fill: #fff3c4; opacity: 0; transform-box: fill-box; transform-origin: center; animation: twinkle 2.2s ease-in-out infinite both; }
@keyframes twinkle {
  0%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); }
  45% { opacity: 1; transform: scale(1) rotate(45deg); }
  70% { opacity: 0.25; transform: scale(0.55) rotate(70deg); }
}
.pile-svg .sweep { animation: sweep 3.6s ease-in-out infinite; }
@keyframes sweep { 0% { transform: translateX(0); } 55%, 100% { transform: translateX(290px); } }
.pile-svg .pempty.leg { color: #f6c453; opacity: 0.5; }
.pile-card:has(.pile-svg.legendary) {
  border-color: rgba(246, 196, 83, 0.26);
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(246, 166, 35, 0.16), transparent 65%),
    radial-gradient(120% 70% at 50% 0%, rgba(246, 196, 83, 0.11), transparent 62%),
    linear-gradient(180deg, #13291f, #0b1c17);
}

.choices { border: 0; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 0; }
.choices legend { font-size: 13px; font-weight: 650; color: var(--muted); padding: 0 0 6px 2px; }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--input);
  border: 1px solid var(--line-2);
  cursor: pointer;
}
.choice:has(input:checked) { border-color: rgba(47, 210, 122, 0.65); background: rgba(47, 210, 122, 0.08); }
.choice input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 1px 0 0;
  border-radius: 50%;
  border: 2px solid var(--faint);
  display: grid;
  place-items: center;
}
.choice input:checked { border-color: var(--accent); }
.choice input:checked::after { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.choice b { display: block; font-size: 16px; }
.choice small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; margin-top: 2px; }

.row-btn {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 8px 0;
  cursor: pointer;
}
.row-btn b { display: block; font-weight: 650; }
.row-btn small { display: block; color: var(--muted); font-size: 13px; }
.row-btn .ico { color: var(--muted); }

.benefit-card { border-color: rgba(246, 196, 83, 0.22); }
.vs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.vs-box { background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); border-radius: 14px; padding: 11px 12px; min-width: 0; }
.vs-box span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-box b { display: block; font-family: var(--font-round); font-size: 19px; font-weight: 800; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; color: #c9d6d0; }
.vs-box.work b { color: var(--text); }
.vs-box small { display: block; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-result { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin: 12px 2px 4px; }
.vs-result b { font-family: var(--font-round); font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.vs-result.plus b { color: var(--accent); }
.vs-result span { color: var(--muted); font-size: 14px; }
.bchart { margin: 6px 0 12px; }
.bchart .bb-base { fill: #3a4a43; }
.bchart .bb-extra { fill: var(--accent); }
.bchart .bb-zero { fill: rgba(255, 255, 255, 0.12); }
.bchart .bb-level { stroke: #f6c453; stroke-width: 1.6; stroke-dasharray: 4 3; }
.bchart .bb-val { font-size: 10px; font-weight: 800; fill: var(--muted); }
.bchart .bb-val.plus { fill: var(--accent); }
.bchart .bb-val.minus { fill: var(--danger); }
.bchart .bb-l { fill: var(--faint); font-size: 10.5px; font-weight: 600; }
.bchart .bb-l.cur { fill: var(--gold); }

.big-label:empty { display: none; }
.big-label { font-size: 14px; font-weight: 650; color: var(--muted); margin-top: 1px; }
.big-money.extra + .big-label { color: #8ff0bd; }

/* ---------------- Työmaat ja korotukset (v1.3) ---------------- */

.site-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -2px; min-width: 0; }
.site-chip { cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-weight: 650; }
.site-chip.on { background: rgba(47, 210, 122, 0.16); border-color: rgba(47, 210, 122, 0.6); color: var(--text); }

.site-list { list-style: none; margin: 0; padding: 0; }
.site-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.site-list li:last-child { border-bottom: 0; padding-bottom: 2px; }
.site-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.site-main b { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-main small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.site-money { font-weight: 750; color: var(--accent); white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; }

.group .row > span:first-child small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; line-height: 1.35; }
.group .row > span:first-child small:first-of-type { margin-top: 2px; }
.group .row:has(small) { padding: 9px 0; }

/* ---------------- Päivärahat ja kilometrit (v1.4) ---------------- */

.diem-seg .seg-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; line-height: 1.15; }
.diem-seg .seg-btn b { font-weight: 700; }
.diem-seg .seg-btn small { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.diem-seg .seg-btn.on { background: rgba(47, 210, 122, 0.16); color: var(--text); box-shadow: inset 0 0 0 1px rgba(47, 210, 122, 0.55); }
.diem-seg .seg-btn.on small { color: var(--accent); }
#allowSection .btn-text { width: 100%; }
.suffix.wide input, .group .row .suffix.wide input { padding-right: 62px; }
