:root {
  --bg: #12022a;
  --panel: rgba(42, 12, 72, 0.72);
  --magenta: #ff2bd6;
  --cyan: #2ef6ff;
  --violet: #8b5cff;
  --text: #f6e9ff;
  --muted: #b79ad4;
  --line: rgba(46, 246, 255, 0.28);
  --glow: 0 0 18px rgba(255, 43, 214, 0.35);
  color: var(--text);
  font-family: "Trebuchet MS", "Avenir Next", "Segoe UI", sans-serif;
  background: var(--bg);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0 auto;
  max-width: 480px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% -10%, rgba(255, 43, 214, 0.28), transparent 42%),
    radial-gradient(circle at 5% 25%, rgba(46, 246, 255, 0.16), transparent 38%),
    radial-gradient(circle at 50% 100%, rgba(139, 92, 255, 0.22), transparent 45%),
    var(--bg);
  touch-action: manipulation;
  overflow-x: hidden;
  padding-bottom: 28px;
}
.splash {
  position: fixed; inset: 0; z-index: 50;
  background: #1a0533;
  display: grid; place-items: center;
  transition: opacity .35s ease, visibility .35s;
}
.splash img { width: 100%; height: 100%; object-fit: cover; }
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
header {
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px 6px;
}
.mark {
  width: 48px; height: 48px; border-radius: 14px;
  box-shadow: var(--glow), inset 0 0 0 1px var(--line);
}
header strong { display: block; letter-spacing: 0.02em; }
header span { color: var(--cyan); font-size: 13px; }
nav {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px 10px;
}
nav button, .primary, #exportBtn, #clearBtn, .sheet-form button {
  border: 0;
  min-height: 42px;
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(10px);
  font: inherit;
}
nav button.on, .primary {
  background: linear-gradient(135deg, var(--magenta), var(--violet));
  color: #fff;
  font-weight: 700;
  box-shadow: var(--glow);
}
main { padding: 8px 14px 24px; }
.hero { text-align: center; padding: 10px 8px 4px; }
.hero img { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 0 12px rgba(46,246,255,.35)); }
.hero h1 { margin: 8px 0 4px; font-size: 1.35rem; color: var(--cyan); }
.section { font-size: 1rem; margin: 16px 0 8px; color: var(--magenta); }
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.tile {
  background: var(--panel);
  border-radius: 16px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  backdrop-filter: blur(12px);
}
.tile small { display: block; color: var(--muted); font-size: 12px; }
.tile b { font-size: 1.35rem; color: var(--cyan); }
#trend {
  width: 100%;
  display: block;
  border-radius: 16px;
  background: rgba(10, 0, 28, 0.55);
  box-shadow: inset 0 0 0 1px var(--line);
}
.muted { color: var(--muted); font-size: 13px; }
.row-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.row-head h2 { margin: 0; }
.slim { min-height: 36px; padding: 0 14px; width: auto; }
.banner {
  width: 100%; max-height: 140px; object-fit: contain;
  margin: 0 0 12px; filter: drop-shadow(0 0 10px rgba(255,43,214,.25));
}
.sheet-form {
  display: grid; gap: 10px;
  background: var(--panel);
  padding: 14px;
  border-radius: 16px;
  margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px var(--line), var(--glow);
}
.sheet-form label {
  display: grid; gap: 4px; font-size: 13px; color: var(--muted);
}
.sheet-form input, .sheet-form select {
  min-height: 42px; border-radius: 10px; border: 0;
  padding: 0 12px; background: #1a0533; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line); font: inherit;
}
.form-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list li {
  background: var(--panel);
  border-radius: 14px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px var(--line);
  display: grid; gap: 4px;
}
.list li strong { color: var(--cyan); }
.list li span { color: var(--muted); font-size: 13px; }
.list .del {
  justify-self: end; min-height: 32px; padding: 0 10px;
  background: transparent; color: var(--magenta);
  box-shadow: inset 0 0 0 1px rgba(255,43,214,.35);
  border: 0; border-radius: 8px; font: inherit;
}
.switch {
  display: flex; align-items: center; gap: 10px;
  background: var(--panel); padding: 14px; border-radius: 14px;
  margin: 12px 0; box-shadow: inset 0 0 0 1px var(--line);
}
#exportBtn, #clearBtn { width: 100%; margin-top: 10px; }
.danger { color: #ff8ad8 !important; box-shadow: inset 0 0 0 1px rgba(255,43,214,.5) !important; }
.empty { color: var(--muted); text-align: center; padding: 18px 8px; }
