/* LaunchPal - warm sunset coastal colours, clean modern sans-serif. */
:root {
  --bg: #1b2a4a; --panel: #223360; --panel2: #2a3f78; --line: #3a5599;
  --ink: #f5f0e8; --muted: #b8c4de;
  --coral: #ff7a59; --gold: #ffd166; --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  height: 100%; margin: 0; overflow-y: auto; overflow-x: hidden;
  background: var(--bg); color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased; user-select: text; -webkit-user-select: text;
  overscroll-behavior: none; touch-action: manipulation;
}
#launchpal {
  max-width: 560px; margin: 0 auto; padding: 0 12px;
  display: flex; flex-direction: column; min-height: 100vh;
}

/* header */
.lp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 0 8px; position: sticky; top: 0;
  background: var(--bg); z-index: 10;
}
.lp-title {
  font-size: 20px; font-weight: 900; letter-spacing: 0.04em; color: var(--gold);
  margin: 0;
}
.lp-mute-btn {
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 700;
  cursor: pointer; min-height: 48px; min-width: 48px; font-size: 13px;
}

/* tabs */
.lp-tabs {
  display: flex; gap: 4px; margin: 8px 0 12px;
}
.lp-tabs button {
  flex: 1; background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 10px; padding: 12px 4px; font: inherit; font-weight: 700;
  cursor: pointer; font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em;
  min-height: 48px;
}
.lp-tabs button.on { background: var(--coral); color: #1b2a4a; border-color: var(--coral); }

/* sections */
.lp-section { display: none; flex: 1; }
.lp-section-on { display: block; }

/* card */
.lp-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 16px; margin-bottom: 12px;
}

/* countdown */
.lp-kick {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; margin: 0 0 4px;
}
.lp-cd-title {
  font-size: 22px; margin: 0 0 12px; font-weight: 900; text-align: center;
}
.lp-cd-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0;
}
.lp-cd-tile {
  text-align: center; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px 8px;
}
.lp-cd-num {
  display: block; font-size: clamp(28px, 9vw, 42px); font-weight: 900;
  color: var(--coral); line-height: 1; font-variant-numeric: tabular-nums;
}
.lp-cd-tile small {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase; margin-top: 4px;
}
.lp-launched {
  font-size: 24px; font-weight: 900; color: var(--coral); text-align: center;
  margin: 12px 0;
}
.lp-fine {
  font-size: 11.5px; color: var(--muted); margin-top: 12px; text-align: center;
  line-height: 1.5;
}

/* checklist */
.lp-progress-wrap {
  display: flex; align-items: center; gap: 8px; margin: 8px 0;
}
.lp-progress-bar {
  flex: 1; height: 8px; background: rgba(255,255,255,0.08); border-radius: 4px;
  overflow: hidden;
}
.lp-progress-fill {
  height: 100%; background: var(--coral); border-radius: 4px; transition: width 0.3s;
}
.lp-progress-text {
  font-size: 12px; color: var(--muted); white-space: nowrap;
}
.lp-progress-sm { height: 5px; }
.lp-progress-sm-text { font-size: 11px; }
.lp-cat-progress {
  display: flex; align-items: center; gap: 6px; margin: 6px 0;
}
.lp-cat-label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; width: 70px;
}

/* filter chips */
.lp-filter-row {
  display: flex; flex-wrap: wrap; gap: 4px; margin: 12px 0 8px;
}
.lp-chip {
  background: var(--panel2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 20px; padding: 8px 14px; font: inherit; font-weight: 700;
  cursor: pointer; font-size: 12px; min-height: 48px; display: flex;
  align-items: center; justify-content: center;
}
.lp-chip.on { background: var(--coral); color: #1b2a4a; border-color: var(--coral); }

/* add form */
.lp-add-form { margin: 8px 0; }
.lp-add-row { display: flex; gap: 6px; margin-bottom: 8px; }
.lp-add-row label { display: none; }
.lp-add-row input {
  flex: 1; background: var(--panel2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px;
  min-height: 48px;
}
.lp-add-row input::placeholder { color: var(--muted); }
.lp-cat-chips {
  display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px;
}
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink);
  border-radius: 13px; padding: 12px 20px; font: inherit; font-weight: 800;
  cursor: pointer; min-height: 48px; font-size: 15px;
}
.lp-btn-coral {
  background: linear-gradient(#ff9a7a, var(--coral)); color: #1b2a4a;
  border-color: var(--coral);
}
.lp-btn-wide { width: 100%; }

/* list */
.lp-list {
  list-style: none; margin: 8px 0; padding: 0;
  max-height: 50vh; overflow-y: auto;
}
.lp-empty {
  text-align: center; color: var(--muted); padding: 20px; font-size: 14px;
}
.lp-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 6px;
  border-bottom: 1px solid rgba(58, 85, 153, 0.3); font-size: 14px;
}
.lp-item.done .lp-item-text { text-decoration: line-through; color: var(--muted); }
.lp-check-btn {
  background: none; border: 2px solid var(--line); border-radius: 6px;
  width: 32px; height: 32px; min-width: 32px; min-height: 32px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--coral); padding: 0;
}
.lp-item-text { flex: 1; word-break: break-word; }
.lp-cat-tag {
  font-size: 10px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em; white-space: nowrap;
  background: var(--panel2); padding: 2px 8px; border-radius: 8px;
}
.lp-del-btn {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 18px; padding: 8px; min-width: 48px; min-height: 48px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.6;
}
.lp-del-btn:hover { opacity: 1; color: var(--coral); }

/* planner */
.lp-planner-form { margin: 12px 0; }
.lp-planner-field {
  display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px;
}
.lp-planner-field label {
  font-size: 11px; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.lp-planner-field input {
  background: var(--panel2); border: 1px solid var(--line); color: var(--ink);
  border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 16px;
  text-align: right; min-height: 48px;
}
.lp-planner-result {
  margin: 12px 0; padding: 12px; background: rgba(255, 122, 89, 0.1);
  border: 1px solid rgba(255, 122, 89, 0.25); border-radius: 12px;
}
.lp-planner-big {
  font-size: 24px; color: var(--coral); font-weight: 900; margin: 0 0 4px;
  text-align: center;
}
.lp-planner-detail {
  font-size: 13px; color: var(--muted); margin: 0; text-align: center;
}

/* footer */
.lp-footer {
  padding: 16px 0 calc(12px + var(--safe-b)); text-align: center;
  border-top: 1px solid var(--line); margin-top: auto;
}
.lp-disclaimer {
  font-size: 12px; color: var(--muted); line-height: 1.5; margin: 0 0 8px;
}
.lp-privacy {
  font-size: 12px; color: var(--muted); margin: 0;
}
.lp-privacy a { color: var(--coral); text-decoration: underline; }

/* muted / gold helpers */
.lp-muted { color: var(--muted); }
.lp-sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* focus visible */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 6px; }

/* short wide screens */
@media (max-height: 600px) and (min-width: 620px) {
  .lp-card { padding: 12px 16px; }
  .lp-cd-num { font-size: 28px; }
  .lp-btn { padding: 10px; }
}

/* animations */
.fx-enter > * { animation: fxEnter 0.24s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes fxEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fx-enter > * { animation: none; } }

/* "Ad choices": a button that reads as a link (Android app only) */
.lp-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }

/* the one advert (js/ads.js): empty box takes no room; unfilled units hide */
.lp-adbox { margin: 18px 0 8px; }
.lp-adbox:empty { display: none; }
.lp-adbox:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none; }
.lp-adtag { font-size: 11px; opacity: .6; margin: 0 0 4px; text-align: center; }
/* the label and the gap appear only once Google has really filled the slot (not while the site is under review) */
.lp-adbox:not(:has(ins.adsbygoogle[data-ad-status="filled"])) { margin: 0; }
.lp-adbox:not(:has(ins.adsbygoogle[data-ad-status="filled"])) .lp-adtag { display: none; }

/* after launch: buttons into checklist and map */
.lp-cd-go { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 14px 0 6px; }
