/* Time Genius — stylesheet
   Design tokens mirror the Genius Space homepage (style.css).
   Loaded by index.html, cached by sw.js. */

/* ===== Genius Space — design tokens (mirrors style.css) ===== */
:root {
  --bg: #08080a;
  --bg2: #111114;
  --card: #16161b;
  --inp: #1e1e25;
  --hov: #26262e;
  --brd: #2a2a33;
  --t1: #f0eff4;
  --t2: #9896a3;
  --t3: #6b6878;
  --ac: #6c5ce7;
  --acl: #a29bfe;
  --acg: rgba(108, 92, 231, .12);
  --ac2: #fd79a8;
  --ok: #00b894;
  --warn: #fdcb6e;
  --err: #e17055;
  --r1: 8px;
  --r2: 12px;
  --r3: 16px;
  --sh: 0 8px 48px rgba(0, 0, 0, .4);
  --tr: .2s cubic-bezier(.4, 0, .2, 1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html {
  /* `clip` instead of `hidden`: prevents horizontal overflow without turning
     <html> into its own scroll container. The old combination of
     `overflow-x: hidden` and `height: 100%` is a known cause of broken touch
     scrolling in iOS Safari. */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;   /* iOS would otherwise scale text in landscape */
  background: var(--bg);            /* colour behind the rubber-band scroll */
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--t1);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: contain;
}
/* Only allow selection where it makes sense — stops the iOS magnifier
   popup when long-pressing buttons */
button, .chip, .switch, label, .logo, th { -webkit-user-select: none; user-select: none; }
input, select, td, p, h1, h2 { -webkit-user-select: text; user-select: text; }

/* ===== Cursor Glow ===== */
.cursor-glow {
  position: fixed; width: 800px; height: 800px;
  pointer-events: none; z-index: 0;
  transform: translate(-50%, -50%);
  transition: left .2s ease-out, top .2s ease-out, opacity .3s;
  opacity: 0; will-change: left, top;
}
.cursor-glow.active { opacity: 1; }
.cursor-glow::before {
  content: ''; position: absolute; inset: 0;
  background: conic-gradient(from 0deg at 50% 50%,
    rgba(108,92,231,.1), rgba(253,121,168,.08), rgba(162,155,254,.1), rgba(108,92,231,.1));
  border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
  filter: blur(60px);
  animation: morphBlob 8s ease-in-out infinite, pulseGlow 4s ease-in-out infinite;
}
.cursor-glow::after {
  content: ''; position: absolute; inset: 20%;
  background: radial-gradient(ellipse at 30% 30%, rgba(162,155,254,.12), rgba(253,121,168,.06), transparent 70%);
  border-radius: 60% 40% 30% 70% / 50% 60% 40% 50%;
  filter: blur(40px);
  animation: morphBlob 6s ease-in-out infinite reverse, pulseGlow 3s ease-in-out infinite reverse;
}
@keyframes morphBlob {
  0%,100% { border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%; transform: rotate(0deg) scale(1); }
  25% { border-radius: 60% 40% 50% 50% / 30% 60% 40% 70%; transform: rotate(90deg) scale(1.1); }
  50% { border-radius: 50% 50% 30% 70% / 60% 30% 70% 40%; transform: rotate(180deg) scale(.95); }
  75% { border-radius: 30% 70% 60% 40% / 50% 40% 60% 50%; transform: rotate(270deg) scale(1.05); }
}
@keyframes pulseGlow { 0%,100% { opacity: .6; } 50% { opacity: 1; } }

/* ===== Ambient BG ===== */
.ambg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.ambg::before {
  content: ''; position: absolute; top: -30%; left: -20%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(108,92,231,.06) 0%, transparent 70%);
  animation: f1 20s ease-in-out infinite;
}
.ambg::after {
  content: ''; position: absolute; bottom: -20%; right: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(253,121,168,.04) 0%, transparent 70%);
  animation: f2 25s ease-in-out infinite;
}
@keyframes f1 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(80px,60px); } }
@keyframes f2 { 0%,100% { transform: translate(0,0); } 50% { transform: translate(-60px,-80px); } }

/* ===== Header ===== */
header {
  position: sticky; top: 0; z-index: 100;
  padding: 16px 40px;
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-left: calc(40px + env(safe-area-inset-left));
  padding-right: calc(40px + env(safe-area-inset-right));
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--brd);
  backdrop-filter: blur(20px);
  background: rgba(8,8,10,.85);
}
.logo { display: flex; align-items: center; gap: 16px; text-decoration: none; }
.logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--ac), var(--ac2));
  border-radius: 10px; display: grid; place-items: center;
  font-size: 18px; color: #fff; flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(108,92,231,.35);
  transition: transform .3s;
}
.logo:hover .logo-icon { transform: rotate(-6deg) scale(1.05); }
.logo-text { display: flex; align-items: baseline; gap: 6px; }
.logo-text .p1 {
  font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; letter-spacing: -.03em;
  background: linear-gradient(135deg, #fff, #ddd);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.logo-text .p2 {
  font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 400; font-style: italic; letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--acl), var(--ac2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hlinks { display: flex; align-items: center; gap: 12px; }
.hlink {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; background: var(--card);
  border: 1px solid var(--brd); border-radius: var(--r1);
  color: var(--t2); text-decoration: none;
  font-size: 13px; font-weight: 500; font-family: 'DM Sans', sans-serif;
  transition: all var(--tr); cursor: pointer;
}
.hlink:hover { background: var(--hov); border-color: var(--t3); color: var(--t1); }
.hlink i { font-size: 14px; }

/* ===== Hero ===== */
.hero { position: relative; z-index: 1; padding: 72px 40px 40px; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; background: var(--acg); border: 1px solid rgba(108,92,231,.2);
  border-radius: 40px; font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 500; color: var(--acl);
  margin-bottom: 24px; animation: fadeUp .6s ease-out;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 56px); font-weight: 700; letter-spacing: -.03em;
  line-height: 1.15; margin-bottom: 20px;
  animation: fadeUp .6s ease-out .1s both;
}
.hero-accent {
  background: linear-gradient(135deg, var(--acl), var(--ac2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-desc {
  font-size: 16px; color: var(--t2); line-height: 1.7;
  max-width: 560px; margin: 0 auto;
  animation: fadeUp .6s ease-out .2s both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Layout ===== */
main {
  position: relative; z-index: 1; flex: 1;
  max-width: 1200px; margin: 0 auto; width: 100%;
  padding: 24px 40px 80px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 20px;
  align-items: start;
}
.wide { grid-column: 1 / -1; }

/* ===== Card ===== */
.card {
  background: var(--card); border: 1px solid var(--brd); border-radius: var(--r3);
  transition: border-color .3s, box-shadow .3s;
  animation: cardIn .4s ease-out both;
  overflow: hidden;
}
.card:hover { border-color: rgba(108,92,231,.3); box-shadow: 0 12px 40px rgba(0,0,0,.3); }
@keyframes cardIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.card-head {
  padding: 20px 24px; border-bottom: 1px solid var(--brd);
  display: flex; align-items: center; gap: 14px;
}
.card-head .ico {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px;
  display: grid; place-items: center; font-size: 15px; color: var(--acl);
  background: var(--acg); border: 1px solid rgba(108,92,231,.2);
}
.card-head h2 { font-family: 'Playfair Display', serif; font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.card-head p { font-size: 12.5px; color: var(--t3); margin-top: 2px; }
.card-body { padding: 24px; }

/* ===== Form ===== */
.row { display: grid; gap: 14px; margin-bottom: 18px; }
.row.c3 { grid-template-columns: repeat(3, 1fr); }
.row.c2 { grid-template-columns: repeat(2, 1fr); }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
label {
  font-size: 11.5px; font-weight: 600; color: var(--t3);
  text-transform: uppercase; letter-spacing: .07em;
}
input[type="time"], input[type="text"], input[type="number"], input[type="date"] {
  width: 100%; padding: 12px 13px; min-height: 46px;
  background: var(--inp); border: 1px solid var(--brd); border-radius: var(--r2);
  color: var(--t1); font-family: 'JetBrains Mono', monospace;
  font-size: 16px;              /* below 16px iOS zooms in on focus */
  font-weight: 500; line-height: 1.2;
  outline: none; transition: all var(--tr);
  -webkit-appearance: none; appearance: none;
}
/* iOS otherwise centres time/date oddly and clips the right edge */
input[type="time"], input[type="date"] { text-align: left; min-width: 0; display: block; }
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input:hover { border-color: var(--t3); }
input:focus { border-color: var(--ac); box-shadow: 0 0 0 3px var(--acg); background: var(--hov); }
input::placeholder { color: var(--t3); opacity: .6; font-weight: 400; }
input::-webkit-calendar-picker-indicator { filter: invert(.6); cursor: pointer; }
.hint { font-size: 11.5px; color: var(--t3); line-height: 1.5; }

select {
  width: 100%; padding: 12px 13px; min-height: 46px; font-size: 16px;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%239896a3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 11px;
  padding-right: 36px;
  background: var(--inp); border: 1px solid var(--brd); border-radius: var(--r2);
  color: var(--t1); font-family: 'DM Sans', sans-serif; font-weight: 500;
  outline: none; transition: all var(--tr); cursor: pointer;
}
select:hover { border-color: var(--t3); }
select:focus { border-color: var(--ac); box-shadow: 0 0 0 3px var(--acg); }

/* Schalter-Zeile */
.switch {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px; margin-bottom: 10px;
  background: var(--inp); border: 1px solid var(--brd); border-radius: var(--r2);
  cursor: pointer; transition: all var(--tr);
  font-size: 13.5px; color: var(--t2); font-weight: 500;
  text-transform: none; letter-spacing: 0;
}
.switch:hover { background: var(--hov); border-color: var(--t3); }
.switch input { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; accent-color: var(--ac); cursor: pointer; }
.switch .sw-txt { display: flex; flex-direction: column; gap: 3px; }
.switch .sw-sub { font-size: 11.5px; color: var(--t3); font-weight: 400; line-height: 1.5; }
.switch:has(input:checked) { border-color: rgba(108,92,231,.45); background: rgba(108,92,231,.08); }
.switch:has(input:checked) .sw-txt > span:first-child { color: var(--t1); }

.notice.ok { background: rgba(0,184,148,.08); border-color: rgba(0,184,148,.3); color: var(--ok); }

/* Chips / Toggle */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  padding: 10px 15px; min-height: 40px; display: inline-flex; align-items: center;
  background: var(--inp); border: 1px solid var(--brd);
  border-radius: 20px; color: var(--t3);
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  cursor: pointer; transition: all var(--tr); white-space: nowrap;
}
.chip:hover { background: var(--hov); color: var(--t2); }
.chip.active {
  background: rgba(108,92,231,.2); border-color: rgba(108,92,231,.5); color: var(--acl);
  box-shadow: 0 4px 16px rgba(108,92,231,.25);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 18px; min-height: 44px; border-radius: var(--r1); border: 1px solid var(--brd);
  -webkit-appearance: none; appearance: none;
  background: var(--inp); color: var(--t2);
  font-family: 'DM Sans', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all var(--tr);
}
.btn:hover { background: var(--hov); color: var(--t1); border-color: var(--t3); }
.btn.primary {
  background: linear-gradient(135deg, var(--ac), #8b7cf7);
  border-color: transparent; color: #fff;
  box-shadow: 0 2px 12px rgba(108,92,231,.25);
}
.btn.primary:hover { box-shadow: 0 4px 20px rgba(108,92,231,.4); transform: translateY(-1px); color: #fff; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Result ===== */
.result {
  margin-top: 20px; padding: 20px;
  background: var(--bg2); border: 1px solid var(--brd); border-radius: var(--r2);
}
.res-main { text-align: center; padding-bottom: 18px; border-bottom: 1px solid var(--brd); margin-bottom: 18px; }
.res-label { font-size: 11.5px; font-weight: 600; color: var(--t3); text-transform: uppercase; letter-spacing: .08em; }
.res-value {
  font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: clamp(34px, 6vw, 46px); line-height: 1.1; margin-top: 6px;
  background: linear-gradient(135deg, var(--acl), var(--ac2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.res-sub { font-size: 13px; color: var(--t2); margin-top: 8px; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 16px; }
.res-item { text-align: center; }
.res-item .k { font-size: 11px; color: var(--t3); text-transform: uppercase; letter-spacing: .06em; }
.res-item .v { font-family: 'JetBrains Mono', monospace; font-size: 19px; font-weight: 600; color: var(--t1); margin-top: 4px; }
.res-item .v.pos { color: var(--ok); }
.res-item .v.neg { color: var(--err); }
.res-item .s { font-size: 11.5px; color: var(--t3); margin-top: 2px; }

/* Notice */
.notice {
  display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px; padding: 12px 14px;
  border-radius: var(--r1); font-size: 12.5px; line-height: 1.55;
  background: rgba(253,203,110,.08); border: 1px solid rgba(253,203,110,.25); color: var(--warn);
}
.notice.err { background: rgba(225,112,85,.08); border-color: rgba(225,112,85,.3); color: var(--err); }
.notice i { margin-top: 2px; }
.notice.hidden { display: none; }

/* ===== Tabelle ===== */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; padding: 10px 12px;
  font-size: 11px; font-weight: 600; color: var(--t3);
  text-transform: uppercase; letter-spacing: .06em;
  border-bottom: 1px solid var(--brd); white-space: nowrap;
}
td {
  padding: 11px 12px; border-bottom: 1px solid var(--brd);
  font-family: 'JetBrains Mono', monospace; color: var(--t2); white-space: nowrap;
}
tbody tr:hover td { background: rgba(108,92,231,.05); color: var(--t1); }
tfoot td {
  border-bottom: none; border-top: 1px solid var(--brd);
  color: var(--t1); font-weight: 600; padding-top: 14px;
}
.num { text-align: right; }
.pos { color: var(--ok); }
.neg { color: var(--err); }
.del {
  background: none; border: none; color: var(--t3); cursor: pointer;
  font-size: 15px; min-width: 40px; min-height: 40px; border-radius: 8px;
  transition: all var(--tr); -webkit-appearance: none;
}
.del:hover { color: var(--err); background: rgba(225,112,85,.1); }
.empty { padding: 32px 20px; text-align: center; color: var(--t3); font-size: 13px; }
.empty i { display: block; font-size: 26px; opacity: .4; margin-bottom: 10px; }

/* ===== Footer ===== */
footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--brd); padding: 24px 40px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  background: rgba(8,8,10,.95); backdrop-filter: blur(20px); margin-top: auto;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; font-size: 13px; color: var(--t3);
}
.footer-brand { font-weight: 600; color: var(--t2); display: flex; align-items: center; gap: 8px; }
.footer-brand i {
  background: linear-gradient(135deg, var(--acl), var(--ac2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.footer-link { color: var(--t3); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color var(--tr); }
.footer-link:hover { color: var(--acl); }

/* ===== Install banner & modal ===== */
.install-bar {
  display: none; align-items: center; gap: 12px; position: relative;
  margin: 0 auto 18px; max-width: 1200px;
  padding: 13px 16px; border-radius: var(--r2);
  background: linear-gradient(135deg, rgba(108,92,231,.16), rgba(253,121,168,.1));
  border: 1px solid rgba(108,92,231,.35);
}
.install-bar.show { display: flex; }
.install-bar .ib-ico {
  width: 36px; height: 36px; flex-shrink: 0; border-radius: 9px;
  display: grid; place-items: center; color: #fff; font-size: 15px;
  background: linear-gradient(135deg, var(--ac), var(--ac2));
}
.install-bar .ib-txt { flex: 1; min-width: 0; }
.install-bar .ib-txt b { display: block; font-size: 14px; color: var(--t1); }
.install-bar .ib-txt span { font-size: 12px; color: var(--t2); }
.install-bar .ib-close {
  background: none; border: none; color: var(--t3); cursor: pointer;
  min-width: 36px; min-height: 36px; border-radius: 8px; font-size: 15px;
}
.install-bar .ib-close:hover { color: var(--t1); background: rgba(255,255,255,.06); }

.modal {
  position: fixed; inset: 0; z-index: 500; display: none;
  align-items: flex-end; justify-content: center;
  background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
  padding: env(safe-area-inset-top) 0 0;
}
.modal.show { display: flex; animation: fadeIn .2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
  width: 100%; max-width: 520px;
  background: var(--card); border: 1px solid var(--brd);
  border-radius: var(--r3) var(--r3) 0 0;
  padding: 26px 24px calc(26px + env(safe-area-inset-bottom));
  animation: slideUp .28s cubic-bezier(.2,.8,.3,1);
  max-height: 90vh; overflow-y: auto;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-box h3 { font-family: 'Playfair Display', serif; font-size: 22px; margin-bottom: 6px; }
.modal-box > p { font-size: 13.5px; color: var(--t2); line-height: 1.6; margin-bottom: 20px; }
.mstep { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 16px; }
.mstep .n {
  width: 27px; height: 27px; flex-shrink: 0; border-radius: 50%;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--ac), var(--ac2));
}
.mstep .mtxt { font-size: 14px; color: var(--t1); line-height: 1.55; }
.mstep .mtxt small { display: block; color: var(--t3); font-size: 12px; margin-top: 3px; }
.mstep i.sym { color: var(--acl); margin: 0 3px; }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  header { padding: 14px 20px; padding-top: calc(14px + env(safe-area-inset-top)); }
  .logo-text .p1, .logo-text .p2 { font-size: 22px; }
  .hero { padding: 48px 20px 28px; }
  main { padding: 20px 20px 60px; grid-template-columns: 1fr; }
  footer { padding: 20px; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

@media (max-width: 700px) {
  header {
    padding: 11px 16px; padding-top: calc(11px + env(safe-area-inset-top));
    gap: 10px;
  }
  .logo-text .p1, .logo-text .p2 { font-size: 19px; }
  .logo-icon { width: 34px; height: 34px; font-size: 14px; border-radius: 9px; }
  .logo { gap: 10px; }
  .hlink { padding: 9px 12px; font-size: 12px; min-height: 40px; }
  .hlink .lbl { display: none; }

  .hero { padding: 30px 16px 20px; }
  .hero-badge { margin-bottom: 16px; font-size: 11px; padding: 5px 13px; }
  .hero-title { font-size: 27px; margin-bottom: 12px; }
  .hero-desc { font-size: 14px; line-height: 1.6; }

  main { padding: 14px 12px 44px; gap: 14px; }
  .card-head { padding: 15px 16px; gap: 12px; }
  .card-head h2 { font-size: 19px; }
  .card-head .ico { width: 34px; height: 34px; font-size: 14px; }
  .card-body { padding: 16px; }
  .row { gap: 12px; margin-bottom: 15px; }
  .row.c3, .row.c2 { grid-template-columns: 1fr; }
  /* Start and end belong together visually, break can sit below */
  .row.c3.tight { grid-template-columns: 1fr 1fr; column-gap: 10px; }
  .row.c3.tight > .field:nth-child(3) { grid-column: 1 / -1; }

  /* Install bar stacks so the button isn't squeezed */
  .install-bar { flex-wrap: wrap; row-gap: 12px; }
  .install-bar .ib-txt { flex: 1 1 auto; }
  .install-bar { padding-right: 44px; }
  .install-bar .btn { flex: 1 1 100%; order: 3; }
  .install-bar .ib-close { position: absolute; top: 6px; right: 6px; }

  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
  .chips { flex-direction: column; }
  .chip { width: 100%; justify-content: center; text-align: center; }

  .result { padding: 16px; }
  .res-value { font-size: 40px; }
  .res-grid { grid-template-columns: 1fr; gap: 0; }
  .res-item {
    display: flex; align-items: baseline; justify-content: space-between;
    text-align: left; padding: 11px 0; border-bottom: 1px solid var(--brd);
  }
  .res-item:last-child { border-bottom: none; padding-bottom: 0; }
  .res-item { flex-wrap: wrap; }
  .res-item .k { flex: 1; min-width: 0; }
  .res-item .v { margin-top: 0; }
  .res-item .s { width: 100%; text-align: right; margin: 3px 0 0; }

  /* Log becomes cards instead of a table */
  .table-wrap { overflow: visible; }
  table, thead, tbody, tfoot, tr, th, td { display: block; }
  thead { display: none; }
  tbody tr {
    position: relative;
    margin: 0 16px 12px; padding: 6px 0;
    background: var(--bg2); border: 1px solid var(--brd); border-radius: var(--r2);
  }
  tbody tr:first-child { margin-top: 16px; }
  tbody td {
    display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
    padding: 9px 14px; border-bottom: 1px solid rgba(42,42,51,.5);
    text-align: right; white-space: normal;
  }
  tbody td::before {
    content: attr(data-l);
    font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600;
    color: var(--t3); text-transform: uppercase; letter-spacing: .06em;
    text-align: left; flex-shrink: 0;
  }
  tbody td:last-child { border-bottom: none; justify-content: flex-end; padding: 2px 8px 6px; }
  tbody td:last-child::before { content: ''; display: none; }
  tbody td:last-child .del {
    display: inline-flex; align-items: center; gap: 7px; padding: 0 12px;
    font-family: 'DM Sans', sans-serif; font-size: 12.5px; font-weight: 600;
  }
  tbody td:last-child .del::after { content: var(--t-remove, 'Entfernen'); }
  tbody tr:hover td { background: none; }
  tfoot tr {
    margin: 0 16px; padding: 12px 0;
    border-top: 1px solid var(--brd);
  }
  tfoot td {
    display: flex; align-items: baseline; justify-content: space-between;
    padding: 6px 14px; border: none; text-align: right;
  }
  tfoot td::before {
    content: attr(data-l);
    font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 600;
    color: var(--t3); text-transform: uppercase; letter-spacing: .06em;
  }
  tfoot td:empty { display: none; }

  .switch { padding: 14px; }
  footer { padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .footer-inner { flex-direction: column; text-align: center; gap: 8px; font-size: 12px; }
  .cursor-glow { display: none; }
  .install-bar { margin: 0 0 14px; }
}

@media (max-width: 380px) {
  .hero-title { font-size: 24px; }
  .res-value { font-size: 34px; }
  .card-body { padding: 14px; }
}

/* Installed as an app: shorter hero, no install banner */
@media (display-mode: standalone) {
  .hero { padding-top: 22px; }
  .install-bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--brd); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--t3); }
