/* ─────────────────────────────────────────────────────────────
   Лапа к Лапе — визуальный слой
   Направление: тёплая бумага, чернила, морская зелень и терракота;
   антиква в заголовках, гротеск в тексте; все иконки и портреты —
   собственная векторная графика (никаких эмодзи и стоковых картинок).
   ───────────────────────────────────────────────────────────── */

:root {
  /* поверхность */
  --paper: #FBF6EE;
  --paper-2: #F5ECE0;
  --paper-3: #EFE3D3;
  --card: #FFFFFF;
  --line: #E4D6C6;
  --line-soft: #EFE6D8;

  /* чернила */
  --ink: #221C1A;
  --ink-2: #57483F;
  --ink-3: #8C7A6E;
  --ink-4: #B6A596;

  /* акценты */
  --vermilion: #D9553F;
  --vermilion-dark: #B8432F;
  --vermilion-soft: #F8E3DD;
  --moss: #3E6E5C;
  --moss-dark: #2F5748;
  --moss-soft: #E3EDE8;
  --ochre: #D8A24A;
  --ochre-dark: #B48536;
  --ochre-soft: #F8EDD6;

  /* форма */
  --r-xs: 8px;
  --r-sm: 11px;
  --r-md: 15px;
  --r-lg: 20px;
  --r-xl: 26px;

  --shadow-hair: 0 1px 0 rgba(34, 28, 26, .04);
  --shadow-card: 0 1px 2px rgba(34, 28, 26, .05), 0 16px 34px -24px rgba(34, 28, 26, .38);
  --shadow-float: 0 2px 4px rgba(34, 28, 26, .06), 0 24px 48px -28px rgba(34, 28, 26, .45);

  --font-text: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --font-display: "Playfair Display", "Georgia", "Times New Roman", "Noto Serif", serif;

  --tg-viewport-height: 100dvh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  height: 100%;
  overscroll-behavior: none;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-image:
    radial-gradient(120% 55% at 50% 0%, #FFF3E4 0%, rgba(255, 243, 228, 0) 55%),
    linear-gradient(180deg, #FBF6EE 0%, #F7F0E5 100%);
}

button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
input, textarea, select { outline: none; }
img { display: block; max-width: 100%; }
.hidden { display: none !important; }

/* иконки */
.ic {
  width: 22px;
  height: 22px;
  flex: none;
  display: inline-block;
  vertical-align: -4px;
  color: currentColor;
}
.ic.sm { width: 18px; height: 18px; }
.ic.lg { width: 26px; height: 26px; }
.ic.xl { width: 34px; height: 34px; }

/* ── каркас ─────────────────────────────────────────────── */
.app {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  height: var(--tg-viewport-height);
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
}

.screens { position: relative; flex: 1; min-height: 0; }

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .26s var(--ease);
  overflow: hidden;
}
.screen.active { opacity: 1; transform: none; pointer-events: auto; }
.screen.scrollable > .screen-body { overflow-y: auto; -webkit-overflow-scrolling: touch; }

.screen-body {
  flex: 1;
  min-height: 0;
  padding: calc(12px + var(--safe-top)) 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── типографика ────────────────────────────────────────── */
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 30px; line-height: 1.12; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.bold { font-weight: 600; }
.center { text-align: center; }
.mono {
  font-family: var(--font-text);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.serif { font-family: var(--font-display); }

/* ── кнопки ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: var(--r-md);
  background: var(--card);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hair);
  transition: transform .14s var(--ease), background .18s ease, border-color .18s ease;
  user-select: none;
}
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--ink); color: #FFF8EF; border-color: var(--ink); }
.btn.primary:active { background: #171210; }
.btn.accent { background: var(--vermilion); border-color: var(--vermilion); color: #FFF6F1; }
.btn.moss { background: var(--moss); border-color: var(--moss); color: #F5FBF7; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn.block { width: 100%; }
.btn.sm { min-height: 40px; font-size: 13.5px; padding: 0 15px; border-radius: var(--r-sm); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-2);
  transition: transform .14s var(--ease), background .18s;
}
.icon-btn:active { transform: scale(.94); background: var(--paper-2); }

/* ── верхняя панель ─────────────────────────────────────── */
.topbar { display: flex; align-items: center; gap: 10px; }
.topbar .grow { flex: 1; }

.brandmark { display: flex; align-items: center; gap: 10px; }
.brandmark .mark { width: 34px; height: 34px; flex: none; }
.brandmark .title { font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.01em; line-height: 1.1; }
.brandmark .sub { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }

/* ── колода ─────────────────────────────────────────────── */
.deck-screen .screen-body { padding: calc(10px + var(--safe-top)) 16px 8px; gap: 10px; }
.deck { position: relative; flex: 1; min-height: 0; }

.card {
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  will-change: transform;
  transform-origin: 50% 92%;
  transition: transform .32s var(--ease), opacity .32s ease;
  touch-action: pan-y;
  user-select: none;
}
.card.dragging { transition: none; }
.card > img.ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  pointer-events: none;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 20, 16, .16) 0%, rgba(28, 20, 16, 0) 26%, rgba(28, 20, 16, .04) 48%, rgba(28, 20, 16, .74) 100%);
  pointer-events: none;
}

.card-top {
  position: absolute;
  inset: 13px 13px auto 13px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  z-index: 3;
}
.chip-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(255, 252, 246, .95);
  border: 1px solid rgba(34, 28, 26, .08);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink);
  backdrop-filter: blur(6px);
}
.chip-badge .ic { width: 14px; height: 14px; color: var(--vermilion); }
.chip-badge.moss .ic { color: var(--moss); }
.chip-badge.ochre .ic { color: var(--ochre-dark); }
.chip-badge.plain { background: rgba(34, 28, 26, .5); color: #FFF8EF; border-color: transparent; }

.card-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 18px 20px 20px;
  color: #FFF8EF;
}
.card-info .name-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.card-info .name { font-family: var(--font-display); font-size: 30px; font-weight: 700; line-height: 1.05; text-shadow: 0 2px 14px rgba(20, 14, 10, .3); }
.card-info .age { font-family: var(--font-display); font-size: 21px; opacity: .92; }
.card-info .meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .9;
}
.card-info .meta .ic { width: 14px; height: 14px; }
.card-info .bio {
  margin-top: 11px;
  font-size: 14px;
  line-height: 1.44;
  opacity: .95;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; max-height: 30px; overflow: hidden; }
.card-tags .tag {
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 248, 239, .45);
  background: rgba(255, 248, 239, .14);
}

/* штампы */
.stamp {
  position: absolute;
  top: 26px;
  z-index: 4;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: 0;
  transform: scale(.86) rotate(-8deg);
  transition: opacity .1s linear, transform .12s var(--ease);
  pointer-events: none;
  border: 2px solid currentColor;
  background: rgba(255, 251, 244, .9);
}
.stamp.like { left: 18px; color: var(--moss); }
.stamp.nope { right: 18px; color: var(--vermilion); }
.stamp.super { left: 50%; margin-left: -58px; color: var(--ochre-dark); }
.stamp.show { opacity: 1; transform: scale(1) rotate(0); }

/* действия */
.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 4px 0 calc(8px + var(--safe-bottom));
}
.act {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-hair);
  color: var(--ink-2);
  transition: transform .16s var(--ease), background .18s, border-color .18s;
  position: relative;
}
.act:active { transform: scale(.92); }
.act.sm { width: 44px; height: 44px; }
.act.md { width: 54px; height: 54px; }
.act.lg { width: 62px; height: 62px; }
.act .ic { width: 22px; height: 22px; }
.act.md .ic { width: 24px; height: 24px; }
.act.lg .ic { width: 27px; height: 27px; }
.act.like { color: var(--moss); }
.act.like:active { background: var(--moss-soft); border-color: #BFD5CB; }
.act.nope { color: var(--vermilion); }
.act.nope:active { background: var(--vermilion-soft); border-color: #EBC5B9; }
.act.star { color: var(--ochre-dark); }
.act.boost { color: var(--ochre-dark); }
.act .cnt {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFF8EF;
  font-size: 10.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
}
.act.disabled { opacity: .4; pointer-events: none; }

/* пустые состояния */
.empty-state {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 26px;
  border-radius: var(--r-xl);
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  color: var(--ink-2);
}
.empty-state .art { width: 132px; height: 145px; margin-bottom: 2px; }
.empty-state h3 { font-size: 19px; }
.empty-state p { margin: 0 0 6px; max-width: 30ch; }

.skeleton {
  position: absolute;
  inset: 0;
  border-radius: var(--r-xl);
  background: linear-gradient(100deg, var(--paper-2) 25%, #FFFAF3 37%, var(--paper-2) 63%);
  background-size: 400% 100%;
  animation: shine 1.4s infinite linear;
}
@keyframes shine { 0% { background-position: 100% 0 } 100% { background-position: -100% 0 } }

/* ── нижняя навигация ───────────────────────────────────── */
.tabbar {
  display: flex;
  align-items: stretch;
  padding: 6px 10px calc(6px + var(--safe-bottom));
  background: rgba(251, 246, 238, .94);
  backdrop-filter: blur(12px) saturate(140%);
  border-top: 1px solid var(--line);
  z-index: 20;
}
.tab {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 7px 1px 5px;
  border-radius: var(--r-sm);
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .18s ease, background .18s ease, transform .14s var(--ease);
}
.tab .ic { width: 21px; height: 21px; }
.tab .label {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9px;
  letter-spacing: .02em;
}
.tab:active { transform: scale(.95); }
.tab.active { color: var(--ink); }
.tab.active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--vermilion);
}
.tab .dot {
  position: absolute;
  top: 5px;
  right: 50%;
  margin-right: -22px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--vermilion);
  color: #FFF8EF;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--paper);
}

/* ── списки ─────────────────────────────────────────────── */
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin-top: 2px; }
.section-title h2 { font-size: 19px; }
.link { color: var(--vermilion); font-weight: 600; font-size: 13px; }

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

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  width: 100%;
  text-align: left;
  transition: transform .15s var(--ease), background .16s ease;
}
.row:active { transform: scale(.99); background: #FFFCF7; }
.avatar {
  width: 54px;
  height: 54px;
  border-radius: var(--r-sm);
  object-fit: cover;
  object-position: 50% 26%;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  flex: none;
}
.avatar.round { border-radius: 50%; }
.avatar.sm { width: 38px; height: 38px; border-radius: 9px; }
.avatar.lg { width: 68px; height: 68px; border-radius: var(--r-md); }
.row .main { flex: 1; min-width: 0; }
.row .name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.row .sub { font-size: 13px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.row .side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: none; }
.row .time { font-size: 11px; color: var(--ink-4); font-weight: 600; letter-spacing: .02em; }
.unread-badge {
  min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px;
  background: var(--vermilion); color: #FFF8EF;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--card);
}
.presence { width: 7px; height: 7px; border-radius: 50%; background: var(--moss); }

/* сетка лайков */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tile {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: var(--paper-2);
  border: 1px solid var(--line);
  transition: transform .16s var(--ease);
  text-align: left;
}
.tile:active { transform: scale(.98); }
.tile img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(28, 20, 16, 0) 42%, rgba(28, 20, 16, .68) 100%);
}
.tile .flag {
  position: absolute;
  top: 9px;
  left: 9px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: rgba(255, 251, 244, .95);
  color: var(--ink);
}
.tile .flag .ic { width: 13px; height: 13px; color: var(--vermilion); }
.tile .flag.super .ic { color: var(--ochre-dark); }
.tile .flag.answered { background: rgba(34, 28, 26, .62); color: #FFF8EF; }
.tile .cap { position: absolute; left: 11px; right: 11px; bottom: 10px; z-index: 2; color: #FFF8EF; }
.tile .cap b { font-family: var(--font-display); font-size: 17px; font-weight: 700; display: block; }
.tile .cap span { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }

/* ── чат ────────────────────────────────────────────────── */
.chat-screen .chat-head {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: calc(10px + var(--safe-top)) 14px 10px;
  background: rgba(251, 246, 238, .95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 5;
}
.chat-head .main { flex: 1; min-width: 0; }
.chat-head .name { font-family: var(--font-display); font-weight: 700; font-size: 17px; }
.chat-head .sub { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 1px; }

.chat-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.day-sep {
  align-self: center;
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  background: var(--paper-2);
  border: 1px solid var(--line-soft);
  padding: 4px 12px;
  border-radius: 999px;
  margin: 8px 0;
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.4;
  animation: bubbleIn .2s var(--ease);
  position: relative;
  word-break: break-word;
}
@keyframes bubbleIn { from { opacity: 0; transform: translateY(5px) } to { opacity: 1; transform: none } }
.bubble.them { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; color: var(--ink); }
.bubble.mine { align-self: flex-end; background: var(--moss); color: #F7FBF8; border-bottom-right-radius: 6px; }
.bubble .ts { display: block; font-size: 10px; opacity: .55; margin-top: 4px; text-align: right; letter-spacing: .04em; }
.bubble.sticker, .bubble.sticker.mine {
  background: transparent;
  border: 0;
  padding: 0 4px;
  box-shadow: none;
}
.bubble.sticker img { width: 84px; height: 84px; }

.chat-intro {
  align-self: center;
  text-align: center;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
  max-width: 300px;
  margin-bottom: 6px;
}
.chat-intro .faces { display: flex; justify-content: center; gap: -8px; margin-bottom: 8px; }
.chat-intro .faces img {
  width: 46px; height: 50px;
  border-radius: 12px;
  border: 2px solid var(--card);
  object-fit: cover;
  object-position: 50% 24%;
}
.chat-intro .faces img:first-child { transform: rotate(-5deg) translateX(6px); }
.chat-intro .faces img:last-child { transform: rotate(5deg) translateX(-6px); }
.chat-intro b { font-family: var(--font-display); font-size: 14px; }

.composer {
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: rgba(251, 246, 238, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.stickers { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.stickers::-webkit-scrollbar { display: none; }
.stickers button {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  transition: transform .14s var(--ease), background .16s;
}
.stickers button:active { transform: scale(.92); background: var(--paper-2); }
.stickers img { width: 28px; height: 28px; }

.input-line { display: flex; align-items: flex-end; gap: 8px; }
.input-line textarea {
  flex: 1;
  resize: none;
  max-height: 108px;
  min-height: 46px;
  padding: 12px 15px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input-line textarea:focus { border-color: var(--ink-4); box-shadow: 0 0 0 3px rgba(216, 162, 74, .16); }
.send {
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: var(--r-md);
  background: var(--ink);
  color: #FFF8EF;
  display: grid;
  place-items: center;
  transition: transform .14s var(--ease), background .18s;
}
.send:active { transform: scale(.93); background: #171210; }
.send .ic { width: 21px; height: 21px; }

/* ── профиль ────────────────────────────────────────────── */
.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
}
.profile-head .name { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.15; }
.profile-head .handle { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.profile-head .pets { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-top: 6px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.profile-head .pets .ic { width: 13px; height: 13px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  padding: 13px 10px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  text-align: center;
}
.stat b { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.1; }
.stat span { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }

.my-pet-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
}
.my-pet-card .avatar { width: 58px; height: 58px; border-radius: var(--r-sm); }
.my-pet-card .main { flex: 1; min-width: 0; }
.my-pet-card .name { font-family: var(--font-display); font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.my-pet-card .kind { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-top: 1px; }
.my-pet-card .mini-stats { display: flex; gap: 12px; margin-top: 5px; font-size: 11.5px; color: var(--ink-3); font-weight: 500; }
.my-pet-card .mini-stats b { color: var(--ink); font-weight: 700; }
.tag-active {
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--moss-soft);
  color: var(--moss-dark);
  border: 1px solid #CBDFD6;
}

.settings { display: flex; flex-direction: column; background: var(--card); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; }
.settings .item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line-soft);
  width: 100%;
  text-align: left;
  font-size: 14.5px;
  font-weight: 500;
}
.settings .item:last-child { border-bottom: 0; }
.settings .item:active { background: var(--paper); }
.settings .item .ico { color: var(--ink-2); }
.settings .item .arrow { margin-left: auto; color: var(--ink-4); display: flex; }
.settings .item .arrow .ic { width: 18px; height: 18px; }

/* ── формы ──────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); padding-left: 2px; }
.input, .textarea, .select {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 15px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.input:focus, .textarea:focus, .select:focus { border-color: var(--ink-4); box-shadow: 0 0 0 3px rgba(216, 162, 74, .16); }
.textarea { resize: none; min-height: 92px; line-height: 1.45; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C7A6E' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.4 9.4L12 16.2l6.6-6.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 17px;
  padding-right: 40px;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 13px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  transition: transform .14s var(--ease), background .16s, color .16s, border-color .16s;
}
.chip .ic { width: 16px; height: 16px; }
.chip:active { transform: scale(.96); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #FFF8EF; }
.chip.on .ic { color: #F1C08B; }

.progress { display: flex; gap: 5px; }
.progress i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); transition: background .25s ease; }
.progress i.on { background: var(--vermilion); }

.wizard-screen .screen-body { gap: 15px; }
.wizard-step { display: flex; flex-direction: column; gap: 14px; animation: stepIn .26s var(--ease); }
@keyframes stepIn { from { opacity: 0; transform: translateX(12px) } to { opacity: 1; transform: none } }
.wizard-foot {
  padding: 10px 18px calc(12px + var(--safe-bottom));
  display: flex;
  gap: 9px;
  background: linear-gradient(180deg, rgba(251, 246, 238, 0), var(--paper) 45%);
  border-top: 1px solid var(--line-soft);
}

.photo-drop {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  max-height: 236px;
  background: var(--paper-2);
  border: 1px dashed var(--ink-4);
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--ink-2);
  text-align: center;
  padding: 16px;
}
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop .hint { font-size: 11.5px; color: var(--ink-3); }
.photo-strip { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.photo-thumb {
  position: relative;
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .x {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(34, 28, 26, .72);
  color: #FFF8EF;
  display: grid;
  place-items: center;
  font-size: 10px;
}

/* ── модалки / шиты / тосты ─────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(34, 28, 26, .38);
  backdrop-filter: blur(4px);
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
.overlay.hidden { display: none !important; }

.modal {
  width: 100%;
  max-width: 420px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: var(--r-xl);
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
  padding: 20px;
  animation: modalIn .3s var(--ease);
  position: relative;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.97) } to { opacity: 1; transform: none } }
.modal .close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--ink-2);
  z-index: 3;
}
.modal .close .ic { width: 16px; height: 16px; }

.match-modal { text-align: center; padding: 24px 18px 18px; overflow: hidden; }
.match-faces { display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.match-faces img {
  width: 104px;
  height: 116px;
  border-radius: var(--r-lg);
  object-fit: cover;
  object-position: 50% 26%;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  animation: faceIn .4s var(--ease) both;
}
.match-faces img:first-child { transform: rotate(-5deg) translateX(8px); }
.match-faces img:last-child { transform: rotate(5deg) translateX(-8px); animation-delay: .07s; }
.match-faces .join {
  width: 34px;
  height: 34px;
  margin: 0 -6px;
  z-index: 2;
  color: var(--vermilion);
  filter: drop-shadow(0 2px 6px rgba(217, 85, 63, .3));
}
@keyframes faceIn { from { opacity: 0; transform: scale(.9) } to { opacity: 1 } }

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  max-width: 560px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(18px + var(--safe-bottom));
  box-shadow: 0 -20px 50px -26px rgba(34, 28, 26, .5);
  animation: sheetIn .28s var(--ease);
  max-height: 88vh;
  overflow-y: auto;
}
@keyframes sheetIn { from { transform: translateY(100%) } to { transform: none } }
.sheet .grab { width: 38px; height: 3px; border-radius: 3px; background: var(--line); margin: 2px auto 14px; }
.sheet h3 { font-size: 20px; margin-bottom: 2px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(86px + var(--safe-bottom));
  transform: translate(-50%, 14px);
  z-index: 80;
  background: var(--ink);
  color: #FFF8EF;
  padding: 11px 17px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-float);
  opacity: 0;
  transition: all .24s var(--ease);
  max-width: 88vw;
  text-align: center;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── вход / загрузка ────────────────────────────────────── */
.auth-screen, .loading-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 22px calc(28px + var(--safe-bottom));
  background: var(--paper);
  background-image:
    radial-gradient(90% 50% at 50% 0%, #FFF1E0 0%, rgba(255, 241, 224, 0) 60%),
    linear-gradient(180deg, #FBF6EE 0%, #F6EEE2 100%);
  max-width: 560px;
  margin: 0 auto;
  gap: 18px;
}
.auth-screen.hidden, .loading-screen.hidden { display: none !important; }

.auth-art { display: flex; justify-content: center; margin-bottom: 2px; }
.auth-art img { width: 168px; height: 184px; }
.auth-hero { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.auth-hero h1 { font-size: 33px; line-height: 1.06; }
.auth-hero p { margin: 0; }
.auth-card {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.auth-rule { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--ink-2); }
.auth-rule .ic { width: 16px; height: 16px; color: var(--moss); flex: none; }
.dev-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: center;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ochre-dark);
  background: var(--ochre-soft);
  border: 1px solid #EBD6AC;
  padding: 5px 10px;
  border-radius: 999px;
}
.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin: 0 auto;
  border: 2px solid var(--line);
  border-top-color: var(--vermilion);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.loading-screen { align-items: center; text-align: center; }
.loading-screen .logo { width: 92px; height: 92px; }


/* ── лента ──────────────────────────────────────────────── */
.post-cta {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--r-md);
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13.5px;
  text-align: left;
}
.post-cta span { flex: 1; }
.post-cta .ic { color: var(--ink-3); }
.post-cta:active { background: #FFFCF7; }

.feed { display: flex; flex-direction: column; gap: 12px; }

.post {
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  overflow: hidden;
}
.post-head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 10px; }
.post-head .avatar { width: 42px; height: 42px; border-radius: 12px; cursor: pointer; }
.post-head .who { flex: 1; min-width: 0; }
.post-head .nm {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  display: flex;
  align-items: center;
  gap: 6px;
}
.post-head .nm .ic { width: 14px; height: 14px; color: var(--ink-3); }
.post-head .mt { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-top: 2px; }
.follow-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--ink-2);
  white-space: nowrap;
}
.follow-btn.on { background: var(--moss); border-color: var(--moss); color: #F5FBF7; }
.follow-btn:active { transform: scale(.96); }

.post-media { position: relative; background: var(--paper-2); }
.post-media img { width: 100%; display: block; aspect-ratio: 1 / 1; object-fit: cover; }
.post-body { padding: 12px; }
.post-text { font-size: 14px; line-height: 1.5; color: var(--ink); margin: 0; }
.post-meta { display: flex; gap: 8px; align-items: center; margin-top: 8px; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4); }

.post-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px 12px;
}
.react {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 600;
  transition: transform .14s var(--ease), background .16s, border-color .16s, color .16s;
}
.react .ic { width: 17px; height: 17px; }
.react:active { transform: scale(.94); }
.react.on { background: var(--vermilion-soft); border-color: #E9C3B8; color: var(--vermilion-dark); }
.react.on.paw { background: var(--moss-soft); border-color: #C6DCD2; color: var(--moss-dark); }
.react.on.funny { background: var(--ochre-soft); border-color: #EAD3A6; color: var(--ochre-dark); }
.post-actions .spacer { flex: 1; }
.post-comment-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.post-comment-btn .ic { width: 17px; height: 17px; }

.post-preview { border-top: 1px solid var(--line-soft); padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; }
.post-preview .cm { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.post-preview .cm img { width: 22px; height: 22px; border-radius: 7px; object-fit: cover; object-position: 50% 24%; flex: none; border: 1px solid var(--line-soft); }
.post-preview .cm b { color: var(--ink); font-weight: 600; }
.post-preview .all { font-size: 11.5px; color: var(--vermilion); font-weight: 600; text-align: left; }

/* комментарии в шите */
.cm-list { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; max-height: 46vh; overflow-y: auto; }
.cm-item { display: flex; gap: 10px; }
.cm-item img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; object-position: 50% 24%; border: 1px solid var(--line); flex: none; }
.cm-item .who { font-size: 12px; font-weight: 600; }
.cm-item .when { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-4); margin-left: 6px; }
.cm-item p { margin: 2px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.cm-form { display: flex; gap: 8px; align-items: flex-end; }
.cm-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 96px;
  resize: none;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 14px;
}

/* выбор сюжета для поста */
.moment-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.moment-grid button {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  aspect-ratio: 1;
  background: var(--paper-2);
}
.moment-grid img { width: 100%; height: 100%; object-fit: cover; }
.moment-grid button.on { border-color: var(--vermilion); }

/* ── страница питомца ───────────────────────────────────── */
.pet-hero { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.pet-hero img { width: 100%; display: block; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 28%; }
.pet-hero .over { position: absolute; inset: auto 0 0 0; padding: 16px; background: linear-gradient(180deg, rgba(28,20,16,0), rgba(28,20,16,.76)); color: #FFF8EF; }
.pet-hero .nm { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.pet-hero .mt { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; opacity: .9; margin-top: 4px; }
.pet-counters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.pet-counters .stat b { font-size: 20px; }

/* ── прогулки ───────────────────────────────────────────── */
.walk-card {
  border-radius: var(--r-lg);
  background: var(--card);
  border: 1px solid var(--line);
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.walk-top { display: flex; gap: 11px; align-items: flex-start; }
.walk-top .avatar { width: 52px; height: 52px; border-radius: 13px; }
.walk-top .who { flex: 1; min-width: 0; }
.walk-top .nm { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.15; }
.walk-top .kindtag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--paper-2);
  color: var(--ink-2);
}
.walk-top .kindtag .ic { width: 12px; height: 12px; }
.walk-facts { display: flex; flex-wrap: wrap; gap: 10px 14px; font-size: 12px; color: var(--ink-2); }
.walk-facts span { display: inline-flex; align-items: center; gap: 5px; }
.walk-facts .ic { width: 15px; height: 15px; color: var(--ink-3); }
.walk-note { font-size: 13px; line-height: 1.45; color: var(--ink-2); margin: 0; }
.walk-foot { display: flex; align-items: center; gap: 9px; }
.walk-foot .who-count { font-size: 11.5px; color: var(--ink-3); flex: 1; }
.walk-status {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
}
.walk-status.open { background: var(--moss-soft); color: var(--moss-dark); }
.walk-status.matched { background: var(--ochre-soft); color: var(--ochre-dark); }
.walk-status.done, .walk-status.cancelled { background: var(--paper-2); color: var(--ink-3); }

.resp-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--r-md);
  background: var(--paper);
  border: 1px solid var(--line-soft);
}
.resp-item img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; object-position: 50% 24%; border: 1px solid var(--line); }
.resp-item p { margin: 3px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.4; }

/* подсказка зрителю */
.viewer-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px;
  border-radius: var(--r-md);
  background: var(--ochre-soft);
  border: 1px solid #EBD6AC;
}
.viewer-note .ic { color: var(--ochre-dark); flex: none; }
.viewer-note p { margin: 0; font-size: 12.5px; line-height: 1.45; color: #6B4E1C; }

/* ── адаптив ────────────────────────────────────────────── */
@media (min-height: 780px) {
  .card-info .bio { -webkit-line-clamp: 4; }
}
@media (max-height: 660px) {
  .card-info { padding: 14px 16px 16px; }
  .card-info .name { font-size: 25px; }
  .card-info .bio { -webkit-line-clamp: 2; margin-top: 8px; }
  .card-tags { display: none; }
  .act.lg { width: 56px; height: 56px; }
  .act.md { width: 50px; height: 50px; }
  .act.sm { width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Город: один выбор из справочника и понятное различие одноимённых городов. */
.city-filter { margin: 12px 0 14px; }
.city-filter .link { margin-top: 6px; }
.city-picker { position: relative; }
.city-suggestions { position: relative; z-index: 12; max-height: 210px; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-card); margin-top: 4px; }
.city-suggestions button { width: 100%; min-height: 48px; text-align: left; padding: 8px 12px; display: flex; flex-direction: column; border-bottom: 1px solid var(--line-soft); }
.city-suggestions button:focus, .city-suggestions button:hover { background: var(--paper-2); }
.city-suggestions small { color: var(--ink-3); }
.city-none { color: var(--ink-3); padding: 12px; font-size: 13px; }

/* Тёмная тема сохраняет контраст текста, поверхностей и элементов управления. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #1d201e; --paper-2: #282c29; --paper-3: #343a35;
  --card: #292e2b; --line: #465048; --line-soft: #373e39;
  --ink: #f2ede5; --ink-2: #d2c9bd; --ink-3: #aea69b; --ink-4: #88877f;
  --vermilion: #e77e6c; --vermilion-dark: #ffab9b; --vermilion-soft: #49312d;
  --moss: #4c8069; --moss-dark: #b3dcc7; --moss-soft: #30483b;
  --ochre: #deb36b; --ochre-dark: #f0cb87; --ochre-soft: #493c29;
  --shadow-hair: 0 1px 0 rgba(0,0,0,.2);
  --shadow-card: 0 8px 28px rgba(0,0,0,.22);
  --shadow-float: 0 16px 36px rgba(0,0,0,.35);
}
:root[data-theme="dark"] body, :root[data-theme="dark"] .auth-screen, :root[data-theme="dark"] .loading-screen { background: var(--paper); }
:root[data-theme="dark"] .tabbar, :root[data-theme="dark"] .chat-screen .chat-head, :root[data-theme="dark"] .composer { background: rgba(29,32,30,.96); }
:root[data-theme="dark"] .btn.primary, :root[data-theme="dark"] .chip.on, :root[data-theme="dark"] .send { color: #1d201e; }
:root[data-theme="dark"] .btn.primary:active, :root[data-theme="dark"] .send:active { background: #d2c9bd; }
:root[data-theme="dark"] .row:active, :root[data-theme="dark"] .post-cta:active { background: var(--paper-3); }
:root[data-theme="dark"] .viewer-note p { color: var(--ink-2); }
:root[data-theme="dark"] .wizard-foot { background: var(--paper); }
:root[data-theme="dark"] .skeleton { background: var(--paper-3); }
:root[data-theme="dark"] .toast, :root[data-theme="dark"] .act .cnt { color: #1d201e; }
:root[data-theme="dark"] .chip-badge:not(.plain), :root[data-theme="dark"] .tile .flag:not(.answered) { color: #221c1a; }
:root[data-theme="dark"] .chip-badge.ochre .ic, :root[data-theme="dark"] .tile .flag.super .ic { color: #916626; }

.social-shortcuts { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 12px; }
.social-shortcuts .btn { min-height:40px; font-size:12px; padding:0 12px; }
.notice-count { border-radius:99px; background:var(--vermilion); color:#fff; padding:2px 6px; font-size:11px; }
.story-strip { display:flex; gap:12px; overflow-x:auto; margin:0 -2px 14px; padding:2px; }
.story-unit { flex:0 0 64px; text-align:center; color:var(--ink-2); font-size:11px; padding:0; }
.story-unit img { width:58px; height:58px; border:2px solid var(--vermilion); padding:3px; border-radius:50%; object-fit:cover; }
.story-unit span { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; padding-top:4px; }
.story-picture { width:100%; max-height:58vh; object-fit:contain; border-radius:var(--r-lg); background:var(--paper-2); }
.meeting-card, .admin-card, .notice-item { padding:14px; border:1px solid var(--line); border-radius:var(--r-md); background:var(--card); }
.meeting-card h3, .admin-card h3 { font-size:16px; }
.meeting-card p, .admin-card p { margin:6px 0; color:var(--ink-2); font-size:13px; overflow-wrap:anywhere; }
.meeting-card .chips, .admin-card .chips { margin-top:10px; }
.notice-item { width:100%; text-align:left; margin-bottom:8px; color:var(--ink); }
.notice-item.unread { border-color:var(--moss); }
.notice-item small { display:block; color:var(--ink-3); margin-top:5px; }
.admin-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:12px 0; }
.admin-grid button { min-height:50px; border:1px solid var(--line); background:var(--card); border-radius:var(--r-sm); color:var(--ink); }
.admin-card { margin:8px 0; }
.admin-card .btn { min-height:40px; }
.helper-preview { width:84px; height:84px; border-radius:var(--r-md); object-fit:cover; margin:8px 0; }
