/* Kaomoji builder page. Site header and footer stay untouched. */
body.page-gerador-de-kaomoji {
  --kb-navy: #1e3a8a;
  --kb-blue: #1d4ed8;
  --kb-ink: #1a1d2b;
  --kb-card: #fff;
  --kb-line: #e3e9f1;
  --kb-soft: #f4f7fb;
}

.kb-stage {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: 18px 26px;
  align-items: start;
  margin: 4px 0 20px;
  color: var(--kb-ink);
}

.kb-aside {
  position: relative;
  min-width: 0;
}

.kb-title {
  margin: 0 0 14px;
  color: var(--kb-ink);
  font-size: clamp(2.2rem, 2.9vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.article .kb-lede {
  margin: 0 0 6px;
  max-width: 32ch;
  color: #3d4658;
  font-size: 1rem;
  line-height: 1.5;
  hyphens: manual;
}

.article img.kb-cat {
  display: block;
  width: min(112%, 320px);
  max-width: none;
  height: auto;
  margin: 0 0 4px -6%;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.kb-checks {
  width: min(100%, 250px);
  margin: 6px 0 0;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: #fff6d8;
  box-shadow: 0 10px 22px rgba(180, 140, 20, 0.12);
}

.kb-checks-title,
.kb-note-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--kb-ink);
  font-size: 1.05rem;
  font-weight: 800;
}

.kb-note-title svg {
  display: block;
  flex: none;
}

.kb-bulb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffedd5 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97706' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a6 6 0 0 0-3 11c.5.5 1 1.2 1 2v1h4v-1c0-.8.5-1.5 1-2A6 6 0 0 0 12 2z'/%3E%3C/svg%3E") center / 16px no-repeat;
  flex: none;
}

.kb-checks ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.article .kb-checks li {
  position: relative;
  margin: 0 0 9px;
  padding-left: 28px;
  color: #3f3a2a;
  font-size: 0.93rem;
  line-height: 1.35;
}

.kb-checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #f5c400 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%231a1d2b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5 10 17l9-10'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.kb-main {
  min-width: 0;
  padding: 14px;
  border: 1px solid #e7edf5;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(20, 40, 80, 0.06);
}

body.page-gerador-de-kaomoji .ut-kb-app {
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}

.kb-builder {
  display: grid;
  grid-template-columns: 1.45fr 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}

body.page-gerador-de-kaomoji .ut-kb-panel,
body.page-gerador-de-kaomoji .ut-kb-part-block {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--kb-line);
  border-radius: 16px;
  background: var(--kb-card);
  box-shadow: 0 6px 16px rgba(20, 40, 80, 0.03);
}

body.page-gerador-de-kaomoji .ut-kb-step-label,
body.page-gerador-de-kaomoji .ut-kb-part-title {
  gap: 10px;
  margin: 0 0 14px !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  letter-spacing: -0.01em;
}

body.page-gerador-de-kaomoji .ut-kb-step-n {
  width: 26px;
  height: 26px;
  border: 2px solid #c7d4ee;
  background: var(--kb-navy);
  background-clip: padding-box;
  font-size: 0.82rem;
}

.kb-ico {
  display: block;
  flex: none;
  color: var(--kb-ink);
}

body.page-gerador-de-kaomoji .ut-kb-moods {
  gap: 8px;
}

body.page-gerador-de-kaomoji .ut-kb-mood {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--kb-line);
  border-radius: 12px;
  background: #fff;
  color: var(--kb-ink);
  font-size: 0.9rem;
  font-weight: 700;
}

body.page-gerador-de-kaomoji .ut-kb-mood:hover {
  border-color: #c9d6ea;
  background: #f5f8fd;
}

body.page-gerador-de-kaomoji .ut-kb-mood.is-active {
  border-color: var(--kb-blue);
  background: var(--kb-blue);
  color: #fff;
}

body.page-gerador-de-kaomoji .ut-kb-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-gerador-de-kaomoji .ut-kb-opt {
  min-width: 52px;
  height: 46px;
  padding: 0 10px;
  border: 1px solid var(--kb-line);
  border-radius: 10px;
  background: #fff;
  color: var(--kb-ink);
  font-size: 1.05rem;
  line-height: 1;
}

body.page-gerador-de-kaomoji .ut-kb-opt:hover {
  border-color: #c9d6ea;
  background: #f5f8fd;
}

body.page-gerador-de-kaomoji .ut-kb-opt.is-active {
  border-color: var(--kb-blue);
  background: #eef4ff;
  box-shadow: 0 0 0 1.5px var(--kb-blue);
  color: var(--kb-navy);
}

.kb-preview-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 104px;
  margin: 0 0 14px;
  padding: 10px 52px;
  border: 1.5px dashed #b9cbe6;
  border-radius: 14px;
  background: #f5f9ff;
}

body.page-gerador-de-kaomoji .ut-kb-preview-box {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--kb-ink);
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  letter-spacing: 0.04em;
  text-align: center;
}

.kb-preview-sparks {
  position: absolute;
  left: 14px;
  top: 50%;
  color: #7b93c4;
  transform: translateY(-50%);
}

.kb-preview-dice {
  position: absolute;
  right: 10px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #7b93c4;
  cursor: pointer;
  transform: translateY(-50%);
}

.kb-preview-dice:hover {
  background: #e7effb;
  color: var(--kb-navy);
}

body.page-gerador-de-kaomoji .ut-kb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-gerador-de-kaomoji .ut-kb-actions .ut-btn {
  display: inline-flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  margin: 0;
  padding: 8px 14px;
  border: 1px solid var(--kb-line);
  border-radius: 12px;
  background: #fff;
  color: var(--kb-ink);
  font-size: 0.9rem;
  font-weight: 800;
}

body.page-gerador-de-kaomoji .ut-kb-actions .ut-btn svg {
  display: block;
  flex: none;
}

body.page-gerador-de-kaomoji .ut-kb-actions .ut-btn:hover {
  border-color: #c9d6ea;
  background: #f5f8fd;
}

body.page-gerador-de-kaomoji #ut-kb-copy {
  flex-grow: 1.4;
  border-color: var(--kb-navy);
  background: var(--kb-navy);
  color: #fff;
}

body.page-gerador-de-kaomoji #ut-kb-copy:hover {
  background: #172e6e;
}

body.page-gerador-de-kaomoji #ut-kb-copy.is-copied {
  border-color: #15803d;
  background: #15803d;
}

body.page-gerador-de-kaomoji #ut-kb-same-eyes.is-active {
  border-color: #bcd0f2;
  background: #f2f7ff;
  color: var(--kb-navy);
}

body.page-gerador-de-kaomoji .ut-kb-popular {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid #dde8f7;
  border-radius: 18px;
  background: #f3f8ff;
}

body.page-gerador-de-kaomoji .ut-kb-popular-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.article .post-content h2.ut-kb-popular-title,
body.page-gerador-de-kaomoji .ut-kb-popular-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  color: var(--kb-ink);
  font-size: 1.2rem !important;
  font-weight: 800;
  line-height: 1.2 !important;
}

.kb-flame {
  display: block;
  flex: none;
}

body.page-gerador-de-kaomoji .ut-kb-popular-sub {
  margin: 4px 0 0 32px;
  color: #64748b;
  font-size: 0.85rem;
}

.kb-more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  margin: 0;
  padding: 0 14px 0 16px;
  border: 1px solid var(--kb-line);
  border-radius: 12px;
  background: #fff;
  color: var(--kb-navy);
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
}

.kb-more::after {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13.2 5.2 19 12l-5.8 6.8v-4.3H5v-5h8.2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M13.2 5.2 19 12l-5.8 6.8v-4.3H5v-5h8.2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.kb-more:hover {
  border-color: #c9d6ea;
  background: #f5f8fd;
}

.kb-more[hidden] {
  display: none !important;
}

body.page-gerador-de-kaomoji .ut-kb-popular-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

body.page-gerador-de-kaomoji .ut-featured-btn,
body.page-gerador-de-kaomoji .ut-kb-popular-grid .ut-featured-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 112px;
  margin: 0;
  padding: 18px 8px 14px;
  border: 1px solid #edf1f6;
  border-radius: 14px;
  background: #fff !important;
  color: var(--kb-ink);
  box-shadow: 0 6px 14px rgba(30, 50, 90, 0.05);
  text-align: center;
  cursor: pointer;
}

body.page-gerador-de-kaomoji .ut-featured-btn:hover {
  border-color: #dbe4f0;
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(30, 50, 90, 0.08);
}

.kb-pop-face {
  color: #111;
  font-size: 1.2rem;
  line-height: 1.3;
  word-break: break-word;
}

.kb-pop-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #dce6f2;
  border-radius: 10px;
  background: #f1f6fc;
  color: #1e2b45;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.kb-pop-copy svg {
  display: block;
  flex: none;
}

.ut-featured-btn:hover .kb-pop-copy {
  border-color: #c9d8ea;
  background: #e6effa;
}

.kb-pop-done { display: none; }
.ut-featured-btn.is-copied .kb-pop-idle { display: none; }
.ut-featured-btn.is-copied .kb-pop-done { display: inline; }
.ut-featured-btn.is-copied .kb-pop-copy {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #166534;
}

.kb-notes {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.kb-how,
.kb-tip {
  position: relative;
  min-width: 0;
  padding: 18px;
  border-radius: 16px;
}

.kb-how {
  border: 1px solid #f6e3a8;
  background: #fff8e6;
}

.kb-tip {
  min-height: 150px;
  padding-right: min(42%, 220px);
  border: 1px solid #f7d5de;
  background: #fff1f4;
}

.article .kb-how ol,
.article .kb-tip p {
  margin: 0;
  padding: 0;
  color: #3f3a2a;
  font-size: 0.93rem;
  line-height: 1.45;
}

.kb-how ol {
  list-style: none;
  counter-reset: kb;
}

.article .kb-how li {
  position: relative;
  counter-increment: kb;
  margin: 0 0 9px;
  padding-left: 32px;
}

.kb-how li::before {
  content: counter(kb);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fde68a;
  color: #1a1d2b;
  font-size: 12px;
  font-weight: 800;
}

.article img.kb-tip-cat {
  position: absolute;
  right: -26px;
  bottom: -30px;
  display: block;
  width: min(230px, 46%);
  max-width: none;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

body.page-gerador-de-kaomoji .ut-recents {
  margin-top: 40px;
  padding: 14px;
  border: 1px solid var(--kb-line);
  border-radius: 16px;
  background: #f8fafc;
}

body.page-gerador-de-kaomoji .ut-recents .ut-kb-part-title {
  margin-bottom: 8px !important;
}

.ut-recents-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.page-gerador-de-kaomoji .ut-recent-chip {
  padding: 6px 10px;
  border: 1px solid var(--kb-line);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  cursor: pointer;
}

/* Wide screens: the stage breaks out of the 1200px post column like the mockup. */
@media (min-width: 1360px) {
  .kb-stage {
    --kb-stage-w: min(1780px, calc(100vw - 96px));
    width: var(--kb-stage-w);
    margin-left: calc((100% - var(--kb-stage-w)) / 2);
    grid-template-columns: clamp(250px, 16vw, 300px) minmax(0, 1fr);
    gap: 18px clamp(24px, 1.6vw, 32px);
  }
}

@media (max-width: 1260px) {
  .kb-builder {
    grid-template-columns: 1fr 1fr;
  }

  .kb-builder > .ut-kb-panel {
    grid-column: 1 / -1;
    order: -2;
  }

  .kb-builder > .kb-preview-card {
    order: -1;
  }

  body.page-gerador-de-kaomoji .ut-kb-popular-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .kb-stage {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .kb-title {
    margin-bottom: 8px;
    font-size: clamp(1.7rem, 6vw, 2.2rem);
  }

  .article .kb-lede {
    max-width: none;
    margin: 0;
    font-size: 0.95rem;
  }

  .article img.kb-cat,
  .kb-checks,
  .article img.kb-tip-cat {
    display: none;
  }

  .kb-main {
    padding: 10px;
    border-radius: 18px;
  }

  .kb-notes {
    grid-template-columns: 1fr;
  }

  .kb-tip {
    min-height: 0;
    padding-right: 18px;
  }

  body.page-gerador-de-kaomoji .ut-recents {
    margin-top: 14px;
  }
}

@media (max-width: 640px) {
  .kb-builder,
  body.page-gerador-de-kaomoji .ut-kb-popular-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.page-gerador-de-kaomoji .ut-kb-panel,
  body.page-gerador-de-kaomoji .ut-kb-part-block {
    padding: 12px;
  }

  body.page-gerador-de-kaomoji .ut-kb-opt {
    min-width: 44px;
    height: 42px;
  }

  body.page-gerador-de-kaomoji .ut-kb-popular {
    padding: 12px;
  }

  body.page-gerador-de-kaomoji .ut-kb-popular-sub {
    margin-left: 0;
  }
}

@media (max-width: 420px) {
  .kb-builder {
    grid-template-columns: 1fr;
  }
}

html[data-theme="dark"] body.page-gerador-de-kaomoji {
  --kb-ink: #f1f5f9;
  --kb-card: #1e293b;
  --kb-line: #334155;
  --kb-soft: #111827;
  --kb-blue: #3b82f6;
  --kb-navy: #1d4ed8;
}

html[data-theme="dark"] .kb-main {
  border-color: #1f2a3d;
  background: #0f172a;
}

html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-kb-panel,
html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-kb-part-block,
html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-kb-opt,
html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-kb-mood:not(.is-active),
html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-kb-actions .ut-btn:not(#ut-kb-copy),
html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-featured-btn,
html[data-theme="dark"] .kb-more,
html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-recent-chip {
  border-color: #334155;
  background: #1e293b !important;
  color: #f1f5f9;
}

html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-kb-opt.is-active {
  background: #1e3a8a !important;
  color: #fff;
}

html[data-theme="dark"] .kb-pop-face {
  color: #f8fafc;
}

html[data-theme="dark"] .kb-pop-copy {
  border-color: #334155;
  background: #243044;
  color: #e2e8f0;
}

html[data-theme="dark"] .kb-checks { background: #3f3516; }
html[data-theme="dark"] .article .kb-checks li,
html[data-theme="dark"] .article .kb-lede { color: #f8efd2; }
html[data-theme="dark"] .kb-how { border-color: #5a4a1a; background: #3a3214; }
html[data-theme="dark"] .kb-tip { border-color: #5a2f3e; background: #3b2430; }
html[data-theme="dark"] .article .kb-how ol,
html[data-theme="dark"] .article .kb-tip p { color: #f8efd2; }
html[data-theme="dark"] .kb-preview-wrap,
html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-kb-popular {
  border-color: #27416a;
  background: #152033;
  color: #f8fafc;
}
html[data-theme="dark"] body.page-gerador-de-kaomoji .ut-recents {
  border-color: #334155;
  background: #111827;
}
