/* Version 03 — "Weitergedacht".
   Keeps Tania's brand colour as primary so it reads as an evolution of her app,
   not a different product. Sizing follows WCAG 2.2 AA / WZG duties:
   ≥64px tap targets, ≥16px body text, 4.5:1 contrast. */

:root {
  --p-ink:    #16323F;
  --p-ink-2:  #5B6B75;
  --p-line:   #DCE4E9;
  --p-bg:     #FFFFFF;
  --p-soft:   #EFF4F7;
  --p-brand:  #2D5E7F;
  --p-brand-d:#1F4459;
  --p-open:   #54A17F;
  --p-soon:   #E9B655;
  --p-shut:   #D45D47;
  --p-open-bg:  #E4F1E9;
  --p-soon-bg:  #FCF2DC;
  --p-shut-bg:  #FBE7E3;
}

.screen.p { background: var(--p-bg); color: var(--p-ink); }

/* ---------- demo banner: never dismissible, per spec ---------- */
.p .demobar {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 14px;
  background: #16323F;
  color: #CFE0EA;
  font-size: 10.5px;
  letter-spacing: .04em;
}
.p .demobar b { color: #fff; font-weight: 600; }
.p .demobar button {
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: #fff;
  font: inherit; font-size: 10.5px; font-weight: 600;
  border-radius: var(--r-pill);
  padding: 3px 9px; cursor: pointer;
}
.p .demobar button:hover { background: rgba(255,255,255,.22); }

/* ---------- header ---------- */
.p .phead {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 16px 12px;
  border-bottom: 1px solid var(--p-line);
}
.p .phead .back {
  display: flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 0 13px 0 9px;
  border: 1px solid var(--p-line); border-radius: var(--r-pill);
  background: var(--p-soft); color: var(--p-ink);
  font: inherit; font-size: 14.5px; font-weight: 600; cursor: pointer;
}
.p .phead .back:hover { background: #E3EBF0; }
.p .phead .back svg { width: 17px; height: 17px; }
.p .phead .sp { flex: 1 1 auto; }
.p .phead .hbtn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid var(--p-line); border-radius: 50%;
  background: var(--p-bg); color: var(--p-brand);
  cursor: pointer;
}
.p .phead .hbtn:hover { background: var(--p-soft); }
.p .phead .hbtn .ic { width: 21px; height: 21px; }
.p .phead .clock {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 13px;
  border: 1px solid var(--p-line); border-radius: var(--r-pill);
  background: var(--p-bg); color: var(--p-ink);
  font-family: var(--mono); font-size: 14px; font-weight: 500;
  cursor: pointer;
}
.p .phead .clock:hover { border-color: var(--p-brand); }
.p .phead .clock .ic { width: 16px; height: 16px; color: var(--p-brand); }

/* ---------- typography ---------- */
.p .ptitle {
  font-family: var(--cond);
  font-weight: 700;
  font-size: 33px;
  line-height: 1.05;
  letter-spacing: .005em;
  margin: 16px 0 6px;
}
.p .psub { font-size: 15.5px; color: var(--p-ink-2); margin: 0 0 18px; line-height: 1.5; }

/* ---------- context band ---------- */
.p .band {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  margin: 0 0 16px;
  border-radius: 8px;
  background: var(--p-shut-bg);
  color: #8A2C1B;
  font-size: 14.5px; font-weight: 600; line-height: 1.35;
}
.p .band .ic { width: 24px; height: 24px; }
.p .band.cool { background: var(--p-soft); color: var(--p-brand-d); }

/* ---------- 6-tile need grid ---------- */
.p .grid6 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.p .tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 9px;
  min-height: 116px;
  padding: 14px;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  background: var(--p-bg);
  color: var(--p-ink); font: inherit; cursor: pointer;
  text-align: left;
  transition: border-color .14s, background .14s, transform .14s;
}
.p .tile:hover { border-color: var(--p-brand); background: var(--p-soft); transform: translateY(-2px); }
.p .tile .ic { width: 32px; height: 32px; color: var(--p-brand); }
.p .tile b {
  font-family: var(--cond); font-weight: 700; font-size: 20px; line-height: 1.1;
}
.p .tile small { font-size: 12.5px; color: var(--p-ink-2); line-height: 1.35; }

/* ---------- filter chips ---------- */
.p .chips {
  display: flex; gap: 7px; flex-wrap: wrap;
  padding: 10px 0 14px;
  position: sticky; top: 0; z-index: 5;
  background: var(--p-bg);
}
.p .chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 40px; padding: 0 13px;
  border: 1.5px solid var(--p-line); border-radius: var(--r-pill);
  background: var(--p-bg); color: var(--p-ink);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background .13s, border-color .13s, color .13s;
}
.p .chip .ic { width: 17px; height: 17px; }
.p .chip:hover { border-color: var(--p-brand); }
.p .chip.is-on { background: var(--p-brand); border-color: var(--p-brand); color: #fff; }

.p .count {
  font-size: 13.5px; color: var(--p-ink-2);
  margin: 0 0 12px;
}
.p .count b { color: var(--p-ink); }

/* ---------- result card ---------- */
.p .place {
  display: block; width: 100%; text-align: left;
  padding: 15px 14px;
  margin-bottom: 11px;
  border: 1px solid var(--p-line);
  border-radius: 10px;
  background: var(--p-bg);
  color: inherit; font: inherit; cursor: pointer;
  transition: border-color .14s, box-shadow .14s;
}
.p .place:hover { border-color: var(--p-brand); box-shadow: var(--shadow-s); }
.p .place.dead { opacity: .55; cursor: not-allowed; background: var(--p-soft); }
.p .place.dead:hover { border-color: var(--p-line); box-shadow: none; }

.p .place .nm {
  font-family: var(--cond); font-weight: 700; font-size: 21px; line-height: 1.12;
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.p .place .nm em { font-style: normal; font-family: var(--mono); font-size: 12px; color: var(--p-ink-2); font-weight: 400; }

.p .status {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 9px 0 8px;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 13px; font-weight: 700; letter-spacing: .01em;
}
.p .status .ic { width: 15px; height: 15px; }
.p .status.open { background: var(--p-open-bg); color: #10502D; }
.p .status.soon { background: var(--p-soon-bg); color: #7A5407; }
.p .status.shut { background: var(--p-shut-bg); color: #8A2C1B; }
.p .status.grey { background: #ECEFF1; color: #5B6B75; }

.p .dist { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--p-ink-2); margin-bottom: 8px; }
.p .dist .ic { width: 15px; height: 15px; }

.p .facts { display: flex; gap: 6px; flex-wrap: wrap; }
.p .facts i {
  font-style: normal; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 600;
  padding: 4px 9px; border-radius: 5px;
  background: var(--p-soft); color: #4B5A64;
}
.p .facts i .ic { width: 14px; height: 14px; }
.p .facts i.good { background: var(--p-open-bg); color: #10502D; }
.p .facts i.iffy { background: var(--p-soon-bg); color: #7A5407; }

.p .checked {
  font-size: 12px; color: #8896A0; margin-top: 9px;
  display: flex; align-items: center; gap: 6px;
}
.p .checked .ic { width: 13px; height: 13px; }

/* ---------- fallback footer ---------- */
.p .fallback {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--p-line);
  border-radius: 10px;
  background: var(--p-soft);
}
.p .fallback p { font-size: 14px; margin: 0 0 10px; line-height: 1.45; }
.p .fallback strong { font-weight: 700; }

/* ---------- buttons ---------- */
.p .pbtn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; min-height: 64px;
  border: 0; border-radius: 10px;
  background: var(--p-brand); color: #fff;
  font-family: var(--sans); font-size: 17.5px; font-weight: 700;
  cursor: pointer; margin-top: 10px;
  transition: background .14s, transform .14s;
}
.p .pbtn:hover { background: var(--p-brand-d); }
.p .pbtn:active { transform: scale(.99); }
.p .pbtn .ic { width: 23px; height: 23px; }
.p .pbtn.big { min-height: 76px; font-size: 19px; }
.p .pbtn.ghost { background: var(--p-bg); color: var(--p-brand); border: 2px solid var(--p-line); }
.p .pbtn.ghost:hover { background: var(--p-soft); border-color: var(--p-brand); }
.p .pbtn.alarm { background: var(--p-shut); }
.p .pbtn.alarm:hover { background: #B23F2C; }
.p .pbtn.small { min-height: 50px; font-size: 15px; }

/* ---------- emergency bar, fixed on every screen ---------- */
.p .sos {
  flex: 0 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 9px 14px 20px;
  border-top: 1px solid var(--p-line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
}
.p .sos button {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 54px;
  border: 0; border-radius: 9px;
  font-family: var(--sans); font-size: 14.5px; font-weight: 700;
  cursor: pointer;
}
.p .sos .night { background: var(--p-brand); color: #fff; }
.p .sos .night:hover { background: var(--p-brand-d); }
.p .sos .help { background: var(--p-shut); color: #fff; }
.p .sos .help:hover { background: #B23F2C; }
.p .sos .ic { width: 19px; height: 19px; }

/* ---------- detail screen ---------- */
.p .addr {
  font-family: var(--cond); font-weight: 700;
  font-size: 34px; line-height: 1.08;
  margin: 14px 0 12px;
}
.p .kv { border-top: 1px solid var(--p-line); padding: 11px 0; }
.p .kv dt {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #8896A0; margin-bottom: 3px;
}
.p .kv dd { margin: 0; font-size: 15px; line-height: 1.5; }
.p .kv dd .ic { width: 17px; height: 17px; vertical-align: -.18em; margin-right: 5px; }

.p .warnline {
  display: flex; gap: 9px; align-items: flex-start;
  padding: 11px 12px; margin: 12px 0;
  border-radius: 8px; background: var(--p-soon-bg); color: #7A5407;
  font-size: 14px; font-weight: 600; line-height: 1.4;
}
.p .warnline .ic { width: 20px; height: 20px; flex: 0 0 auto; }

.p .staticmap {
  height: 132px; border-radius: 10px; margin: 14px 0 4px;
  border: 1px solid var(--p-line);
  background:
    repeating-linear-gradient(0deg, #E4ECF0 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, #E4ECF0 0 1px, transparent 1px 22px),
    #F5F9FB;
  position: relative;
}
.p .staticmap::after {
  content: ''; position: absolute; left: 50%; top: 44%;
  width: 17px; height: 17px; margin-left: -8px;
  background: var(--p-shut);
  border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}

/* ---------- show-this-to-someone card ---------- */
.p.showcard { background: #16323F; }
.p.showcard .body {
  display: flex; flex-direction: column; justify-content: center;
  padding: 20px 22px;
}
.p.showcard .msg {
  font-size: 21px; font-weight: 600; line-height: 1.4; color: #fff; margin: 0;
}
.p.showcard .msg .big {
  display: block; font-family: var(--cond); font-weight: 700;
  font-size: 34px; line-height: 1.1; margin: 14px 0;
}
.p.showcard .sep { height: 1px; background: rgba(255,255,255,.28); margin: 22px 0; }
.p.showcard .msg.alt { color: #CFE0EA; }
.p.showcard [dir="rtl"] { text-align: right; }
.p.showcard .hint {
  font-size: 13px; color: #93AEBD; margin: 20px 0 0;
  display: flex; align-items: center; gap: 7px;
}
.p.showcard .hint .ic { width: 16px; height: 16px; }

/* ---------- language list ---------- */
.p .langs { display: grid; gap: 7px; }
.p .lang {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 62px; padding: 0 16px;
  border: 1px solid var(--p-line); border-radius: 9px;
  background: var(--p-bg); color: var(--p-ink);
  font: inherit; font-size: 19px; font-weight: 600; cursor: pointer;
}
.p .lang:hover { background: var(--p-soft); border-color: var(--p-brand); }
.p .lang.is-on { border-color: var(--p-brand); border-width: 2px; background: var(--p-soft); }
.p .lang small { font-size: 12.5px; color: var(--p-ink-2); font-weight: 500; }
.p .lang .ic { width: 20px; height: 20px; color: var(--p-brand); }

/* ---------- numbered steps ---------- */
.p .step {
  display: flex; gap: 13px;
  padding: 14px 0;
  border-top: 1px solid var(--p-line);
}
.p .step .n {
  flex: 0 0 auto;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--p-brand); color: #fff;
  display: grid; place-items: center;
  font-family: var(--cond); font-weight: 700; font-size: 16px;
}
.p .step .sx b { display: block; font-size: 16.5px; font-weight: 700; margin-bottom: 3px; }
.p .step .sx p { margin: 0; font-size: 14px; color: var(--p-ink-2); line-height: 1.5; }
.p .step .sx p strong { color: var(--p-ink); }

/* ---------- quote / speech slip ---------- */
.p .say {
  padding: 14px;
  border-left: 4px solid var(--p-brand);
  background: var(--p-soft);
  border-radius: 0 8px 8px 0;
  margin: 12px 0;
}
.p .say p { margin: 0; font-size: 16.5px; line-height: 1.5; font-weight: 600; }
.p .say p + p { margin-top: 9px; color: var(--p-ink-2); font-weight: 500; }

/* ---------- low battery mode ---------- */
.p.lowbat { background: #000; color: #fff; }
.p.lowbat .body { display: flex; flex-direction: column; justify-content: center; padding: 24px 22px; }
.p.lowbat .lb-lbl {
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: #E9B655; margin: 0 0 24px;
}
.p.lowbat .lb-name { font-family: var(--cond); font-weight: 700; font-size: 30px; margin: 0 0 6px; }
.p.lowbat .lb-addr { font-family: var(--cond); font-weight: 700; font-size: 40px; line-height: 1.1; margin: 0 0 22px; }
.p.lowbat .lb-tel { font-family: var(--mono); font-size: 27px; color: #7FD4A6; margin: 0 0 30px; }
.p.lowbat .lb-hint { font-size: 16px; color: #C9CDD0; display: flex; gap: 9px; align-items: center; margin: 0; }
.p.lowbat .lb-hint .ic { width: 20px; height: 20px; }

/* ---------- source list ---------- */
.p .src { border-top: 1px solid var(--p-line); padding: 11px 0; font-size: 14px; }
.p .src b { display: block; font-weight: 600; }
.p .src span { color: var(--p-ink-2); font-size: 13px; }

.p .privacy p { font-size: 15px; line-height: 1.6; margin: 0 0 9px; }

/* Keep the app header on one line on the narrowest phones */
@media (max-width: 420px) {
  .p .phead { gap: 6px; padding-left: 12px; padding-right: 12px; }
  .p .phead .back { padding: 0 10px 0 7px; font-size: 13.5px; }
  .p .phead .clock { padding: 0 9px; font-size: 13px; }
  .p .phead .hbtn { width: 40px; height: 40px; }
  .p .chip { font-size: 13px; padding: 0 10px; min-height: 38px; }
}
