/* ===========================================================
   Единый файл стилей приложения.
   1) Экраны авторизации (Onboarding / Sign Up / Sign In)
   2) Правила прототипа — основа остального приложения
   3) Правила, которых нет в прототипе (иконки-эмодзи)
   =========================================================== */

:root {
  --text-dark: #3d2620;
  --placeholder: #c3aca6;
  --input-bg: #ffffff;
  --input-border: #efe0da;
  --primary: #b97686;
  --primary-pressed: #a4677a;
  --dark-btn: #3d2620;
  --link: #b97686;
  --divider: #e7d3ca;
  --status-bar: #3d2620;
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}


/* ---------- Phone frame ---------- */
.screen {
  position: relative;
  margin: 0 auto;
  width: 390px;
  min-height: 844px;
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

/* ---------- Status bar ---------- */
.status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 28px 0;
  color: var(--status-bar);
  font-weight: 600;
  font-size: 15px;
}

.status-bar .icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-bar svg {
  display: block;
}

/* ---------- Top nav (back button) ---------- */

.back-btn {
  background: none;
  border: none;
  color: var(--text-dark);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
}


/* ---------- Content ---------- */
.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 28px 40px;
  text-align: center;
}

.boot {
  font-size: 56px;
  line-height: 1;
  margin: 12px 0 20px;
  transform: rotate(-8deg);
  filter: drop-shadow(0 6px 10px rgba(61, 38, 32, 0.15));
}

.boot.small {
  font-size: 44px;
  margin: 4px 0 16px;
}

h1.heading {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
  margin: 0 0 8px;
  line-height: 1.25;
}

p.subheading {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 28px;
  line-height: 1.5;
  max-width: 300px;
}

/* ---------- Language toggle (onboarding) ---------- */
.lang-toggle {
  display: inline-flex;
  background: #f3d9d0;
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: auto;
  gap: 2px;
}

.lang-toggle button {
  border: none;
  background: transparent;
  padding: 8px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
}

.lang-toggle button.active {
  background: var(--primary);
  color: #fff;
}

/* ---------- Form ---------- */
.form {
  width: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-dark);
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  width: 100%;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  font-size: 15px;
  color: var(--text-dark);
  outline: none;
  font-family: var(--font);
}

.input-wrap input::placeholder {
  color: var(--placeholder);
}

.input-wrap input:focus {
  border-color: var(--primary);
}

.eye-toggle {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 0;
}

.forgot-link {
  align-self: flex-end;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--link);
  text-decoration: underline;
  font-weight: 600;
  margin-top: -4px;
  cursor: pointer;
  font-family: var(--font);
}

/* ---------- Buttons ---------- */
.btn {
  width: 100%;
  padding: 17px;
  border-radius: var(--radius-md);
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:active {
  background: var(--primary-pressed);
}


.btn-outline {
  background: #ffffff;
  color: var(--text-dark);
  border: 1px solid var(--input-border);
}



/* ---------- Divider ---------- */


/* ---------- Footer texts ---------- */
.terms {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin: 18px 0 6px;
  line-height: 1.5;
}

.terms a {
  color: var(--text-muted);
  text-decoration: underline;
}

.switch-text {
  font-size: 14px;
  color: var(--text-dark);
  text-align: center;
}

.switch-text a {
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

/* Push footer group to bottom on shorter forms */
.spacer {
  flex: 1;
}

.bottom-group {
  width: 100%;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Home indicator ---------- */
.home-indicator {
  display: flex;
  justify-content: center;
  padding: 10px 0 8px;
}

.home-indicator span {
  width: 134px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: var(--text-dark);
  opacity: 0.85;
  display: block;
}

/* ---------- Onboarding welcome screen ---------- */
.onboarding-screen {
  width: min(100%, 460px);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  border-radius: 0;
  background: #fff8f5;
  box-shadow: none;
  color: #4a3236;
}

.onboarding-content {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom, 0px));
  text-align: center;
}

.onboarding-logo {
  display: block;
  width: auto;
  height: clamp(140px, 24vh, 190px);
  max-width: 90%;
  object-fit: contain;
}

.onboarding-heading {
  margin: 0;
  color: #4a3236;
  font-family: Fraunces, Georgia, serif;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.15;
  white-space: pre-line;
}

.onboarding-subheading {
  margin: 0;
  color: #7e6164;
  font-size: 15px;
  line-height: 1.5;
}

.onboarding-language {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  padding: 7px 14px;
  border-radius: 20px;
  background: #f7e4df;
  color: #4a3236;
  font-size: 13px;
  font-weight: 600;
}

.onboarding-language select {
  width: auto;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.onboarding-language select:focus-visible {
  outline: 2px solid #a44d57;
  outline-offset: 3px;
}

.onboarding-language-caret {
  pointer-events: none;
}

.onboarding-action {
  width: 100%;
  margin-top: 18px;
}

.onboarding-screen .btn-primary {
  min-height: 66px;
  border-radius: 12px;
  background: #a44d57;
}

/* ---------- Responsive tweak ---------- */
@media (max-width: 420px) {
  .screen {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
  }
}
.link {
  border: 0;
  padding: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  color: var(--link);
  font-weight: 700;
  text-decoration: none;
}

/* ======================= Прототип ======================= */
:root {
  /* Warm, soft "feminine" palette — dusty rose primary, blush surfaces,
     a muted sage kept only as a small secondary accent so it still reads
     as an outdoors app rather than a straight beauty/dating-app pink. */
  --forest: #C17A82;       /* primary actions, active states — dusty rose */
  --forest-deep: #9C5C64;  /* pressed/dark accent — deeper rose */
  --charcoal: #4A3236;     /* primary text — warm plum-brown, not pure black */
  --off-white: #FFF8F5;    /* primary background — soft cream */
  --sand: #F7E4DF;         /* secondary surface / cards — blush */
  --stone: #B08A8C;        /* secondary text, borders — muted mauve */
  --sage: #C9A6AE;         /* secondary accent, tags, badges — dusty pink-mauve */
  --alert: #D1495B;        /* SOS / destructive only */
  --bg: var(--off-white);
  --surface: #FFFFFF;
  --text: var(--charcoal);
  --text-muted: #8A6A6D;
  --radius: 16px;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Kept light even in system dark mode — the "cute" palette reads much
       better on a pale background than a dark one, so the app no longer
       switches to a dark surface on phones set to dark mode. */
    --bg: #FFF8F5;
    --surface: #FFFFFF;
    --text: #4A3236;
    --text-muted: #8A6A6D;
    --sand: #F7E4DF;
    --stone: #B08A8C;
  }
}
:root[data-theme="dark"] {
  --bg: #FFF8F5;
  --surface: #FFFFFF;
  --text: #4A3236;
  --text-muted: #8A6A6D;
  --sand: #F7E4DF;
  --stone: #B08A8C;
}
html { scroll-padding-top: env(safe-area-inset-top, 0px); }
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
#root { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans', -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}
#shell {
  max-width: 460px;
  margin: 0 auto;
  height: 100%;
  min-height: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
#screen { flex: 1 1 auto; min-height: 0; padding: 20px 20px 12px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 4px;
}
.back-btn {
  background: none; border: none; color: var(--text); font-size: 20px;
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.lang-toggle {
  display: flex; background: var(--sand); border-radius: 20px; padding: 3px;
  font-size: 12px; font-weight: 600;
}
.lang-toggle button {
  border: none; background: none; padding: 5px 12px; border-radius: 16px;
  cursor: pointer; color: var(--text-muted); font-family: inherit; font-weight: 600;
}
.lang-toggle button.active { background: var(--forest); color: #fff; }
.lang-btn { border: none; background: var(--sand); color: var(--text); border-radius: 20px; padding: 7px 14px; font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer; white-space: nowrap; }
#langSheet { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: flex-end; justify-content: center; }
.lang-backdrop { position: absolute; inset: 0; background: rgba(46,26,30,.45); }
.lang-panel { position: relative; width: 100%; max-width: 480px; background: var(--surface, #fff); border-radius: 22px 22px 0 0; padding: 16px 12px calc(12px + env(safe-area-inset-bottom,0px)); box-shadow: 0 -8px 30px rgba(0,0,0,.2); }
.lang-title { font-weight: 700; font-size: 15px; padding: 2px 8px 10px; }
.lang-list { max-height: 55vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.lang-opt { display: flex; justify-content: space-between; align-items: center; width: 100%; border: none; background: none; padding: 13px 10px; border-radius: 12px; font-family: inherit; font-size: 15px; color: var(--text); cursor: pointer; text-align: left; }
.lang-opt:hover { background: var(--sand); }
.lang-opt.active { background: var(--sand); font-weight: 700; }
.lang-code { font-size: 11.5px; color: var(--text-muted); font-weight: 600; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 14px 20px; font-size: 15px;
  font-weight: 600; cursor: pointer; font-family: inherit; width: 100%;
  transition: transform .08s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--forest); color: #fff; }
.btn-secondary { background: var(--sand); color: var(--text); }
.btn-outline { background: transparent; color: var(--forest); border: 1.5px solid var(--forest); }
.btn-alert { background: var(--alert); color: #fff; }
.btn-sm { padding: 9px 14px; font-size: 13px; width: auto; }

.card {
  background: var(--surface); border-radius: var(--radius); padding: 16px;
  border: 1px solid rgba(0,0,0,0.06);
}
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  border-radius: 20px; background: var(--sand); color: var(--text);
  font-size: 13.5px; font-weight: 500; cursor: pointer; border: 1.5px solid transparent;
  margin: 0 8px 8px 0;
}
.chip.selected { border-color: var(--forest); background: var(--forest); color: #fff; }
.chip-row { display: flex; flex-wrap: wrap; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin: 18px 0 8px; text-transform: none; }
input[type=text], input[type=date], input[type=time], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--sand);
  background: var(--surface); color: var(--text); font-family: inherit; font-size: 15px;
}
textarea { resize: none; min-height: 64px; }

.tabbar {
  flex: 0 0 auto;
  display: flex; flex-direction: row; flex-wrap: nowrap; align-items: stretch;
  border-top: 1px solid rgba(0,0,0,0.08); background: var(--surface);
  padding: 8px 4px;
}
.tab {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; font-family: inherit; cursor: pointer;
  color: var(--text-muted); font-size: 10.5px; font-weight: 600; padding: 4px 2px;
  white-space: normal; text-align: center; line-height: 1.15;
}
.tab.active { color: var(--forest); }
.tab .ic { font-size: 19px; }
#topbar.topbar { flex: 0 0 auto; }
#activebar { flex: 0 0 auto; }

.active-bar {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--forest); color: #fff; padding: 10px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.active-bar .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: #9BE39B;
  display: inline-block; margin-right: 8px; animation: pulse 1.6s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--sage);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
  color: #fff; font-size: 13px; flex-shrink: 0;
}
.row { display: flex; align-items: center; gap: 10px; }
.space-between { display: flex; align-items: center; justify-content: space-between; }
.muted { color: var(--text-muted); font-size: 13px; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 8px; background: var(--sage); color: #fff; }
.divider { height: 1px; background: rgba(0,0,0,0.07); margin: 14px 0; }
.section-title { font-size: 13px; font-weight: 700; color: var(--text-muted); margin: 22px 0 10px; }
.hero-img {
  height: 150px; border-radius: var(--radius); background: linear-gradient(135deg, var(--forest) 0%, var(--sage) 100%);
  display: flex; align-items: flex-end; padding: 14px; color: #fff; position: relative; overflow: hidden;
}
.search-input { width:100%; margin-top:12px; padding:11px 14px; border-radius:14px; border:1.5px solid var(--sand); background:#fff; font:inherit; font-size:14px; box-sizing:border-box; }
.mapwrap { position:relative; }
.map-expand { position:absolute; top:10px; right:10px; z-index:5; width:38px; height:38px; border-radius:12px; border:none; background:rgba(255,255,255,.94); color:var(--forest); font-size:20px; line-height:1; box-shadow:0 1px 6px rgba(60,30,35,.28); cursor:pointer; }
.map-expand.map-locate { right:56px; font-size:17px; }
.mapwrap .map-overlay { z-index:4; }
.mapwrap.full { position:absolute !important; top:0; left:0; right:0; bottom:0; height:auto !important; margin:0 !important; border-radius:0 !important; z-index:60; background:var(--bg, #FFF7F4); overflow:hidden; }
.mapwrap.full > :not(.map-expand):not(.map-overlay) { height:100% !important; border-radius:0 !important; }
.mapwrap.full .map-overlay { display:none !important; }
.mapwrap.full .map-expand { top:max(14px, env(safe-area-inset-top)); right:14px; }
.mapwrap.full .map-expand.map-locate { right:60px; }
#shell.map-full #topbar, #shell.map-full #tabbar, #shell.map-full #activebar { display:none; }
#shell.map-full #screen { padding:0; overflow:hidden; }
.country-rail { display:flex; gap:10px; overflow-x:auto; scroll-snap-type:x mandatory; padding:4px 2px 10px; margin-top:12px; -webkit-overflow-scrolling:touch; }
.country-card { flex:0 0 118px; scroll-snap-align:center; background:var(--sand); border:2px solid transparent; border-radius:var(--radius); padding:12px 10px; text-align:center; cursor:pointer; }
.country-card.sel { background:var(--forest); color:#fff; border-color:var(--forest); }
.cover { position:relative; overflow:hidden; border-radius:var(--radius); }
.cover-photo { position:absolute; inset:0; background-size:cover; background-position:center; opacity:0; transition:opacity .5s; }
.cover-photo.on { opacity:1; }
.cover-ov { position:absolute; left:0; right:0; bottom:0; padding:14px; color:#fff; background:linear-gradient(transparent, rgba(60,30,35,.55)); }
.compat-badge {
  background: var(--forest); color: #fff; font-weight: 700; font-size: 13px;
  padding: 6px 12px; border-radius: 10px; display: inline-block;
}
.progress-track { height: 6px; background: var(--sand); border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--forest); }
.msg { background: var(--sand); border-radius: 12px; padding: 8px 12px; margin-bottom: 8px; font-size: 14px; max-width: 80%; }
.msg.me { background: var(--forest); color: #fff; margin-left: auto; }
.msg-st { margin-bottom: 8px; max-width: 60%; text-align: center; }
.msg-st.me { margin-left: auto; }
.msg-st .em { font-size: 64px; line-height: 1.1; }
.msg-st .cap { font-size: 12px; font-weight: 700; color: var(--forest-deep); }
.msg-st img, .msg-gif img { max-width: 100%; max-height: 190px; border-radius: 12px; display: block; }
.msg-st.me img, .msg-gif.me img { margin-left: auto; }
.msg-gif { margin-bottom: 8px; max-width: 70%; }
.msg-gif.me { margin-left: auto; }
#shell.chat-mode #screen { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 8px; }
.chat-wrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.chat-msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--surface, #fff); border: 1px solid var(--sand); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; display: flex; flex-direction: column; }
.chat-msgs > :first-child { margin-top: auto; }
.chat-dock { flex: 0 0 auto; background: var(--bg); }
.meme-grid { columns: 3; column-gap: 6px; }
.meme-grid img { width: 100%; border-radius: 8px; margin-bottom: 6px; cursor: pointer; display: block; background: var(--sand); min-height: 40px; }
.meme-prev { width: 100%; max-height: 190px; object-fit: contain; border-radius: 10px; background: var(--sand); display: block; margin: 0 auto 8px; }
.msg-gif img.meme { background: var(--sand); }
.tray { background: var(--surface, #fff); border: 1px solid var(--sand); border-radius: 14px; margin-bottom: 8px; overflow: hidden; }
.tray-tabs { display: flex; border-bottom: 1px solid var(--sand); }
.tray-tab { flex: 1; text-align: center; padding: 9px 4px; font-size: 13px; font-weight: 600; color: var(--stone); cursor: pointer; }
.tray-tab.on { color: var(--forest-deep); box-shadow: inset 0 -2px 0 var(--forest); }
.tray-body { max-height: 220px; overflow-y: auto; padding: 8px; }
.tray-h { font-size: 11.5px; font-weight: 700; color: var(--stone); margin: 6px 2px; text-transform: uppercase; letter-spacing: .04em; }
.emo-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emo-grid span { font-size: 24px; text-align: center; cursor: pointer; padding: 4px 0; }
.stk-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stk { text-align: center; cursor: pointer; border-radius: 10px; padding: 4px 2px; position: relative; background: var(--bg); }
.stk .em { font-size: 34px; line-height: 1.15; }
.stk .cap { font-size: 9.5px; color: var(--charcoal); font-weight: 600; line-height: 1.1; }
.stk img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 8px; }
.stk .x { position: absolute; top: -2px; right: -2px; width: 18px; height: 18px; border-radius: 9px; background: var(--alert); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.gif-grid { columns: 2; column-gap: 6px; }
.gif-grid img { width: 100%; border-radius: 8px; margin-bottom: 6px; cursor: pointer; display: block; }
.star-row span { font-size: 26px; cursor: pointer; margin-right: 4px; color: var(--stone); }
.star-row span.filled { color: var(--forest); }
.avatar.clickable { cursor: pointer; }
.offline-tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  color: var(--forest); background: rgba(143,161,137,0.25); padding: 5px 10px; border-radius: 8px;
}
.thumb-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.thumb {
  width: 62px; height: 62px; border-radius: 10px; object-fit: cover; border: 1px solid rgba(0,0,0,0.08);
}
.thumb-wrap { position: relative; }
.thumb-remove {
  position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--alert); color: #fff; border: none; font-size: 12px; line-height: 1; cursor: pointer;
}
.upload-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 14px; border-radius: 10px;
  background: var(--sand); font-size: 13px; font-weight: 600; cursor: pointer; margin-top: 8px;
}
.ping-card {
  background: rgba(181,80,45,0.1); border: 1px solid rgba(181,80,45,0.3); border-radius: 12px;
  padding: 12px 14px; margin-top: 14px; font-size: 13px;
}
.sms-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 12px; border-radius: 12px; background: var(--sand); color: var(--text); font-weight: 600;
  font-size: 14px; text-decoration: none; margin-top: 8px;
}
.route-card { display: flex; gap: 12px; align-items: flex-start; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; }
.switch { width: 40px; height: 24px; border-radius: 14px; background: var(--sand); position: relative; cursor: pointer; flex-shrink: 0; }
.switch.on { background: var(--forest); }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s ease; }
.switch.on .knob { transform: translateX(16px); }
#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 12px);
  background: var(--charcoal); color: #fff; padding: 12px 20px; border-radius: 24px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,0.18);
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
  z-index: 999; max-width: 82%; text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
/* every cancel / delete confirmation is a centred dialog over a dimmed screen */
.inline-confirm { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 9500; width: min(340px, calc(100vw - 48px)); box-sizing: border-box;
  background: var(--surface, #fff); border-radius: 20px; padding: 22px 18px 18px; margin: 0 !important; text-align: center;
  box-shadow: 0 0 0 100vmax rgba(46,26,30,.5), 0 14px 40px rgba(0,0,0,.28); }
.inline-confirm p { font-size: 15px !important; line-height: 1.4; }
.search-pill {
  display:flex; align-items:center; gap:10px; background:var(--surface); border-radius:26px;
  padding:12px 16px; border:1px solid rgba(0,0,0,0.06);
}
.search-pill input { border:none; outline:none; background:none; flex:1; font-size:14px; font-family:inherit; color:var(--text); }
.route-hero {
  position:relative; height:240px; border-radius:var(--radius); background:var(--sand);
  overflow:hidden; margin-top:14px;
}
.route-hero .fab {
  position:absolute; right:14px; bottom:14px; display:flex; align-items:center; gap:8px;
  background:var(--charcoal); color:#fff; border:none; border-radius:26px; padding:12px 18px;
  font-weight:700; font-size:13.5px; cursor:pointer;
}
.route-hero .badge {
  position:absolute; left:16px; bottom:16px; background:var(--forest-deep); color:#fff;
  border-radius:20px; padding:7px 14px 7px 8px; font-size:12px; font-weight:700; display:flex; align-items:center; gap:6px;
}
.route-hero .badge .dot { width:22px; height:22px; border-radius:50%; background:#fff; display:flex; align-items:center; justify-content:center; font-size:11px; }

/* ============ Не из прототипа: иконки-эмодзи ============ */
.emo {
	display: inline-block;
	width: 1.15em;
	height: 1.15em;
	vertical-align: -0.2em;
	overflow: hidden;
	white-space: nowrap;
	text-indent: 300%;
	color: transparent;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	line-height: 1;
	user-select: all;
}
.lang-btn .emo {background-image: url('/assets/globe-0lZ3yqSJ.png');}
.home-heading {
  font-size: 24px;
}

.home-avatar {
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.home-choices {
  margin-top: 16px;
}

.home-prep {
  margin-top: 14px;
}

.home-start-hike {
  margin-top: 14px;
}

.home-events-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 12px;
}

.home-events-heading h3 {
  color: #4a2e33;
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 23px;
  font-weight: 700;
}

.home-see-all {
  border: 0;
  background: none;
  color: #9c5260;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 4px 6px;
  margin: -4px -6px;
}

.home-events-empty {
  text-align: center;
}

.home-events-empty p {
  margin: 0 0 10px;
}

.home-events-row {
  display: flex;
  gap: 12px;
  margin: 0 -20px;
  overflow-x: auto;
  padding: 0 20px 4px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 20px;
  -webkit-overflow-scrolling: touch;
}

.home-events-row::-webkit-scrollbar {
  display: none;
}

.home-events-row.all {
  flex-direction: column;
  overflow: visible;
  scroll-snap-type: none;
}

.home-event-card {
  position: relative;
  display: block;
  flex: 0 0 90%;
  height: 210px;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #806b70;
  color: #fff;
  cursor: pointer;
  font: inherit;
  text-align: left;
  scroll-snap-align: start;
}

.home-events-row.single .home-event-card,
.home-events-row.all .home-event-card {
  flex-basis: 100%;
}

.home-event-cover,
.home-event-shade {
  position: absolute;
  inset: 0;
}

.home-event-cover svg,
.home-event-cover img {
  display: block;
  width: 100%;
  height: 100%;
}

.home-event-cover img {
  object-fit: cover;
}

.home-event-shade {
  background: linear-gradient(180deg, rgb(29 24 31 / 4%) 20%, rgb(29 24 31 / 76%) 100%);
}

.home-event-date {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  min-width: 52px;
  min-height: 58px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 9px;
  border-radius: 14px;
  background: #fffaf7;
  color: #603b44;
  line-height: 1;
}

.home-event-month {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
}

.home-event-day {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
}

.home-event-calendar {
  font-size: 22px;
}

.home-event-info {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.home-event-title {
  display: -webkit-box;
  overflow: hidden;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: rgb(255 255 255 / 92%);
  font-size: 12px;
  line-height: 1.35;
}

.home-event-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}

.home-event-meta i {
  color: rgb(255 255 255 / 70%);
  font-style: normal;
}

.home-event-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 12px 0 2px;
}

.home-event-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #d8c6c6;
  cursor: pointer;
}

.home-event-dots button.active {
  width: 20px;
  background: #a95e6b;
}

.home-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.home-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 92px;
  padding: 16px 12px;
  border: 1.5px solid #e8cfcf;
  border-radius: 22px;
  background: linear-gradient(135deg, #f9e9e7, #f3dad8);
  color: #a95e6b;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}

.home-tile svg {
  flex: 0 0 auto;
}

.home-tile b {
  display: block;
  color: #a04f5e;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.15;
}

.home-tile small {
  display: block;
  margin-top: 3px;
  color: #7a5a60;
  font-size: 12.5px;
  line-height: 1.25;
}
.find-buddies-heading {
  margin-bottom: 4px;
  font-size: 20px;
}

.find-buddies-search {
  margin-top: 10px;
}

.find-buddies-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.find-buddies-card {
  margin: 0;
}

.find-buddies-person {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.find-buddies-avatar {
  width: 52px;
  height: 52px;
  overflow: hidden;
  font-size: 20px;
}

.find-buddies-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.find-buddies-person-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
}

.find-buddies-name {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.find-buddies-rating {
  flex: 0 0 auto;
  color: #94703b;
  font-size: 12.5px;
  font-weight: 500;
}

.find-buddies-user-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 8px;
  font-size: 12.5px;
}

.find-buddies-preferences {
  font-size: 12.5px;
}

.find-buddies-profile-arrow {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
}

.find-buddies-bio {
  margin: 8px 0 0;
  font-size: 13.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.find-buddies-tags {
  gap: 0;
  margin-top: 8px;
}

.find-buddies-event {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}

.find-buddies-event-title {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest, #496453);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
  overflow-wrap: anywhere;
}

.find-buddies-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  font-size: 12.5px;
}

.find-buddies-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.find-buddies-actions .btn {
  min-width: 0;
  flex: 1;
  white-space: normal;
}

.find-buddies-state {
  margin-top: 16px;
  text-align: center;
}

.find-buddies-state p {
  margin: 0 0 10px;
}

.find-buddies-warning {
  margin: 12px 0 0;
}
.wx-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  margin-top: 14px; padding: 12px 14px; border: none; border-radius: 12px;
  background: var(--sand); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
}
.wx-arrow { font-size: 12.5px; font-weight: 600; color: var(--forest); }
.wx-box { margin-top: 8px; }
.events-screen h2 {
  font-size: 20px;
}

.events-create,
.events-filters {
  margin-top: 12px;
}

.events-filters {
  gap: 8px;
}

.events-filters button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.events-filter-note {
  margin: 8px 0 0;
  font-size: 12px;
}

.events-empty,
.events-error {
  margin-top: 12px;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.events-card {
  position: relative;
  height: 210px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--sand);
  box-shadow: 0 4px 14px rgba(74, 46, 51, .14);
}

.events-cover,
.events-shade,
.events-card-open {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.events-shade {
  background: linear-gradient(to bottom, rgba(20, 10, 12, .12) 0%, transparent 35%, rgba(20, 10, 12, .72) 100%);
  pointer-events: none;
}

.events-cover-photo {
  object-fit: cover;
}

.events-card-open {
  border: 0;
  background: transparent;
  cursor: pointer;
}

.events-card-open:focus-visible {
  outline: 3px solid white;
  outline-offset: -5px;
  border-radius: 24px;
}

.events-date {
  position: absolute;
  top: 14px;
  left: 14px;
  min-width: 62px;
  padding: 6px 14px;
  border-radius: 16px;
  background: rgba(255, 250, 247, .96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  text-align: center;
  pointer-events: none;
}

.events-month {
  color: #6b4a50;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .06em;
}

.events-today {
  color: #b5626e;
  font-weight: 700;
}

.events-day {
  color: #3a2226;
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.05;
}

.events-cancel {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: white;
  cursor: pointer;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .35));
}

.events-cancel:disabled {
  opacity: .5;
  cursor: wait;
}

.events-info {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 18px;
  color: white;
  pointer-events: none;
}

.events-title {
  font-family: 'Fraunces', 'Georgia', serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.15;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .5);
}

.events-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 10px;
  font-size: 13.5px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
}

.events-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.events-meta i {
  font-style: normal;
  opacity: .7;
}
.hike-participants .wx-toggle {
  margin-top: 16px;
}

.hike-participants-group h3 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.hike-participants-group + .hike-participants-group {
  margin-top: 16px;
}

.hike-participant-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
}

.hike-participant-row + .hike-participant-row {
  border-top: 1px solid var(--sand);
}

.hike-participant-avatar {
  display: flex;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.hike-participant-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.hike-participant-info .muted {
  font-size: 11px;
}

.hike-participant-profile-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--forest-deep);
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.hike-participant-status {
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 11px;
  font-weight: 600;
}

.hike-participant-row .btn {
  flex: 0 0 auto;
  padding: 7px 10px;
}

.hike-participant-row .btn:disabled {
  opacity: .65;
}
.event-detail h2 {
  font-size: 21px;
  line-height: 1.2;
}

.event-detail-subtitle {
  margin: 4px 0 12px;
  font-size: 13px;
}

.event-detail-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--forest);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.event-detail-cover {
  position: relative;
  height: 150px;
  overflow: hidden;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #b77c80 0%, #c9a1a6 55%, #e8c9c4 100%);
}

.event-detail-cover svg,
.event-detail-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-detail-cover-label {
  position: absolute;
  right: 16px;
  bottom: 12px;
  left: 16px;
  color: white;
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.15;
  text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
}

.event-detail-chips {
  margin-top: 10px;
}

.event-detail-locked {
  margin-top: 12px;
  text-align: center;
}

.event-detail-locked div {
  font-size: 26px;
}

.event-detail-locked p {
  margin: 4px 0 0;
}

.event-detail-map {
  margin-top: 12px;
}

.event-detail-stats {
  margin-top: 6px;
  font-size: 12px;
}

.event-detail-maps-link {
  width: auto;
  margin-top: 8px;
  text-decoration: none;
}

.event-detail-description {
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.event-detail-details {
  margin-top: 14px;
}

.event-detail-join-info {
  margin-top: 16px;
}

.event-detail-info-row {
  margin-top: 6px;
}

.event-detail-action {
  margin-top: 22px;
}

.event-detail-next {
  margin-top: 10px;
}

.event-detail-next .btn {
  flex: 1;
}

.event-detail-danger {
  border-color: var(--alert);
  color: var(--alert);
}
#screen.group-chat-screen {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 8px;
}

.group-chat {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.group-chat-heading {
  gap: 8px;
  margin-bottom: 10px;
}

.group-chat-title {
  min-width: 0;
  margin: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.group-chat-participants-toggle {
  flex-shrink: 0;
}

.group-chat-participants {
  max-height: 180px;
  margin-bottom: 10px;
  overflow-y: auto;
}

.group-chat-participants p {
  margin: 0;
}

.group-chat-participant {
  justify-content: space-between;
  min-height: 32px;
}

.group-chat-participant + .group-chat-participant {
  margin-top: 6px;
}

.group-chat-participant-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-chat-organizer {
  color: var(--forest);
  font-size: 11px;
  font-weight: 700;
}

.group-chat-connection {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 11px;
}

.group-chat-connection-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--text-muted);
}

.group-chat-connection.is-connected .group-chat-connection-dot {
  background: #4a9b70;
}

.group-chat-connection.is-error .group-chat-connection-dot {
  background: var(--alert);
}

.group-chat-error {
  margin: 0 0 8px;
  font-size: 12px;
}

.group-chat-messages {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}

.group-chat-load-older {
  align-self: center;
  margin-bottom: 10px;
}

.group-chat-empty {
  margin: auto;
  text-align: center;
}

.group-chat-message {
  max-width: 82%;
  align-self: flex-start;
  padding: 8px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  background: var(--sand);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.group-chat-message.is-mine {
  align-self: flex-end;
  background: var(--forest);
  color: #fff;
}

.group-chat-message-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 3px;
  font-size: 11px;
}

.group-chat-message-meta time {
  flex-shrink: 0;
  opacity: .7;
}

.group-chat-message-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.group-chat-dock {
  flex: 0 0 auto;
  padding-bottom: max(0px, env(safe-area-inset-bottom));
  background: var(--bg);
}

.group-chat-composer {
  gap: 8px;
}

.group-chat-composer input {
  width: 0;
  min-width: 0;
  flex: 1;
  padding: 12px;
  border: 1px solid var(--sand);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}

.group-chat-composer .btn {
  flex-shrink: 0;
}

.group-chat-composer .btn:disabled {
  cursor: not-allowed;
  opacity: .55;
}
.hiker-profile {
  padding-bottom: 18px;
}

.hiker-profile-header {
  margin-top: 4px;
  text-align: center;
}

.hiker-profile-avatar {
  width: 78px;
  height: 78px;
  margin: 0 auto;
  border: 3px solid var(--sand);
  font-size: 28px;
  overflow: hidden;
}

.hiker-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hiker-profile-header h2 {
  margin: 12px 0 0;
}

.hiker-profile-location {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.hiker-profile-stats {
  gap: 10px;
  margin-top: 20px;
}

.hiker-profile-stat {
  flex: 1;
  min-width: 0;
  padding: 12px 6px;
  text-align: center;
}

.hiker-profile-stat-value {
  font-size: 19px;
  font-weight: 700;
}

.hiker-profile-stat .muted {
  font-size: 11px;
}

.hiker-profile-bio {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.hiker-profile-preferences {
  margin-top: 10px;
}

.hiker-profile-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.hiker-profile-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
  gap: 6px;
  text-align: center;
}

.hiker-profile-badge > div {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--sand);
  font-size: 20px;
}

.hiker-profile-badge .muted {
  font-size: 10.5px;
}

.hiker-profile-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hiker-profile-event {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--sand);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
}

button.hiker-profile-event {
  cursor: pointer;
}

.hiker-profile-event-date {
  display: flex;
  flex: 0 0 48px;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 10px;
  background: var(--sand);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.hiker-profile-event-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
}

.hiker-profile-event-copy .muted {
  font-size: 11.5px;
}

.hiker-profile-event-arrow {
  color: var(--forest);
  font-size: 22px;
}

.hiker-profile-actions {
  align-items: stretch;
  gap: 10px;
  margin-top: 22px;
}

.hiker-profile-actions > .btn-primary {
  flex: 1;
}

.hiker-profile-more {
  flex: 0 0 64px;
  width: 64px;
  padding: 0;
  font-size: 20px;
  letter-spacing: 1px;
}

.hiker-profile-danger {
  color: var(--alert);
}

.hiker-profile-dialog-backdrop {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
}

.hiker-profile-dialog {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
}

.hiker-profile-dialog h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

.hiker-profile-dialog textarea {
  margin-bottom: 12px;
}

.hiker-profile-dialog-cancel {
  margin-top: 8px;
}

.hiker-profile-form-error {
  color: var(--alert);
  font-size: 13px;
}
.notifications-screen h2 {
  margin: 0 0 14px;
  font-size: 22px;
}

.notifications-state {
  margin-top: 12px;
}

.notifications-state p {
  margin: 0 0 12px;
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notification-card {
  position: relative;
  display: flex;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.notification-card.is-unread {
  background: var(--surface);
  border-color: rgba(185, 118, 134, .35);
}

.notification-open {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 12px;
  padding: 14px 8px 14px 14px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.notification-open:disabled {
  cursor: wait;
}

.notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: var(--sand);
  font-size: 18px;
}

.notification-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  gap: 5px;
}

.notification-message {
  font-size: 14px;
  line-height: 1.4;
}

.notification-date {
  font-size: 12px;
}

.notification-unread-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--primary);
}

.notification-delete {
  align-self: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin-right: 8px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.notification-delete:hover {
  background: var(--sand);
}

.notification-delete:disabled {
  cursor: wait;
  opacity: .5;
}

.notifications-more {
  margin-top: 12px;
}

.notifications-toast {
  position: sticky;
  bottom: 8px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--text-dark);
  color: white;
  font-size: 13px;
}
.safety-settings-screen h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.safety-settings-screen > .muted {
  line-height: 1.5;
}

.safety-settings-storage-error {
  margin: 12px 0;
  color: var(--alert);
  font-size: 13px;
}

.safety-settings-contact {
  display: flex;
  align-items: center;
  gap: 12px;
}

.safety-settings-contact-copy {
  flex: 1;
  min-width: 0;
}

.safety-settings-contact-name {
  margin-bottom: 4px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.safety-settings-form,
.safety-settings-number {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.safety-settings-form > p {
  margin: 0;
}

.safety-settings-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.safety-settings-field .field-label {
  margin: 0;
}

.safety-settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.safety-settings-actions > button {
  flex: 1;
}

.safety-settings-checkin {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
}

.safety-settings-checkin > p {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}

.safety-settings-switch {
  position: relative;
  width: 44px;
  height: 26px;
  padding: 3px;
  border: 0;
  border-radius: 20px;
  background: #d7ceca;
  cursor: not-allowed;
  opacity: .7;
}

.safety-settings-switch span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}

.safety-settings-empty {
  margin: 0 0 10px;
}

.safety-settings-number-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.safety-settings-remove {
  align-self: flex-end;
  border-color: var(--alert);
  color: var(--alert);
}

.safety-settings-add {
  margin-top: 10px;
}

.safety-settings-medical-note {
  margin: -6px 0 10px;
  font-size: 12px;
}

.safety-settings-save {
  margin-top: 4px;
}

.safety-settings-satellite {
  margin-top: 22px;
  background: var(--sand);
}

.safety-settings-satellite strong {
  font-size: 13.5px;
}

.safety-settings-satellite p {
  margin: 8px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
}

.safety-settings-satellite .muted {
  font-size: 11.5px;
}

.safety-settings-sos {
  margin-top: 12px;
}

.safety-settings-disclaimer {
  margin: 22px 0 0;
  font-size: 12px;
}

.safety-settings-toast {
  position: sticky;
  bottom: 8px;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--text-dark);
  color: white;
  font-size: 13px;
}
.hiking-screen-heading,
.hiking-finish-heading {
  text-align: center;
  margin: 4px 0 16px;
}

.hiking-screen-heading h2,
.hiking-finish-heading h2 {
  font-size: 22px;
}

.hiking-screen-heading p,
.hiking-finish-heading p {
  margin: 6px 0 0;
}

.hiking-route-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hiking-route-card > strong {
  font-size: 16px;
}

.hiking-route-meta {
  font-size: 12px;
}

.hiking-contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hiking-contact-card p {
  margin: 5px 0 0;
  font-size: 12px;
}

.hiking-network {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 12px 0;
}

.hiking-network > span:first-child {
  color: #43856b;
  font-size: 10px;
}

.hiking-network.is-offline > span:first-child {
  color: var(--alert);
}

.hiking-offline-note {
  font-size: 11.5px;
}

.hiking-skip-button {
  margin-top: 10px;
}

.hiking-loading {
  text-align: center;
  font-size: 12px;
}

.hiking-progress-screen {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  padding: 0 !important;
  overflow: hidden !important;
  background: var(--bg);
}

.hiking-progress-map {
  height: min(42vh, 360px);
  min-height: 210px;
  flex: 0 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--sand);
}

.hiking-progress-map .mapwrap {
  height: 100%;
}

.hiking-map-title {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  right: 56px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  text-align: left;
  color: var(--text);
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 3px 14px rgba(74, 46, 51, .18);
  cursor: pointer;
  font-family: inherit;
}

.hiking-map-title span {
  color: var(--text-muted);
  font-size: 11px;
}

.hiking-map-action {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: #fff;
  box-shadow: 0 2px 8px rgba(74, 46, 51, .2);
  font-size: 22px;
  cursor: pointer;
}

.hiking-progress-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  margin-top: -14px;
  position: relative;
  z-index: 5;
  border-radius: 20px 20px 0 0;
  background: var(--bg);
  box-shadow: 0 -4px 16px rgba(74, 46, 51, .14);
}

.hiking-progress-panel .hiking-network {
  margin: 0 0 10px;
}

.hiking-sync-message {
  margin-left: auto;
  font-weight: 400;
}

.hiking-retry {
  margin: 0 0 8px;
}

.hiking-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-radius: 14px;
  background: var(--surface);
  padding: 12px 6px;
}

.hiking-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 8px;
  min-width: 0;
}

.hiking-stats > div + div {
  border-left: 1px solid var(--sand);
}

.hiking-stats span,
.hiking-finish-stats span {
  color: var(--text-muted);
  font-size: 11px;
}

.hiking-stats strong {
  font-size: 15px;
}

.hiking-progress-bar {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--sand);
}

.hiking-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--alert);
  transition: width .2s ease;
}

.hiking-ping-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.hiking-ping-switch {
  width: 34px;
  height: 20px;
  border-radius: 12px;
  background: var(--sand);
  position: relative;
}

.hiking-ping-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.hiking-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: start;
  justify-items: center;
  margin: 12px 0;
}

.hiking-round-action,
.hiking-sos-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}

.hiking-round-action > span,
.hiking-sos-action > span {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f3dcd9;
  font-size: 22px;
}

.hiking-sos-action > span {
  width: 60px;
  height: 60px;
  color: #fff;
  background: var(--alert);
  box-shadow: 0 4px 12px rgba(192, 80, 91, .35);
  font-size: 15px;
  font-weight: 800;
}

.hiking-checkin {
  padding: 12px;
  text-align: center;
}

.hiking-checkin p {
  margin: 5px 0 10px;
  font-size: 12px;
}

.hiking-checkin-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.hiking-checkin-actions .btn {
  padding: 9px 12px;
  font-size: 13px;
}

.hiking-confirm {
  margin: 10px 0;
}

.hiking-finish-heading strong {
  display: block;
  margin-top: 8px;
}

.hiking-finish-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.hiking-finish-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hiking-finish-stats strong {
  font-size: 16px;
}

.hiking-sync-card {
  margin-top: 12px;
}

.hiking-sync-card p {
  margin: 6px 0 10px;
  font-size: 12px;
}

.hiking-sync-complete,
.hiking-review-hint {
  text-align: center;
  font-size: 12px;
  margin: 14px 0 8px;
}

.hiking-publish-button,
.hiking-done-button {
  margin-top: 10px;
}

#shell.hiking-active #topbar,
#shell.hiking-active #tabbar,
#shell.hiking-active #activebar {
  display: none;
}

#shell.hiking-active #screen {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@media (max-height: 680px) {
  .hiking-progress-map {
    height: 34vh;
    min-height: 170px;
  }
}
