/* ============================================
   Coleção Amigurumi — Estilos Compartilhados
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;500;600;700&family=Nunito:wght@400;600;700;800&display=swap');

:root {
  --cream: #fff7ee;
  --cream-deep: #ffeedc;
  --pink: #ffb6c8;
  --pink-deep: #ff89a8;
  --mint: #b8ebd4;
  --mint-deep: #7fd1a8;
  --lavender: #d4c1ff;
  --lavender-deep: #a98aff;
  --peach: #ffd1b5;
  --peach-deep: #ffa580;
  --sun: #ffe89a;
  --sun-deep: #ffcd55;
  --text: #5a4438;
  --text-soft: #8a7060;
  --white: #fffdfa;
  --shadow: 0 8px 24px rgba(255, 137, 168, 0.18);
  --shadow-hover: 0 14px 36px rgba(255, 137, 168, 0.28);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 182, 200, 0.12) 0, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(184, 235, 212, 0.15) 0, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(212, 193, 255, 0.08) 0, transparent 50%);
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

a { color: var(--pink-deep); text-decoration: none; }
a:hover { color: var(--lavender-deep); }

/* ============= NAV ============= */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 247, 238, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--cream-deep);
  padding: 14px 20px;
}
.topnav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.brand {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--pink-deep);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.brand-emoji { font-size: 1.5rem; }
.nav-links {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 2px;
  margin: -4px -2px;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s;
  color: var(--text-soft);
  white-space: nowrap;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
.nav-links a.active {
  background: var(--pink);
  color: var(--white);
}
@media (hover: hover) {
  .nav-links a:hover {
    background: var(--pink);
    color: var(--white);
  }
}

/* ============= LAYOUT ============= */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}
.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* ============= HERO (HOMEPAGE) ============= */
.hero {
  text-align: center;
  padding: 72px 24px 48px;
  position: relative;
}
.hero-emoji {
  font-size: 3.8rem;
  display: inline-block;
  animation: bobble 3s ease-in-out infinite;
}
@keyframes bobble {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  margin: 16px 0 12px;
  background: linear-gradient(135deg, var(--pink-deep), var(--lavender-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.subtitle {
  font-size: 1.15rem;
  color: var(--text-soft);
  max-width: 580px;
  margin: 0 auto;
}
.hero .pill {
  display: inline-block;
  background: var(--mint);
  color: var(--text);
  padding: 6px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-top: 18px;
  letter-spacing: 0.5px;
}

/* ============= CARDS GRID ============= */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 24px;
}
.card {
  background: var(--white);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  display: flex;
  flex-direction: column;
  border: 3px solid transparent;
}
.card:active { transform: scale(0.98); }
@media (hover: hover) {
  .card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
  }
  .card.theme-yellow:hover { border-color: var(--sun-deep); }
  .card.theme-orange:hover { border-color: var(--peach-deep); }
  .card.theme-pink:hover { border-color: var(--pink-deep); }
  .card.theme-purple:hover { border-color: var(--lavender-deep); }
}

.card-img {
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  background-color: var(--cream-deep);
  position: relative;
}
.card-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--white);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.card-body {
  padding: 22px 22px 26px;
}
.card-body h3 {
  font-size: 1.4rem;
  margin-bottom: 6px;
}
.card-body p {
  color: var(--text-soft);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.card-cta {
  display: inline-block;
  background: var(--pink);
  color: var(--white);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.card.theme-yellow .card-cta { background: var(--sun-deep); color: var(--text); }
.card.theme-orange .card-cta { background: var(--peach-deep); }
.card.theme-pink .card-cta { background: var(--pink-deep); }
.card.theme-purple .card-cta { background: var(--lavender-deep); }
@media (hover: hover) {
  .card-cta:hover { filter: brightness(0.95); color: var(--white); }
  .card.theme-yellow .card-cta:hover { color: var(--text); }
}

/* ============= PATTERN PAGE HERO ============= */
.pattern-hero {
  text-align: center;
  padding: 56px 24px 32px;
}
.pattern-hero .badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 999px;
  background: var(--mint);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.pattern-hero.theme-yellow .badge { background: var(--sun); }
.pattern-hero.theme-orange .badge { background: var(--peach); }
.pattern-hero.theme-pink .badge { background: var(--pink); color: var(--white); }
.pattern-hero.theme-purple .badge { background: var(--lavender); color: var(--white); }

.pattern-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 12px;
}
.pattern-hero p {
  color: var(--text-soft);
  max-width: 600px;
  margin: 0 auto;
}

.hero-img-wrap {
  margin: 32px auto 0;
  max-width: 480px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--cream-deep);
}
.hero-img-wrap img {
  width: 100%;
  display: block;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 24px auto 0;
  max-width: 800px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 4px 14px rgba(255, 137, 168, 0.12);
  transition: transform 0.3s;
}
@media (hover: hover) {
  .gallery img:hover { transform: scale(1.04); }
}

/* ============= SECTIONS ============= */
.section {
  background: var(--white);
  border-radius: 28px;
  padding: 32px;
  margin: 24px 0;
  box-shadow: var(--shadow);
}
.section h2 {
  font-size: 1.7rem;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section h2::before {
  content: '';
  width: 8px;
  height: 28px;
  background: var(--pink);
  border-radius: 4px;
}
.section.theme-yellow h2::before { background: var(--sun-deep); }
.section.theme-orange h2::before { background: var(--peach-deep); }
.section.theme-pink h2::before { background: var(--pink-deep); }
.section.theme-purple h2::before { background: var(--lavender-deep); }

.section h3 {
  font-size: 1.25rem;
  margin: 20px 0 10px;
  color: var(--pink-deep);
}
.section.theme-yellow h3 { color: #d18a00; }
.section.theme-orange h3 { color: var(--peach-deep); }
.section.theme-purple h3 { color: var(--lavender-deep); }

.section p { margin-bottom: 12px; }
.section ul, .section ol { margin: 8px 0 16px 22px; }
.section li { margin-bottom: 6px; }

/* ============= MATERIALS / INFO BOXES ============= */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.info-box {
  background: var(--cream);
  padding: 16px 18px;
  border-radius: 18px;
  border: 2px solid var(--cream-deep);
}
.info-box .label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-soft);
  font-weight: 700;
  margin-bottom: 4px;
}
.info-box .value {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.1rem;
  color: var(--text);
}

/* ============= ABBREVIATIONS TABLE ============= */
.abbr-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
  margin: 12px 0;
}
.abbr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.95rem;
  min-width: 320px;
}
.abbr-table th, .abbr-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--cream-deep);
}
.abbr-table th {
  background: var(--cream);
  font-weight: 700;
  color: var(--text-soft);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.abbr-table tr:last-child td { border-bottom: none; }
.abbr-table td:first-child {
  font-weight: 700;
  color: var(--pink-deep);
  font-family: 'Fredoka', sans-serif;
}

/* ============= ROUNDS LIST ============= */
.rounds {
  background: var(--cream);
  border-radius: 18px;
  padding: 18px 22px;
  margin: 12px 0;
  font-family: 'Nunito', sans-serif;
}
.rounds .round {
  padding: 8px 0;
  border-bottom: 1px dashed var(--cream-deep);
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.rounds .round:last-child { border-bottom: none; }
.rounds .round-label {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--pink-deep);
  min-width: 60px;
  flex-shrink: 0;
}
.rounds .round-text { flex: 1; }
.rounds .count {
  background: var(--white);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-soft);
  white-space: nowrap;
}

.theme-yellow .rounds .round-label { color: #d18a00; }
.theme-orange .rounds .round-label { color: var(--peach-deep); }
.theme-purple .rounds .round-label { color: var(--lavender-deep); }

.note {
  background: var(--sun);
  border-radius: 14px;
  padding: 12px 18px;
  margin: 14px 0;
  border-left: 4px solid var(--sun-deep);
  font-weight: 600;
}
.note strong { color: #b87600; }

.tip {
  background: var(--mint);
  border-radius: 14px;
  padding: 12px 18px;
  margin: 14px 0;
  border-left: 4px solid var(--mint-deep);
}

/* ============= PART NAVIGATION (chip pills) ============= */
.parts-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 24px;
}
.parts-nav a {
  padding: 10px 18px;
  background: var(--cream);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  border: 2px solid var(--cream-deep);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}
@media (hover: hover) {
  .parts-nav a:hover {
    background: var(--pink);
    color: var(--white);
    border-color: var(--pink);
  }
}
.parts-nav a:active {
  background: var(--pink);
  color: var(--white);
  border-color: var(--pink);
}

/* ============= EMOTION CARDS ============= */
.emotion-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 20px 0 32px;
}
.emotion-tab {
  background: var(--white);
  border-radius: 18px;
  padding: 16px;
  text-align: center;
  border: 3px solid var(--cream-deep);
  transition: all 0.2s;
  cursor: pointer;
}
.emotion-tab .emoji { font-size: 2rem; display: block; margin-bottom: 6px; }
.emotion-tab .name {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
}
.emotion-tab:active { transform: scale(0.97); }
@media (hover: hover) {
  .emotion-tab:hover { transform: translateY(-3px); }
  .emotion-tab.envy:hover { border-color: var(--mint-deep); background: var(--mint); }
  .emotion-tab.embarrassment:hover { border-color: var(--lavender-deep); background: var(--lavender); }
  .emotion-tab.anxiety:hover { border-color: var(--peach-deep); background: var(--peach); }
  .emotion-tab.ennui:hover { border-color: #5d8fc7; background: #c5dcef; }
}

.emotion-block {
  scroll-margin-top: 80px;
  margin-top: 36px;
}

/* ============= FOOTER ============= */
.footer {
  text-align: center;
  padding: 48px 24px 36px;
  color: var(--text-soft);
  font-size: 0.92rem;
}
.footer .credit {
  background: var(--white);
  padding: 18px 24px;
  border-radius: 18px;
  max-width: 600px;
  margin: 0 auto 18px;
  box-shadow: var(--shadow);
  font-weight: 600;
  line-height: 1.6;
}
.footer .heart { color: var(--pink-deep); }

.back-link {
  display: inline-block;
  margin: 24px 0 0;
  padding: 10px 20px;
  background: var(--white);
  border-radius: 999px;
  font-weight: 700;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
@media (hover: hover) {
  .back-link:hover { transform: translateX(-4px); color: var(--pink-deep); }
}
.back-link:active { transform: scale(0.97); }

/* ============= VIDEO CTA ============= */
.video-cta {
  background: linear-gradient(135deg, #fff 0%, var(--cream) 100%);
  border-radius: 28px;
  padding: 28px;
  margin: 24px 0;
  box-shadow: var(--shadow);
  border: 3px dashed var(--pink);
  text-align: center;
}
.video-cta.theme-yellow { border-color: var(--sun-deep); }
.video-cta.theme-orange { border-color: var(--peach-deep); }
.video-cta.theme-pink { border-color: var(--pink-deep); }
.video-cta.theme-purple { border-color: var(--lavender-deep); }

.video-cta h2 {
  font-family: 'Fredoka', sans-serif;
  font-size: 1.5rem;
  margin-bottom: 6px;
  color: var(--text);
}
.video-cta h2::before { display: none; }
.video-cta p.lead {
  color: var(--text-soft);
  margin-bottom: 18px;
  font-size: 0.98rem;
}

.btn-video {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ff0033;
  color: #fff;
  padding: 14px 28px;
  border-radius: 999px;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 0, 51, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-video:active { transform: scale(0.97); }
@media (hover: hover) {
  .btn-video:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(255, 0, 51, 0.4);
    color: #fff;
  }
}
.btn-video .yt-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.btn-video .lang-pill {
  background: rgba(255,255,255,0.22);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.dub-instructions {
  background: var(--white);
  border-radius: 18px;
  padding: 18px 22px;
  margin-top: 18px;
  text-align: left;
  font-size: 0.92rem;
  border: 2px solid var(--cream-deep);
}
.dub-instructions strong { color: var(--pink-deep); }
.dub-instructions ol {
  margin: 8px 0 0 22px;
  padding: 0;
}
.dub-instructions li { margin-bottom: 4px; }
.dub-instructions .step-num {
  display: inline-block;
  background: var(--pink);
  color: #fff;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.78rem;
  margin-right: 6px;
}

/* ============= STEP CLIPS (gesto da mão em loop) ============= */
.rounds .round:has(.step-clip) {
  flex-wrap: wrap;
  align-items: center;
}

.step-clip,
.clip-block {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  border: 2px solid var(--cream-deep);
}
.step-clip {
  flex: 0 0 200px;
  margin-left: auto;
}
.clip-block {
  width: 240px;
  max-width: 100%;
  margin: 14px 0;
}
.step-clip video,
.clip-block video {
  display: block;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.step-clip figcaption,
.clip-block figcaption {
  background: var(--sun-deep);
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  text-align: center;
  padding: 6px 10px;
  letter-spacing: 0.3px;
}

.clip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 14px 0;
}
.clip-row .clip-block {
  flex: 1 1 200px;
  max-width: 240px;
  margin: 0;
}

@media (max-width: 720px) {
  .step-clip {
    flex: 1 1 100%;
    max-width: 280px;
    margin: 6px auto 0;
  }
  .clip-block,
  .clip-row .clip-block {
    flex: 1 1 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media print {
  .step-clip, .clip-block, .clip-row { display: none !important; }
}

/* ============= TABLET ============= */
@media (max-width: 800px) {
  .container, .container-narrow { padding: 24px 18px; }
  .hero { padding: 56px 18px 40px; }
  .pattern-hero { padding: 44px 18px 26px; }
  .hero-img-wrap { margin-top: 24px; }
  .gallery { gap: 10px; }
  .info-grid { gap: 10px; }
  .cards { gap: 18px; }
}

/* ============= MOBILE ============= */
@media (max-width: 600px) {
  .topnav { padding: 12px 14px; }
  .brand { font-size: 1rem; }
  .brand-emoji { font-size: 1.3rem; }
  .nav-links { gap: 4px; }
  .nav-links a { padding: 9px 13px; font-size: 0.85rem; min-height: 38px; }

  .container, .container-narrow { padding: 20px 14px; }

  .hero { padding: 40px 16px 28px; }
  .hero-emoji { font-size: 3rem; }
  .hero p.subtitle { font-size: 1rem; }

  .pattern-hero { padding: 32px 14px 20px; }
  .pattern-hero p { font-size: 0.95rem; }
  .hero-img-wrap { border-radius: 22px; margin-top: 20px; }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .gallery img { border-radius: 14px; }

  .section {
    padding: 20px 16px;
    border-radius: 22px;
    margin: 18px 0;
  }
  .section h2 { font-size: 1.4rem; gap: 8px; }
  .section h2::before { width: 6px; height: 22px; }
  .section h3 { font-size: 1.1rem; margin: 16px 0 8px; }

  .info-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .info-box { padding: 12px 14px; border-radius: 14px; }
  .info-box .label { font-size: 0.72rem; }
  .info-box .value { font-size: 0.98rem; }

  .abbr-table { font-size: 0.88rem; }
  .abbr-table th, .abbr-table td { padding: 8px 10px; }
  .abbr-table th { font-size: 0.78rem; }

  .rounds { padding: 14px 14px; border-radius: 14px; }
  .rounds .round {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
  }
  .rounds .round-label { min-width: 0; font-size: 1rem; }
  .rounds .round-text { font-size: 0.95rem; }
  .rounds .count { align-self: flex-start; font-size: 0.8rem; }

  .note, .tip {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.92rem;
  }

  .parts-nav { gap: 6px; }
  .parts-nav a { padding: 9px 14px; font-size: 0.85rem; }

  .video-cta {
    padding: 22px 16px;
    border-radius: 22px;
    border-width: 2px;
  }
  .video-cta h2 { font-size: 1.25rem; }
  .video-cta p.lead { font-size: 0.92rem; }
  .btn-video {
    padding: 12px 20px;
    font-size: 0.98rem;
    width: 100%;
    justify-content: center;
  }
  .dub-instructions {
    padding: 14px 16px;
    font-size: 0.88rem;
    border-radius: 14px;
  }
  .dub-instructions ol { margin-left: 4px; }
  .dub-instructions li { line-height: 1.5; }

  .emotion-tabs {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .emotion-tab { padding: 14px 10px; }
  .emotion-tab .emoji { font-size: 1.7rem; }
  .emotion-tab .name { font-size: 0.95rem; }

  .card-body { padding: 18px 18px 22px; }
  .card-body h3 { font-size: 1.25rem; }
  .card-cta { padding: 11px 22px; font-size: 0.95rem; }

  .footer { padding: 36px 18px 28px; }
  .footer .credit { padding: 16px 18px; font-size: 0.88rem; }
}

/* ============= TINY PHONES ============= */
@media (max-width: 360px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 6px; }
  .info-grid { grid-template-columns: 1fr; }
  .emotion-tabs { grid-template-columns: 1fr; }
  .hero h1, .pattern-hero h1 { font-size: 1.7rem; }
  .nav-links a { padding: 8px 11px; font-size: 0.82rem; }
  .brand { font-size: 0.95rem; }
  .section { padding: 18px 14px; }
  .abbr-table { font-size: 0.82rem; }
  .abbr-table th, .abbr-table td { padding: 7px 8px; }
}

/* ============= LANDSCAPE PHONE TWEAKS ============= */
@media (max-width: 800px) and (orientation: landscape) {
  .hero { padding-top: 32px; padding-bottom: 24px; }
  .hero-emoji { font-size: 2.4rem; }
}

/* ============= TOAST (CONTRIBUIÇÕES) ============= */
#toast-root {
  position: fixed;
  right: 18px;
  top: 84px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 340px;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(255, 137, 168, 0.22), 0 2px 8px rgba(90, 68, 56, 0.06);
  border: 2px solid var(--cream-deep);
  min-width: 280px;
  opacity: 0;
  transform: translateY(-20px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(.2, .9, .3, 1.2);
}
.toast.toast-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast.toast-out {
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
}

.toast-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--pink), var(--lavender));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.toast-body {
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}
.toast-title {
  font-size: 0.92rem;
  color: var(--text);
}
.toast-title strong {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  color: var(--pink-deep);
}
.toast-meta {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.toast-amount {
  background: var(--mint);
  color: var(--text);
  padding: 1px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
}
.toast-dot { color: var(--cream-deep); }

.toast-close {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.toast-close:hover { background: var(--cream); color: var(--text); }

@media (max-width: 600px) {
  #toast-root {
    left: 10px;
    right: 10px;
    top: 72px;
    max-width: none;
  }
  .toast {
    min-width: 0;
    padding: 11px 12px;
    border-radius: 16px;
  }
  .toast-avatar { width: 34px; height: 34px; font-size: 0.85rem; }
  .toast-title { font-size: 0.88rem; }
  .toast-meta { font-size: 0.75rem; }
}

@media print { #toast-root { display: none !important; } }

/* ============= REDUCED MOTION ============= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============= PRINT (PDF) ============= */
@media print {
  @page {
    size: A4;
    margin: 14mm 14mm 16mm 14mm;
  }

  html, body {
    background: #fff !important;
    color: #2a2118 !important;
    font-size: 10.5pt;
    line-height: 1.55;
  }

  body { background-image: none !important; }

  /* hide everything interactive */
  .topnav,
  .video-cta,
  .parts-nav,
  .back-link,
  .footer .credit a:not([href^="https://chubbiesbyash"]) { display: none !important; }

  /* hero shrunk for print */
  .hero, .pattern-hero {
    padding: 0 0 12px;
    text-align: left;
    page-break-after: avoid;
  }
  .hero-emoji { display: none; }
  .hero h1, .pattern-hero h1 {
    font-size: 22pt;
    color: #5a4438 !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
    margin-bottom: 4pt;
  }
  .hero p.subtitle, .pattern-hero p { font-size: 11pt; color: #5a4438 !important; }
  .hero .pill, .pattern-hero .badge { display: none; }

  .container, .container-narrow {
    max-width: 100%;
    padding: 0;
  }

  /* hero image small */
  .hero-img-wrap {
    max-width: 60mm;
    float: right;
    margin: 0 0 8px 12px;
    border-radius: 6px;
    box-shadow: none;
    border: 1px solid #e5d8cc;
  }
  .hero-img-wrap img { max-height: 60mm; object-fit: cover; }

  /* gallery: 4 thumbs in one row */
  .gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    page-break-inside: avoid;
    margin: 6px 0 12px;
    clear: both;
  }
  .gallery img {
    border-radius: 4px;
    box-shadow: none;
    max-height: 30mm;
  }

  /* sections flat */
  .section {
    background: #fff !important;
    border-radius: 0;
    padding: 6px 0 4px;
    margin: 8px 0 4px;
    box-shadow: none;
    border-top: 1px solid #d8c8bc;
    page-break-inside: avoid;
  }
  .section h2 {
    font-size: 14pt;
    margin: 4pt 0 6pt;
    page-break-after: avoid;
  }
  .section h2::before {
    width: 4pt; height: 14pt;
  }
  .section h3 {
    font-size: 12pt;
    margin: 6pt 0 3pt;
    color: #b8557a !important;
    page-break-after: avoid;
  }
  .section p { margin-bottom: 4pt; }
  .section ul, .section ol { margin: 4pt 0 6pt 18pt; }
  .section li { margin-bottom: 2pt; }

  /* materials in compact 2-col */
  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 4pt;
    margin: 4pt 0;
  }
  .info-box {
    background: #fff8f0 !important;
    padding: 4pt 6pt;
    border-radius: 4px;
    border: 1px solid #e5d8cc;
  }
  .info-box .label { font-size: 7.5pt; }
  .info-box .value { font-size: 10pt; }

  /* abbr table compact */
  .abbr-wrap { overflow: visible; }
  .abbr-table {
    font-size: 9.5pt;
    page-break-inside: auto;
  }
  .abbr-table th, .abbr-table td {
    padding: 3pt 6pt;
    border-bottom: 0.5pt solid #d8c8bc;
  }
  .abbr-table th {
    background: #fff0e2 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* rounds compact: stack inline again on print, smaller */
  .rounds {
    background: #fffaf2 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 6pt 8pt;
    border-radius: 4px;
    border: 0.5pt solid #e5d8cc;
    page-break-inside: auto;
  }
  .rounds .round {
    flex-direction: row;
    padding: 2.5pt 0;
    border-bottom: 0.5pt dashed #e5d8cc;
    page-break-inside: avoid;
    font-size: 9.8pt;
  }
  .rounds .round-label {
    min-width: 56pt;
    flex-shrink: 0;
    font-weight: 700;
  }
  .rounds .count {
    background: #fff !important;
    border: 0.5pt solid #d8c8bc;
    font-size: 8.5pt;
    padding: 1pt 6pt;
    align-self: center;
  }

  /* notes / tips */
  .note {
    background: #fff0c2 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 5pt 8pt;
    border-radius: 4px;
    border-left: 2pt solid #e5b540;
    margin: 5pt 0;
    font-size: 9.5pt;
    page-break-inside: avoid;
  }
  .tip {
    background: #d8f1e1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 5pt 8pt;
    border-radius: 4px;
    border-left: 2pt solid #5db58a;
    margin: 5pt 0;
    font-size: 9.5pt;
    page-break-inside: avoid;
  }

  /* emotion tabs hidden (anchors not useful on paper) */
  .emotion-tabs { display: none; }
  .emotion-block { margin-top: 12pt; page-break-before: auto; }

  /* footer */
  .footer { padding: 8pt 0 0; border-top: 1px solid #d8c8bc; margin-top: 12pt; }
  .footer .credit {
    background: none !important;
    box-shadow: none;
    padding: 4pt 0;
    font-size: 9pt;
    text-align: center;
    color: #6a4f3e;
  }

  a { color: #b8557a !important; text-decoration: none; }
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #888;
    word-break: break-all;
  }
  a[href^="#"]::after { content: ""; }
}
