
:root {
  color-scheme: dark;
  --bg: #090d14;
  --panel: #151c29;
  --panel2: #1c2636;
  --ink: #f4f7ff;
  --muted: #96a5bb;
  --blue: #54a8ff;
  --line: #2b384a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

main {
  max-width: 720px;
  margin: auto;
  padding: calc(24px + env(safe-area-inset-top)) 18px 36px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.logo {
  font-size: 13px;
  letter-spacing: 1.5px;
  font-weight: 800;
  color: var(--blue);
}

h1 {
  font-size: 32px;
  line-height: 1.15;
  letter-spacing: -1px;
  margin: 8px 0 10px;
}

h2 {
  font-size: 25px;
  letter-spacing: -.5px;
}

small, .hint, .sub, footer {
  color: var(--muted);
}

#notice {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 18px;
  border-radius: 18px;
}

.card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #202e43, #121a28 80%);
  border: 1px solid #34465f;
  border-radius: 24px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}

.card::before {
  content: "";
  position: absolute;
  top: -65px;
  right: -65px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: rgba(84,168,255,.08);
  pointer-events: none;
}

.car-name {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -.6px;
}

.mileage {
  font-size: 22px;
  font-weight: 750;
  margin-top: 16px;
}

.amount {
  font-size: 20px;
  font-weight: 800;
  color: #83d9b1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
  margin: 20px 0;
}

.stat {
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 14px;
  min-width: 0;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.stat strong {
  display: block;
  font-size: 18px;
  overflow-wrap: anywhere;
}

button {
  cursor: pointer;
  background: #26384e;
  color: #f3f8ff;
  border: 1px solid #39516d;
  border-radius: 14px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
}

button.open {
  display: block;
  width: 100%;
  background: linear-gradient(110deg, #1686f5, #4aafff);
  border: 0;
  color: white;
  margin-top: 18px;
  padding: 15px;
}

button:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

#back {
  margin-bottom: 18px;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 0 14px;
}

.tabs button {
  white-space: nowrap;
  font-size: 13px;
  padding: 10px 13px;
}

.tabs button.active {
  background: #1775bd;
  border-color: #1775bd;
  color: white;
}

.entry {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 17px;
  margin: 12px 0;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.entry-head strong {
  font-size: 16px;
}

.entry-head time {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.entry-body {
  color: #d8e2ef;
  overflow-wrap: anywhere;
}

.empty {
  padding: 26px 12px;
  text-align: center;
  color: var(--muted);
}

footer {
  text-align: center;
  font-size: 12px;
  margin: 42px 0 0;
}
