:root {
  color-scheme: light dark;
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1c1c1e;
  --muted: #6b7280;
  --link: #e62e04;
  --accent: #e62e04;
  --accent-soft: rgba(230, 46, 4, 0.1);
  --accent-glow: rgba(230, 46, 4, 0.18);
  --accent-ink: #ffffff;
  --ok: #1e9e5a;
  --ok-soft: rgba(30, 158, 90, 0.14);
  --warn: #c77700;
  --warn-soft: rgba(199, 119, 0, 0.14);
  --danger: #c62828;
  --border: rgba(15, 23, 42, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.1);
  --card-gradient: linear-gradient(145deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.98) 100%);
  --media-bg: #eef1f5;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px calc(12px) 16px;
  padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--accent);
  color: var(--accent-ink);
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 17px;
  min-width: 0;
}
.brand-ico-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.95;
}
.brand span { font-weight: 400; opacity: 0.85; }
.user-slot { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-left: auto; }
.user-slot img { width: 28px; height: 28px; border-radius: 50%; }

.view { padding: 16px; max-width: 640px; margin: 0 auto; }

.tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1;
  border: 0;
  background: none;
  color: var(--muted);
  padding: 10px 4px;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.tab .tab-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  line-height: 1;
  flex-shrink: 0;
}
.tab-ico-wrap {
  position: relative;
  display: inline-flex;
}
.tab-badge {
  position: absolute;
  top: -4px;
  right: -10px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e62e04;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}
.tab-ico-svg { width: 20px; height: 20px; display: block; flex-shrink: 0; }
.tab-ico--accent { color: var(--accent); }
.tab.active { color: var(--accent); font-weight: 600; }
.tab.active .tab-ico:not(.tab-ico--accent) { color: var(--accent); }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}

.offer-card--highlight {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px var(--accent-glow), var(--shadow-lg);
}

.offer-card--notification.offer-card--unread {
  border-left: 4px solid var(--accent);
}

.offer-card--notification.offer-card--history {
  opacity: 0.88;
}

.offer-card--closed {
  opacity: 0.72;
}

.offer-card--closed .offer-card__title {
  color: var(--muted);
}

.offer-card--closed .offer-card__price-now {
  color: var(--muted);
}

.alert-form-sheet select + select,
.alert-form-sheet .btn.secondary {
  margin-top: 12px;
}

.alert-push-hint {
  margin-top: 12px;
}

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 6px; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }

input[type="text"], input[type="number"], input[type="search"], textarea, select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}
textarea { resize: vertical; min-height: 64px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 16px;
}
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }
.btn.ghost { background: none; color: var(--accent); margin-top: 8px; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.field-msg { font-size: 13px; margin-top: 6px; }
.field-msg.ok { color: var(--ok); }
.field-msg.err { color: var(--danger); }
.field-msg.warn { color: var(--warn); }

/* Autocomplete */
.ac-wrap { position: relative; }
.ac-list {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 4px);
  z-index: 20;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-height: 240px;
  overflow-y: auto;
}
.ac-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; cursor: pointer; font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.ac-item:last-child { border-bottom: 0; }
.ac-item img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; flex: 0 0 auto; }
.ac-item small { color: var(--muted); flex: 0 0 auto; }
.ac-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.ac-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ac-badge {
  font-size: 11px; font-weight: 600; line-height: 1;
  color: #fff; background: linear-gradient(90deg, #ff6a00, #ff2d55);
  padding: 3px 6px; border-radius: 999px;
}
.ac-rating { font-size: 12px; color: var(--muted); }
.ac-price { font-size: 12px; color: var(--muted); }

/* Image picker */
.img-pick { display: flex; align-items: center; gap: 12px; margin-top: 8px; }
.img-thumb {
  width: 72px; height: 72px; border-radius: 10px; object-fit: cover;
  background: var(--bg); border: 1px dashed var(--border);
  flex-shrink: 0;
}
.img-thumb.img-thumb--empty {
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
}

/* Offer card — feed */
.offer-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-gradient, var(--card));
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.offer-card--live {
  border-color: rgba(230, 46, 4, 0.12);
}

.offer-card--preview {
  margin-top: 10px;
  pointer-events: none;
}

.offer-card__top {
  display: flex;
  gap: 14px;
  padding: 14px 14px 10px;
}

.offer-card__media {
  position: relative;
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
}

.offer-card__img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--media-bg);
  display: block;
}

.offer-card__img--empty {
  background: var(--media-bg) linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.35) 100%);
}

.offer-card__discount {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, #ff6a00, #e62e04);
  box-shadow: 0 2px 8px rgba(230, 46, 4, 0.35);
}

.offer-card__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.offer-card__status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.offer-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.offer-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
  margin-top: auto;
}

.offer-card__price-now {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
  line-height: 1.1;
}

.offer-card__price-was {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: line-through;
}

.offer-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
}

.offer-card__extras {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 12px;
}

.offer-card__note {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted);
  flex: 1 1 100%;
}

.offer-card__footer {
  border-top: 1px solid var(--border);
  padding: 12px 14px 14px;
  background: rgba(0, 0, 0, 0.02);
}

.offer-card__cta .btn {
  margin-top: 0;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #ff5c1a 0%, #e62e04 100%);
  box-shadow: 0 4px 14px var(--accent-glow);
}

.offer-card__cta .btn.secondary {
  background: var(--card);
  box-shadow: none;
}

.offer-card__toolbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.offer-card__toolbar .icon-btn {
  height: 38px;
  border-radius: 10px;
  background: var(--card);
}

/* Pills */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill--active { background: var(--ok-soft); color: var(--ok); }
.pill--filled { background: var(--warn-soft); color: var(--warn); }
.pill--expired { background: rgba(0,0,0,0.06); color: var(--muted); }
.pill--time { background: var(--accent-soft); color: var(--accent); }
.pill--cat { background: rgba(59, 130, 246, 0.1); color: #2563eb; }
.pill--rating { background: rgba(245, 158, 11, 0.12); color: #b45309; }
.pill--tag { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.pill--tip { background: var(--accent-soft); color: var(--accent); }
.pill--coupon { background: var(--ok-soft); color: var(--ok); }

/* Legacy offer layout (preview helpers) */
.offer { display: flex; gap: 12px; }
.offer-img {
  width: 84px; height: 84px; border-radius: 10px; object-fit: cover;
  background: var(--media-bg); flex-shrink: 0;
}
.offer-body { flex: 1; min-width: 0; }
.offer-title { font-weight: 600; font-size: 15px; margin: 0 0 4px; }
.offer-price {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px;
  color: var(--accent); font-weight: 700; font-size: 16px;
}
.offer-price-current { color: var(--accent); }
.offer-price-usual {
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-decoration: line-through;
}
.feed-load-more-wrap { text-align: center; padding: 16px 0 8px; }
.feed-load-more { min-width: 200px; }
.feed-count { font-size: 12px; color: var(--muted); margin: 8px 0 0; }

.badge {
  display: inline-block; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 999px;
}
.badge.active { background: rgba(30,158,90,0.15); color: var(--ok); }
.badge.filled { background: rgba(199,119,0,0.15); color: var(--warn); }
.badge.expired { background: rgba(0,0,0,0.08); color: var(--muted); }
.disclosure { font-size: 11px; color: var(--muted); font-style: italic; margin-top: 6px; }

.offer-actions { display: flex; gap: 8px; margin-top: 10px; }
.offer-actions .btn { margin-top: 0; padding: 10px; font-size: 14px; }
.btn-group-open.anim-pop { animation: btn-pop 0.45s ease; }
.btn-group-verify.is-loading { opacity: 0.75; }
.group-verify-msg { min-height: 0; margin-top: 6px; font-size: 13px; }
@keyframes btn-pop {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.04); }
  70% { transform: scale(0.98); }
}
.offer-toolbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; height: 40px; padding: 0;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--card); color: var(--muted);
  cursor: pointer; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { background: var(--bg); }
.icon-btn.is-on {
  color: var(--accent);
  border-color: rgba(230, 46, 4, 0.35);
  background: rgba(230, 46, 4, 0.08);
}
.icon-btn-svg { width: 18px; height: 18px; display: block; flex-shrink: 0; }

.modal-host {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal-host[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.modal-sheet {
  position: relative; z-index: 1;
  width: 100%; max-width: 420px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 16px 16px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
}
.modal-title { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.modal-sheet .btn { width: 100%; margin-top: 10px; }
.modal-sheet .modal-cancel { margin-top: 14px; background: transparent; color: var(--muted); border: 0; }

.mini { font-size: 12px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 6px; }

.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; }
.chip {
  white-space: nowrap; border: 1px solid var(--border); background: var(--card);
  border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer; color: var(--text);
}
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.filters select { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; font-size: 13px; background: var(--card); color: var(--text); }

.offer-rating { color: var(--warn); font-weight: 600; }
.offer-price .discount {
  font-size: 12px; color: var(--ok); font-weight: 700;
  background: rgba(30, 158, 90, 0.12); border-radius: 6px; padding: 2px 7px;
}
.offer-price .discount-note { font-weight: 500; opacity: 0.85; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 2px 8px; }

.toggle-group { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 4px; }
.toggle { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 400; margin: 0; }
.toggle input { width: auto; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.empty .big { font-size: 40px; margin-bottom: 8px; }
.empty .empty-action {
  display: block;
  max-width: 220px;
  margin: 20px auto 0;
}

.section-title { font-size: 18px; font-weight: 700; margin: 4px 0 12px; }
.section-title--inline { margin: 0; flex: 1; min-width: 0; }
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.alert-prefs-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  margin: 0;
  color: var(--muted);
}
.alert-prefs-btn:hover,
.alert-prefs-btn:focus-visible { color: var(--accent); }
.alert-prefs-ico-svg { width: 20px; height: 20px; display: block; }
.alert-subs-divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0 12px;
}
.form-section-label {
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.04em; margin: 18px 0 10px;
}
.form-divider { border: 0; border-top: 1px solid var(--border); margin: 20px 0 4px; }
.rules-list { padding-left: 18px; line-height: 1.6; font-size: 14px; }
.rules-list li { margin-bottom: 10px; }

.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: #1c1c1e; color: #fff; padding: 12px 18px; border-radius: 10px;
  font-size: 14px; z-index: 50; max-width: 90%; text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.preview { border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 14px; }
.preview h4 { margin: 0 0 10px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

.signin-box { text-align: center; padding: 24px 16px; }
.signin-box p { color: var(--muted); font-size: 14px; }
#g-signin { display: flex; justify-content: center; margin-top: 0; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 14px; }
.checkbox-row input { width: 20px; height: 20px; margin-top: 2px; }

.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.publish-loading-card { text-align: center; padding: 36px 20px 32px; }
.publish-loading { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.publish-loading-spinner {
  width: 44px; height: 44px; border: 3px solid rgba(255,255,255,0.25);
  border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite;
}
.publish-loading-msg {
  font-size: 16px; font-weight: 600; margin: 0; min-height: 1.4em;
  animation: publish-msg-in 0.45s ease;
}
@keyframes publish-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.publish-category-row { margin: 12px 0 4px; }
.publish-category-row select { width: 100%; }

.sub-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.sub-item:last-child { border-bottom: 0; }
.sub-tags { font-size: 12px; line-height: 1.4; color: var(--muted); flex: 1; min-width: 0; padding-right: 8px; }
.sub-item-del {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  color: var(--muted);
}
.sub-item-del:hover,
.sub-item-del:focus-visible { color: var(--accent); }
.sub-del-ico-svg { width: 16px; height: 16px; display: block; }

/* Recorte de print (retrato) */
.crop-wrap { margin: 12px 0; }
.crop-stage {
  position: relative; width: 100%; border-radius: 12px; overflow: hidden;
  background: #111; border: 1px solid var(--border);
}
.crop-inner { position: relative; width: 100%; height: 0; }
.crop-inner img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  pointer-events: none; user-select: none;
}
.crop-overlay { position: absolute; inset: 0; pointer-events: none; }
.crop-shade { position: absolute; left: 0; right: 0; background: rgba(0, 0, 0, 0.55); }
.crop-shade-top { top: 0; }
.crop-shade-bottom { bottom: 0; }
.crop-frame {
  position: absolute; left: 0; right: 0;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
}
.crop-slider { width: 100%; margin: 12px 0 4px; accent-color: var(--accent); }

.feed-sort-row {
  margin-bottom: 10px;
}
.feed-sort-row .filters {
  margin-bottom: 0;
  padding-bottom: 4px;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
}
.feed-toolbar {
  margin-bottom: 4px;
}
.feed-search-bar {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}
.feed-search-bar.active {
  border-color: rgba(230, 46, 4, 0.35);
  background: rgba(230, 46, 4, 0.04);
}
.feed-search-ico {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  margin-left: 12px;
  margin-right: 10px;
  color: var(--muted);
}
.feed-search-ico-svg { width: 15px; height: 15px; display: block; flex-shrink: 0; }
.feed-search-bar .feed-search-input {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  max-width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 10px 8px 10px 0;
  margin: 0;
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  color: var(--text);
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}
.feed-search-input::placeholder { color: var(--muted); opacity: 0.85; }
.feed-search-input::-webkit-search-cancel-button { cursor: pointer; }
.feed-filter-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  margin: 0;
  padding: 0;
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feed-search-bar.active .feed-filter-btn { border-left-color: rgba(230, 46, 4, 0.25); }
.feed-filter-btn:active { background: var(--bg); }
.feed-filter-btn.active {
  background: rgba(230, 46, 4, 0.08);
  color: var(--accent);
}
.feed-filter-ico { width: 16px; height: 16px; display: block; }
.feed-filter-summary {
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 10px;
  line-height: 1.35;
  color: var(--muted);
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.feed-filter-summary.active { color: var(--accent); opacity: 1; }
.feed-filter-sheet label {
  margin: 14px 0 6px;
  font-size: 13px;
}
.feed-filter-sheet label:first-of-type { margin-top: 0; }
.feed-filter-sheet select,
.feed-filter-sheet input[type="number"],
.feed-filter-sheet input[type="text"] {
  background: var(--card);
}
.alert-form-sheet { margin-top: 4px; }
.alert-kw-hint {
  margin: -2px 0 10px;
  font-size: 11px;
  line-height: 1.35;
}
.alert-form-sheet .btn { margin-top: 16px; }
.alert-push-hint { margin-top: 12px; margin-bottom: 0; }
.price-range--modal {
  display: flex;
  align-items: center;
  gap: 8px;
}
.price-range--modal input { flex: 1; min-width: 0; }
.price-range-sep { color: var(--muted); font-size: 14px; flex-shrink: 0; }

.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; margin-top: 0; }

.cat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 12px 0 4px;
}
.cat-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 10px 4px; min-height: 72px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--bg); cursor: pointer; font: inherit; color: var(--text); text-align: center;
}
.cat-cell:active { opacity: 0.85; }
.cat-cell.is-selected {
  background: rgba(230, 46, 4, 0.12); border-color: var(--accent);
  color: var(--accent); font-weight: 600;
}
.cat-emoji { font-size: 22px; line-height: 1.1; }
.cat-name {
  font-size: 10px; line-height: 1.2; max-width: 100%;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}

.offer-coupon-price {
  font-size: 13px; color: var(--ok); margin-top: 4px; font-weight: 500;
}

.preview--loading { opacity: 0.9; }

.publish-coupon-prompt {
  margin: 12px 0 4px; text-align: center;
}
.coupon-price-link {
  border: 0; background: none; padding: 0; margin: 0;
  font: inherit; color: var(--accent); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
  font-size: 14px; line-height: 1.45;
}
.coupon-price-link:active { opacity: 0.85; }
.coupon-price-link-action { font-weight: 600; }

textarea {
  width: 100%; min-height: 110px; padding: 12px; border-radius: var(--radius);
  border: 1px solid var(--border); font: inherit; resize: vertical;
  background: var(--bg); color: var(--text); box-sizing: border-box;
}

.tip-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tip-chip {
  white-space: normal; text-align: left; line-height: 1.3;
  border: 1px solid var(--border); background: var(--bg);
  border-radius: 999px; padding: 8px 12px; font-size: 13px; cursor: pointer; color: var(--text);
}
.tip-chip.active { background: rgba(230, 46, 4, 0.12); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.tip-list { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); line-height: 1.45; }
.tip-list li { margin-bottom: 4px; }

/* Onboarding / FAQ */
body.onb-open { overflow: hidden; }
.onb-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px; padding-bottom: calc(16px + env(safe-area-inset-bottom));
}
.onb-overlay[hidden] { display: none !important; }
.onb-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.45);
}
.onb-card {
  position: relative; width: 100%; max-width: 420px;
  background: var(--card); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  padding: 20px 18px 16px; max-height: 85vh; overflow-y: auto;
}
.onb-progress { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.onb-icon { font-size: 36px; margin-bottom: 4px; }
.onb-title { font-size: 20px; font-weight: 700; margin: 0 0 10px; }
.onb-body { font-size: 14px; line-height: 1.55; }
.onb-body p { margin: 0 0 10px; }
.onb-list { margin: 0; padding-left: 18px; }
.onb-list li { margin-bottom: 8px; }
.onb-actions { display: flex; gap: 10px; margin-top: 18px; }
.onb-actions .btn { flex: 1; margin-top: 0; }
.onb-actions .btn.ghost { flex: 0 0 auto; width: auto; padding: 14px 16px; }

.help-intro { font-size: 14px; color: var(--muted); margin: 0 0 12px; line-height: 1.5; }
.help-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px;
}
.help-nav a {
  font-size: 13px; font-weight: 600; text-decoration: none; color: var(--accent);
  padding: 6px 12px; border-radius: 999px; background: rgba(230,46,4,0.08);
}
.help-nav a:active { opacity: 0.85; }
.help-section { scroll-margin-top: 72px; }
.inline-link {
  border: 0; background: none; padding: 0; margin: 0;
  color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer;
}

.faq-list { margin-top: 12px; }
.faq-item {
  border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 8px; overflow: hidden;
}
.faq-item summary {
  padding: 12px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
  list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--muted); font-size: 18px; font-weight: 400; }
.faq-item[open] summary::after { content: '−'; }
.faq-item p {
  margin: 0; padding: 0 14px 12px; font-size: 13px; color: var(--muted); line-height: 1.5;
}

.trust-banner {
  background: #fff8e6;
  border: 1px solid #f0d78c;
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.45;
}
.trust-banner strong { display: block; margin-bottom: 6px; color: var(--warn); }
.trust-banner p { margin: 0 0 6px; }
.trust-banner .hint { font-size: 12px; color: var(--muted); margin: 0; }

.desktop-group-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: var(--radius);
  background: #fff8f0;
  border: 1px solid #f0dcc4;
  font-size: 13px;
  line-height: 1.45;
}
.desktop-group-banner strong { display: block; margin-bottom: 4px; color: #9a4b00; }
.desktop-group-banner p { margin: 0; color: var(--text); }
.desktop-group-banner-body { flex: 1; min-width: 0; }
.desktop-group-banner-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.desktop-group-banner-close:hover { background: rgba(0, 0, 0, 0.06); color: var(--text); }
.desktop-publish-hint { margin-top: -4px; margin-bottom: 8px; }

/* Tema escuro (PWA / preferência do sistema) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --card: #181b22;
    --text: #eef0f4;
    --muted: #9aa3b2;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 10px 32px rgba(0, 0, 0, 0.45);
    --accent-soft: rgba(255, 92, 40, 0.16);
    --accent-glow: rgba(255, 92, 40, 0.28);
    --ok-soft: rgba(52, 211, 153, 0.14);
    --warn-soft: rgba(251, 191, 36, 0.14);
    --media-bg: #252932;
    --card-gradient: linear-gradient(145deg, rgba(28,31,38,0.98) 0%, rgba(22,25,31,0.98) 100%);
  }

  .pill--expired { background: rgba(255, 255, 255, 0.06); }
  .pill--cat { background: rgba(96, 165, 250, 0.14); color: #93c5fd; }
  .pill--rating { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }

  .offer-card__footer {
    background: rgba(255, 255, 255, 0.03);
  }

  .offer-card__img--empty {
    background: var(--media-bg) linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.06) 100%);
  }

  .trust-banner {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.25);
  }

  .desktop-group-banner {
    background: rgba(251, 146, 60, 0.1);
    border-color: rgba(251, 146, 60, 0.22);
  }
  .desktop-group-banner strong { color: #fdba74; }

  .chip.active { color: #fff; }
  .icon-btn:active { background: rgba(255, 255, 255, 0.06); }
  .modal-backdrop { background: rgba(0, 0, 0, 0.62); }
}
