﻿:root {
  --bg: #fbf7ee;
  --ink: #2a231a;
  --muted: rgba(42, 35, 26, 0.65);
  --paper: #ffffff;
  --card: rgba(255, 255, 255, 0.72);
  --stroke: rgba(42, 35, 26, 0.12);
  --stroke-strong: rgba(42, 35, 26, 0.18);
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.06);

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;

  --font: ui-serif, Georgia, "Times New Roman", Times, serif;
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden; /* Sem rolagem */
  background:
    radial-gradient(circle at 8% 18%, rgba(190, 213, 181, 0.34), transparent 28%),
    radial-gradient(circle at 92% 76%, rgba(205, 220, 184, 0.3), transparent 30%),
    linear-gradient(135deg, #f5f5e9 0%, #fbf7ee 48%, #f0f4e6 100%);
  color: var(--ink);
  font-family: var(--font-sans);
}

.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--stroke);
  justify-content: space-between;
}

.live-info {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.live-info time {
  min-width: 58px;
  color: var(--ink);
  font-weight: 800;
}

.leaf-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.leaf-layer::before,
.leaf-layer::after {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(151, 181, 139, 0.2), rgba(151, 181, 139, 0) 68%);
  filter: blur(8px);
}

.leaf-layer::before {
  top: 6%;
  left: -130px;
}

.leaf-layer::after {
  right: -130px;
  bottom: 4%;
}

.topbar,
.daily-strip,
.shell {
  position: relative;
  z-index: 1;
}

.falling-leaf {
  --leaf-size: 86px;
  position: absolute;
  top: var(--leaf-y);
  left: var(--leaf-x);
  width: var(--leaf-size);
  height: var(--leaf-size);
  opacity: 0.24;
  background-image: url("assets/falling-leaves.png");
  background-repeat: no-repeat;
  background-size: 400% 300%;
  transform: rotate(var(--leaf-rotation));
}

.leaf-1 { --leaf-x: 2%; --leaf-y: 14%; --leaf-rotation: -18deg; background-position: 0 0; }
.leaf-2 { --leaf-x: 17%; --leaf-y: 75%; --leaf-rotation: 34deg; background-position: 33.333% 0; }
.leaf-3 { --leaf-x: 38%; --leaf-y: 7%; --leaf-rotation: 12deg; background-position: 66.666% 50%; opacity: 0.16; }
.leaf-4 { --leaf-x: 70%; --leaf-y: 78%; --leaf-rotation: -32deg; background-position: 100% 0; opacity: 0.18; }
.leaf-5 { --leaf-x: 84%; --leaf-y: 17%; --leaf-rotation: 26deg; background-position: 0 100%; }
.leaf-6 { --leaf-x: 93%; --leaf-y: 58%; --leaf-rotation: -12deg; background-position: 100% 100%; }
.leaf-7 { --leaf-x: 10%; --leaf-y: 48%; --leaf-rotation: 46deg; --leaf-size: 62px; background-position: 66.666% 0; opacity: 0.19; }
.leaf-8 { --leaf-x: 31%; --leaf-y: 35%; --leaf-rotation: -38deg; --leaf-size: 58px; background-position: 33.333% 50%; opacity: 0.15; }
.leaf-9 { --leaf-x: 61%; --leaf-y: 43%; --leaf-rotation: 18deg; --leaf-size: 66px; background-position: 66.666% 100%; opacity: 0.17; }
.leaf-10 { --leaf-x: 77%; --leaf-y: 56%; --leaf-rotation: -48deg; --leaf-size: 56px; background-position: 100% 50%; opacity: 0.2; }

@media (max-width: 720px) {
  .leaf-2,
  .leaf-4,
  .leaf-6,
  .leaf-8,
  .leaf-10 {
    display: none;
  }
}

.about-trigger {
  padding: 2px 0;
  border: 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.about-trigger:hover,
.about-trigger:focus-visible {
  color: var(--ink);
  border-bottom-color: var(--stroke-strong);
}

.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  background: url("assets/entre-sabios-social.png") 23% center / 240% auto no-repeat;
  font-size: 0;
}

.brand-title {
  font-weight: 800;
  letter-spacing: 0.09em;
  font-size: 13px;
}

.brand-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
}

.shell {
  height: calc(100vh - 100px);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr; /* 25 / 50 / 25 */
}

.daily-strip {
  height: 32px;
  overflow: hidden;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--stroke);
  background: rgba(239, 226, 193, 0.34);
  color: rgba(42, 35, 26, 0.72);
  white-space: nowrap;
}

.daily-track {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 22px;
  padding-left: 100%;
  font-family: var(--font);
  font-size: 13px;
  animation: daily-scroll 28s linear infinite;
}

.daily-label {
  color: rgba(42, 35, 26, 0.5);
  font-family: var(--font-sans);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.daily-separator {
  color: rgba(143, 111, 53, 0.62);
}

@keyframes daily-scroll {
  to {
    transform: translateX(-100%);
  }
}

.col-left,
.col-center,
.col-right {
  min-width: 0;
  overflow: hidden;
}

.col-left {
  padding: 14px 14px 12px;
  border-right: 1px solid var(--stroke);
}

.col-center {
  position: relative;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.col-right {
  padding: 14px 14px 12px;
  border-left: 1px solid var(--stroke);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.section-title {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
}

.section-subtitle {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

/* SENTIMENTOS (cards clicáveis) */
.feelings-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.feeling {
  user-select: none;
  cursor: pointer;
  padding: 8px 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.55);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12.5px;
  color: rgba(42, 35, 26, 0.88);
}

.feeling input {
  display: none;
}

.feeling.selected {
  border-color: rgba(111, 143, 115, 0.65);
  background: rgba(218, 235, 211, 0.86);
  box-shadow: 0 8px 20px rgba(79, 125, 93, 0.12);
  transform: translateY(-1px);
}

.feeling.primary-feeling {
  border-color: rgba(79, 125, 93, 0.88);
  box-shadow: 0 0 0 2px rgba(79, 125, 93, 0.13), 0 8px 20px rgba(79, 125, 93, 0.12);
}

/* PÚBLICO */
.audience {
  margin-top: 14px;
  border-top: 1px dashed rgba(42, 35, 26, 0.14);
  padding-top: 12px;
}

.audience-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.audience-options {
  margin-top: 8px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.radio {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
}

.radio input {
  accent-color: #8f6f35;
}

/* BOTÃO PRINCIPAL */
.primary {
  margin-top: 14px;
  width: 100%;
  border: 1px solid rgba(42, 35, 26, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 14px;
  background: #efe2c1;
  color: var(--ink);
  font-weight: 900;
  font-size: 13.5px;
  cursor: pointer;
  letter-spacing: 0.06em;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 80ms ease;
}

.primary.has-selection {
  border-color: rgba(79, 125, 93, 0.38);
  background: #dcebd2;
  box-shadow: 0 14px 34px rgba(79, 125, 93, 0.18);
}

.primary:active {
  transform: translateY(1px);
}

.selection-hint {
  min-height: 17px;
  margin-top: 6px;
  color: rgba(112, 74, 45, 0.86);
  font-size: 11.5px;
  text-align: center;
}

.feelings-grid.needs-selection {
  animation: selection-nudge 360ms ease;
}

@keyframes selection-nudge {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-3px); }
  70% { transform: translateX(3px); }
}

.tip {
  margin-top: 10px;
}

.tip-box {
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 14px;
  padding: 10px 12px;
}

/* COLUNA CENTRAL */
.center-fixed {
  font-family: var(--font);
  font-size: 18px;
  color: rgba(42, 35, 26, 0.78);
  text-align: center;
  padding: 8px 6px;
}

.center-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.favorite-library {
  margin-left: auto;
}

.ghost {
  border: 1px solid rgba(42, 35, 26, 0.12);
  background: rgba(255, 255, 255, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 12.5px;
  cursor: pointer;
  color: rgba(42, 35, 26, 0.85);
}

.center-card {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 22px;
  border: 1px solid var(--stroke);
  background:
    radial-gradient(circle at 50% 24%, rgba(252, 250, 241, 0.58), rgba(239, 245, 226, 0.26) 48%, rgba(232, 240, 217, 0.48) 100%),
    url("assets/quote-landscape.png") center 65% / cover no-repeat;
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quote-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
}

.quote {
  flex: 1;
  min-width: 0;
  font-family: var(--font);
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.22;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 34px 42px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  color: rgba(38, 34, 25, 0.94);
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.82);
}

.quote-action {
  position: absolute;
  z-index: 2;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: rgba(42, 35, 26, 0.42);
  background: transparent;
  cursor: pointer;
  line-height: 30px;
  transition: color 160ms ease, background 160ms ease, transform 120ms ease;
}

.quote-action svg {
  width: 17px;
  height: 17px;
  display: block;
  margin: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.quote.invitation {
  max-width: 620px;
  margin: auto;
  color: rgba(42, 35, 26, 0.72);
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.35;
}

.quote-action:hover,
.quote-action:focus-visible {
  color: rgba(42, 35, 26, 0.82);
  background: rgba(255, 255, 255, 0.64);
}

.quote-action:active {
  transform: scale(0.92);
}

.quote-action:disabled {
  opacity: 0;
  pointer-events: none;
}

.quote-dislike {
  left: 2px;
  bottom: 6px;
}

.quote-like {
  right: 2px;
  bottom: 6px;
}

.quote-favorite {
  top: 0;
  right: 2px;
  font-size: 22px;
}

.quote-action.active-like {
  color: #4f7d5d;
  background: rgba(218, 235, 211, 0.86);
}

.quote-action.active-dislike {
  color: #4f7d5d;
  background: rgba(218, 235, 211, 0.86);
}

.quote-action.active-like svg,
.quote-action.active-dislike svg {
  fill: rgba(79, 125, 93, 0.22);
}

.quote-action.active-favorite {
  color: #8f6f35;
  background: rgba(239, 226, 193, 0.58);
}

.quote.long-quote {
  font-size: 17px;
  line-height: 1.35;
  text-align: left;
  align-items: flex-start;
}

.quote-author {
  text-align: center;
  font-family: var(--font);
  font-size: 16px;
  color: rgba(42, 35, 26, 0.8);
}

.divider {
  height: 1px;
  background: rgba(42, 35, 26, 0.12);
  margin: 0 10px;
}

.block {
  margin: 0 4px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 12px;
  background: rgba(250, 249, 240, 0.52);
  backdrop-filter: blur(3px);
}

.block-title {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  margin-bottom: 6px;
}

.block-text {
  font-size: 13px;
  color: rgba(42, 35, 26, 0.82);
  line-height: 1.45;
  max-height: 64px;
  overflow: hidden;
}

.block-text.small {
  max-height: 52px;
}

.philosophy-block {
  border-left: 2px solid rgba(143, 111, 53, 0.35);
  margin: 0 4px;
  padding-left: 12px;
}

.philosophy-block .block-text {
  max-height: 58px;
}

@media (max-width: 720px) {
  .live-info {
    gap: 8px;
    font-size: 11px;
  }

  .brand-subtitle {
    display: none;
  }
}

.book-rec {
  margin-top: 9px;
  padding-top: 8px;
  border-top: 1px solid rgba(42, 35, 26, 0.1);
  color: rgba(42, 35, 26, 0.76);
  font-size: 11.5px;
  line-height: 1.42;
}

.book-rec-label {
  color: rgba(42, 35, 26, 0.58);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.book-rec-title {
  margin-top: 3px;
  color: rgba(42, 35, 26, 0.9);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
}

.book-rec-why {
  margin-top: 4px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 8px 2px;
}

.tag {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(42, 35, 26, 0.12);
  background: rgba(255, 255, 255, 0.45);
  color: rgba(42, 35, 26, 0.75);
}

.feedback {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 0 8px 2px;
}

.feedback-btn {
  min-width: 92px;
  border: 1px solid rgba(42, 35, 26, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(42, 35, 26, 0.78);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  padding: 8px 10px;
  transition: background 160ms ease, border-color 160ms ease, transform 80ms ease;
}

.feedback-btn.active-like {
  border-color: rgba(79, 125, 93, 0.45);
  background: rgba(218, 235, 211, 0.86);
}

.feedback-btn.active-dislike {
  border-color: rgba(151, 91, 72, 0.42);
  background: rgba(239, 215, 205, 0.78);
}

.feedback-btn.active-favorite {
  border-color: rgba(143, 111, 53, 0.42);
  background: rgba(239, 226, 193, 0.72);
}

.preference-note {
  min-height: 15px;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
}

.feedback-btn:active {
  transform: translateY(1px);
}

.decor {
  position: absolute;
  left: 50%;
  bottom: -12px;
  transform: translateX(-50%);
  opacity: 0.18;
  pointer-events: none;
  filter: blur(0.6px);
}

/* COLUNA DIREITA */
.share-block {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.55);
}

.share-title {
  font-weight: 900;
  letter-spacing: 0.14em;
  font-size: 12px;
  margin-bottom: 10px;
}

.share-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1.91 / 1;
  object-fit: cover;
  border: 1px solid var(--stroke);
  border-radius: 6px;
}

.full {
  width: 100%;
  margin-top: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(42, 35, 26, 0.12);
  background: rgba(255, 255, 255, 0.42);
  font-weight: 800;
  font-size: 12.5px;
  cursor: pointer;
}

.full:active {
  transform: translateY(1px);
}

.footer-note {
  height: 10px;
}

.favorites-dialog {
  width: min(560px, calc(100% - 28px));
  max-height: min(680px, calc(100vh - 40px));
  padding: 18px;
  border: 1px solid var(--stroke-strong);
  border-radius: 20px;
  color: var(--ink);
  background: var(--bg);
  box-shadow: 0 24px 80px rgba(42, 35, 26, 0.18);
}

.favorites-dialog::backdrop {
  background: rgba(42, 35, 26, 0.24);
  backdrop-filter: blur(3px);
}

.favorites-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--stroke);
}

.favorites-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  overflow: auto;
  max-height: calc(100vh - 180px);
}

.favorite-item {
  padding: 13px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.5);
}

.favorite-item-quote {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.4;
}

.favorite-item-meta {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
}

.favorite-item-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.empty-favorites {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
  font-family: var(--font);
}

.about-content {
  padding: 8px 2px 0;
  color: rgba(42, 35, 26, 0.82);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.62;
}

.about-content p {
  margin: 12px 0;
}

.about-contact {
  padding-top: 12px;
  border-top: 1px solid var(--stroke);
  font-family: var(--font-sans);
  font-size: 12px;
}

.about-contact a {
  color: var(--ink);
  text-underline-offset: 3px;
}

@media (max-width: 720px) {
  html,
  body {
    height: auto;
    min-height: 100%;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    width: 100%;
    min-width: 0;
    gap: 10px;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
    background: rgba(251, 247, 238, 0.94);
    backdrop-filter: blur(8px);
  }

  .brand {
    min-width: 0;
  }

  .brand-title {
    font-size: 12px;
    letter-spacing: 0.06em;
    white-space: nowrap;
  }

  .live-info {
    flex: 0 0 auto;
  }

  .shell {
    width: 100%;
    min-width: 0;
    height: auto;
    grid-template-columns: minmax(0, 1fr);
  }

  .daily-track {
    animation-duration: 22s;
  }

  .col-left,
  .col-center,
  .col-right {
    width: 100%;
    min-width: 0;
    overflow: visible;
    border: 0;
  }

  .col-left,
  .col-right {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }

  .col-center {
    min-height: 0;
    padding: 12px max(16px, env(safe-area-inset-right)) 22px max(16px, env(safe-area-inset-left));
    border-top: 1px solid var(--stroke);
    border-bottom: 1px solid var(--stroke);
    scroll-margin-top: 68px;
  }

  .feelings-grid,
  .feeling {
    min-width: 0;
  }

  .feeling {
    min-height: 46px;
    padding-inline: 6px;
    overflow-wrap: anywhere;
  }

  .radio {
    min-height: 44px;
    padding: 8px 4px;
  }

  .radio input {
    width: 18px;
    height: 18px;
  }

  .primary {
    min-height: 50px;
    font-size: 12.5px;
    letter-spacing: 0.04em;
    white-space: normal;
  }

  .center-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .center-top .ghost {
    min-height: 44px;
    min-width: 0;
    padding-inline: 8px;
    white-space: normal;
  }

  .center-top #newBtn {
    grid-column: 1 / -1;
  }

  .favorite-library {
    margin-left: 0;
  }

  .center-card {
    overflow: visible;
    background:
      radial-gradient(circle at 50% 20%, rgba(252, 250, 241, 0.66), rgba(239, 245, 226, 0.42) 52%, rgba(232, 240, 217, 0.58) 100%),
      url("assets/quote-landscape.png") center 65% / cover no-repeat;
  }

  .quote-stage {
    min-height: 280px;
  }

  .quote {
    padding-inline: 34px;
    font-size: clamp(21px, 7vw, 28px);
  }

  .quote-action {
    width: 44px;
    height: 44px;
    line-height: 44px;
  }

  .quote-dislike {
    left: -6px;
  }

  .quote-like,
  .quote-favorite {
    right: -6px;
  }

  .block-text,
  .block-text.small,
  .philosophy-block .block-text,
  .book-rec {
    max-height: none;
  }

  .col-right {
    min-height: 0;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }

  .full {
    min-height: 48px;
  }

  .favorites-dialog {
    width: calc(100% - 20px);
    max-height: calc(100dvh - 20px);
    padding: 16px;
  }

  .favorites-list {
    max-height: calc(100dvh - 170px);
  }
}

@media (max-width: 380px) {
  .topbar {
    height: 60px;
  }

  .brand-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .brand-title {
    font-size: 11px;
  }

  .live-info > span {
    display: none;
  }

  .col-center {
    scroll-margin-top: 60px;
  }

  .feelings-grid {
    gap: 7px;
  }

  .center-fixed {
    font-size: 16px;
  }

  .quote-stage {
    min-height: 250px;
  }

  .quote {
    padding-inline: 28px;
  }
}
