/* Salimos · tokens ligeros (docs/ux/07-visual-p0.md + 08-visual-s06.md) */
:root {
  --color-bg: #f7f6f3;
  --color-surface: #ffffff;
  --color-surface-container: #eeece7;
  --color-primary: #0aa7c2;
  --color-primary-container: #d6f3f8;
  --color-on-primary: #ffffff;
  --color-on-surface: #1f1f1f;
  --color-outline: #d8d5ce;
  --color-muted: #6b6b6b;
  --color-success: #2f9e74;
  --color-caution: #e07a5f;
  --color-caution-bg: #fdf0ec;
  --color-danger: #c0392b;
  --radius-card: 16px;
  --radius-btn: 999px;
  --radius-soft: 14px;
  --touch: 48px;
  --motion: 180ms ease;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-on-surface);
  font-size: 1.0625rem;
  line-height: 1.45;
}
.shell {
  max-width: 24.375rem;
  margin: 0 auto;
  padding: 1.25rem 1rem 5.5rem;
}
h1 {
  font-size: 1.85rem;
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
h2 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}
p {
  margin: 0.5rem 0;
  line-height: 1.45;
}
a {
  color: var(--color-primary);
}
.muted {
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 500;
}
.caption {
  font-size: 0.8125rem;
  color: var(--color-muted);
  font-weight: 500;
}
.nav {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-size: 0.85rem;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}
.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--color-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}
.back:hover {
  color: var(--color-primary);
}

/* App bar */
.appbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  margin: 0 0 1rem;
}
.appbar h1 {
  flex: 1;
  font-size: 1.35rem;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}
input,
textarea,
select {
  font: inherit;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-soft);
  background: var(--color-surface);
  min-height: var(--touch);
  color: var(--color-on-surface);
  transition: border-color var(--motion);
}
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-primary-container);
  border-color: var(--color-primary);
}
textarea {
  min-height: 5rem;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: var(--touch);
  padding: 0.75rem 1.1rem;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font: inherit;
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  text-decoration: none;
  width: 100%;
  transition:
    opacity var(--motion),
    transform var(--motion);
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.btn.secondary {
  background: var(--color-surface-container);
  color: var(--color-on-surface);
}
.btn.ghost {
  background: transparent;
  color: var(--color-primary);
  padding-left: 0;
  width: auto;
  min-height: 44px;
  justify-content: flex-start;
}
.btn.danger {
  background: var(--color-danger);
  color: #fff;
}
.btn.icon {
  width: var(--touch);
  padding: 0;
  border-radius: 999px;
  flex-shrink: 0;
}

.msg {
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-soft);
  font-size: 0.9rem;
}
.msg.error {
  background: #fef2f2;
  color: #991b1b;
}
.msg.ok {
  background: #ecfdf5;
  color: #065f46;
}
.msg.info {
  background: var(--color-surface-container);
  color: #334155;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--color-primary-container);
  color: #0a5f6e;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 0.25rem;
}
.badge.off {
  background: var(--color-surface-container);
  color: var(--color-muted);
}
.badge.success {
  background: #d8f3e7;
  color: #1a6b4a;
}
.badge.caution {
  background: var(--color-caution-bg);
  color: #7a3d2e;
}

.photo-box {
  width: 8.5rem;
  height: 8.5rem;
  border: 2px dashed var(--color-outline);
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--color-surface);
  margin: 1rem auto;
  color: var(--color-muted);
  font-weight: 600;
}
.photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hint {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 400;
}
.tips-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1.15rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}
.tips-list li {
  margin: 0.35rem 0;
}
.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-muted);
  font-size: 0.8rem;
  margin: 0.25rem 0;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-outline);
}
.profile-head {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  object-fit: cover;
  background: var(--color-surface-container);
}
.avatar.sm {
  width: 1.75rem;
  height: 1.75rem;
}

/* Splash */
.splash {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 2.5rem);
  padding-top: 0.5rem;
}
.splash-brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 2rem;
}
.splash-body {
  flex: 1;
}
.splash-cta {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.splash-links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: flex-start;
  margin-top: 0.5rem;
}
.splash-links a {
  color: var(--color-muted);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 0.95rem;
}
.splash-links a:hover {
  color: var(--color-primary);
}

.banner-anti {
  background: var(--color-primary-container);
  border: 1px solid #9ad7e3;
  color: #0a5f6e;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-soft);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  line-height: 1.4;
}
.safety-tip {
  background: var(--color-caution-bg);
  border: 1px solid #f0c4b6;
  color: #7a3d2e;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-soft);
  font-size: 0.9rem;
  margin: 0 0 1rem;
  line-height: 1.4;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.safety-tip button {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 1.25rem;
  min-width: 44px;
  min-height: 44px;
  flex-shrink: 0;
}

/* Filter pills */
.pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0 0;
  margin: 0.5rem 0 0;
  scrollbar-width: none;
}
.pills::-webkit-scrollbar {
  display: none;
}
.pill {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--color-outline);
  background: var(--color-surface);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-on-surface);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background var(--motion),
    border-color var(--motion);
}
.pill[aria-pressed="true"],
.pill.on {
  background: var(--color-primary-container);
  border-color: #9ad7e3;
  color: #0a5f6e;
}
.filters-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin: 0.75rem 0;
}
.filters-row label {
  flex: 1;
  min-width: 7rem;
}

/* Plan cards */
.plan-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}
.plan-card {
  display: block;
  padding: 0;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--motion);
}
.plan-card:hover,
.plan-card:focus-visible {
  border-color: var(--color-primary);
  outline: none;
}
.plan-cover {
  aspect-ratio: 16 / 9;
  background: var(--color-primary-container);
  display: grid;
  place-items: center;
  color: #0a5f6e;
  font-size: 0.8rem;
  font-weight: 600;
}
.plan-card-body {
  padding: 0.9rem 1rem 1rem;
}
.plan-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
  gap: 0.5rem;
}
.plan-title {
  font-weight: 700;
  font-size: 1.05rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0.15rem 0;
}
.plan-meta {
  font-size: 0.875rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}
.plan-host {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.55rem;
  font-size: 0.875rem;
  color: var(--color-muted);
}
.cupo {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0.35rem 0 0.75rem;
}
.cupo span {
  color: var(--color-primary);
}

.host-box {
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-soft);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}
.member-row {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-surface-container);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
}
.member-row:last-child {
  border-bottom: 0;
}

/* Sticky CTA bar */
.sticky-actions {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  background: var(--color-bg);
  border-top: 1px solid var(--color-outline);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
}
.sticky-actions-inner {
  max-width: 24.375rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--color-muted);
}
.empty-state .icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.7;
}

/* Segmented */
.segmented {
  display: flex;
  gap: 0.35rem;
  background: var(--color-surface-container);
  padding: 0.3rem;
  border-radius: 999px;
}
.segmented button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--color-muted);
}
.segmented button[aria-pressed="true"] {
  background: var(--color-surface);
  color: var(--color-on-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Chat S-06 */
.chat-header {
  margin-bottom: 0.75rem;
}
.chat-header .sub {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0;
}
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 12rem;
  margin: 1rem 0;
  max-height: 55vh;
  overflow-y: auto;
}
.chat-bubble {
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  padding: 0.7rem 0.85rem;
}
.chat-bubble .meta {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.chat-bubble.system {
  background: transparent;
  border-style: dashed;
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted);
}
.chat-composer {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.5rem;
  position: sticky;
  bottom: 0;
  background: var(--color-bg);
  padding: 0.65rem 0 calc(0.5rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--color-outline);
  margin: 0 -0;
  z-index: 10;
}
.chat-composer input {
  flex: 1;
  min-width: 0;
}
.chat-composer .btn {
  width: auto;
  min-width: var(--touch);
  padding: 0.7rem 1rem;
}
.chat-empty {
  text-align: center;
  color: var(--color-muted);
  padding: 2rem 1rem;
  font-size: 0.95rem;
}
.chat-gate {
  text-align: center;
  padding: 2rem 1rem;
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  margin: 1.5rem 0;
}
.chat-gate p {
  margin: 0 0 1rem;
  font-weight: 600;
}

/* Reviews */
.stars {
  display: flex;
  gap: 0.35rem;
  margin: 0.4rem 0;
  flex-wrap: wrap;
}
.stars button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--color-outline);
  border-radius: 0.65rem;
  background: var(--color-surface);
  font-size: 1.25rem;
  cursor: pointer;
  color: var(--color-outline);
  transition:
    background var(--motion),
    border-color var(--motion),
    color var(--motion);
}
.stars button.on {
  background: var(--color-primary-container);
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  padding: 1rem;
  margin-bottom: 0.75rem;
}

/* Radio list (report) */
.radio-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin: 0.5rem 0;
}
.radio-list label {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  min-height: 48px;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-soft);
  background: var(--color-surface);
  font-weight: 500;
  cursor: pointer;
}
.radio-list input {
  width: 1.15rem;
  height: 1.15rem;
  min-height: 0;
  accent-color: var(--color-primary);
}
.radio-list label:has(input:checked) {
  border-color: var(--color-primary);
  background: var(--color-primary-container);
}

/* Settings rows */
.settings-list {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 1rem 0;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--color-surface-container);
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}
.settings-row:last-child {
  border-bottom: 0;
}
.settings-row:active {
  background: var(--color-surface-container);
}
.settings-section {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 1.25rem 0 0.4rem;
}

/* Overflow menu */
.menu-dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--color-muted);
  border-radius: 999px;
}
.menu-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-outline);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin: 0.5rem 0 1rem;
}
.menu-panel a,
.menu-panel button {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--color-surface-container);
  background: transparent;
  text-align: left;
  font: inherit;
  font-weight: 500;
  color: var(--color-on-surface);
  text-decoration: none;
  cursor: pointer;
}
.menu-panel a:last-child,
.menu-panel button:last-child {
  border-bottom: 0;
}
.menu-panel .danger-link {
  color: var(--color-danger);
}

.otp-row {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  margin: 0.5rem 0;
}
.otp-row input {
  width: 2.75rem;
  min-height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.4rem;
  border-radius: var(--radius-soft);
}

/* TabBar · Home / Descubrir / + / Chat / Tú */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: var(--color-surface);
  border-top: 1px solid var(--color-outline);
  padding: 0.35rem 0 calc(0.35rem + env(safe-area-inset-bottom));
}
.tabbar-inner {
  max-width: 24.375rem;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-around;
}
.tabbar a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: 52px;
  text-decoration: none;
  color: var(--color-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.25rem 0.2rem;
}
.tabbar a[aria-current="page"] {
  color: var(--color-primary);
}
.tabbar .tab-ico {
  font-size: 1.15rem;
  line-height: 1;
}
.tabbar .tab-plus {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  background: var(--color-primary);
  color: var(--color-on-primary);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: -0.35rem;
  box-shadow: 0 2px 8px rgba(10, 167, 194, 0.35);
}
.tabbar a:has(.tab-plus) {
  color: var(--color-primary);
}
body.has-tabbar .shell {
  padding-bottom: 6.5rem;
}
body.has-tabbar .sticky-actions {
  bottom: calc(3.6rem + env(safe-area-inset-bottom));
}
body.has-tabbar .chat-composer {
  padding-bottom: calc(0.5rem + 3.6rem + env(safe-area-inset-bottom));
}
