:root {
  --ink: #132c33;
  --muted: #5f6f73;
  --line: #d7e1df;
  --paper: #fbfdfc;
  --surface: #ffffff;
  --teal: #0f6370;
  --teal-dark: #0a424a;
  --coral: #d46955;
  --gold: #c99738;
  --blue-soft: #e8f4f3;
  --coral-soft: #fff0eb;
  --shadow: 0 18px 50px rgba(19, 44, 51, 0.13);
  --radius: 8px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(212, 105, 85, 0.45);
  outline-offset: 3px;
}

.hero {
  position: relative;
  min-height: 82dvh;
  overflow: hidden;
  display: grid;
  align-items: end;
  isolation: isolate;
}

body.flow-active .hero {
  display: none;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero__image {
  object-fit: cover;
  object-position: center;
  z-index: -2;
}

.hero__shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(251, 253, 252, 0.96) 0%, rgba(251, 253, 252, 0.68) 45%, rgba(251, 253, 252, 0.08) 100%),
    linear-gradient(0deg, rgba(251, 253, 252, 0.92) 0%, rgba(251, 253, 252, 0) 28%);
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  height: 64px;
  padding: 0;
  border-bottom: 1px solid rgba(215, 225, 223, 0.82);
  background-color: #fbfdfc;
  background-image: url("/assets/topbar-bg.png?v=1782601953");
  background-position: left center;
  background-repeat: no-repeat;
  background-size: auto 64px;
  backdrop-filter: blur(12px);
}

.brand,
.topbar__share,
.topbar__user {
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 64px;
  width: min(330px, calc(100vw - 72px));
  padding-left: 0;
}

.brand__text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.topbar__actions {
  width: 256px;
  height: 64px;
  position: relative;
  background: linear-gradient(270deg, #ffffff, transparent);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
}

.topbar__share,
.topbar__user {
  width: 52px;
  height: 64px;
  border: 0;
  margin: 0;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
  background: transparent;
  text-align: right;
  cursor: pointer;
}

.topbar__share svg,
.topbar__user svg {
  width: 24px;
  height: 24px;
  margin: 0;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.topbar__user {
  color: #8b989b;
}

.topbar__user.is-logged {
  color: var(--coral);
}

.topbar__share:hover {
  color: var(--teal);
}

.player-top-play {
  color: var(--teal);
  background: #ffffff;
  border: 1px solid var(--teal);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  margin-right: 4px;
}
.player-top-play svg {
  width: 20px;
  height: 20px;
}
.player-top-play:hover {
  background: var(--teal);
  color: #ffffff;
}

.player-top-play .player-icon-pause {
  display: none;
}
.player-top-play.is-playing .player-icon-play {
  display: none;
}
.player-top-play.is-playing .player-icon-pause {
  display: block;
}

.user-menu {
  position: fixed;
  top: 58px;
  right: 58px;
  z-index: 9999;
  min-width: 210px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  text-align: left;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(19, 44, 51, 0.18);
}

.user-menu strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
  font-weight: 850;
  text-align: left;
}

.user-menu button:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.auth-dialog,
.coupon-dialog,
.profile-dialog,
.task-recover-dialog {
  width: min(430px, calc(100% - 28px));
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.auth-dialog::backdrop,
.coupon-dialog::backdrop,
.profile-dialog::backdrop,
.task-recover-dialog::backdrop {
  background: rgba(19, 44, 51, 0.36);
}

.auth-card,
.coupon-card,
.profile-card,
.task-recover-card {
  position: relative;
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h2,
.coupon-card h2,
.profile-card h2,
.task-recover-card h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 5vw, 2.1rem);
}

.auth-card__copy {
  margin: 0;
  color: var(--muted);
}

.task-recover-dialog {
  width: min(680px, calc(100% - 28px));
}

.inline-link {
  width: fit-content;
  border: 0;
  padding: 0;
  color: var(--blue);
  background: transparent;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.task-recover-list {
  display: grid;
  gap: 10px;
  max-height: min(520px, 58dvh);
  overflow-y: auto;
}

.task-recover-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  color: var(--ink);
  background: #fbfdfd;
}

.task-recover-item:hover {
  border-color: var(--blue);
}

.task-recover-item.is-deleting {
  border-color: #172629;
  background: #172629;
  cursor: wait;
}

.task-recover-item.is-deleting .task-recover-main {
  pointer-events: none;
  opacity: 0.45;
}

.task-recover-item.is-deleting strong,
.task-recover-item.is-deleting span,
.task-recover-item.is-deleting em,
.task-recover-item.is-deleting small {
  color: #ffffff;
}

.task-recover-item.is-deleting .task-delete {
  color: #ffffff;
  background: #40565a;
  border-color: #40565a;
  cursor: wait;
}

.task-recover-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  border: 0;
  padding: 4px;
  color: inherit;
  background: transparent;
  text-align: left;
}

.task-recover-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.task-recover-action {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--teal-dark);
  background: #ffffff;
  cursor: pointer;
  font-weight: 850;
}

.task-recover-action:hover,
.task-recover-action:focus-visible {
  border-color: var(--teal);
  background: var(--blue-soft);
}

.task-recover-item strong {
  color: var(--blue);
}

.task-recover-status {
  display: inline-block;
  width: fit-content;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.task-recover-item span,
.task-recover-item em,
.task-recover-item small {
  color: var(--muted);
  font-style: normal;
  line-height: 1.35;
}

.task-delete {
  grid-column: 2;
  grid-row: 1;
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: #a43b2f;
  background: #ffffff;
  cursor: pointer;
}

.task-delete svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-delete.is-armed {
  color: #ffffff;
  background: #a43b2f;
  border-color: #a43b2f;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9998;
  transform: translate(-50%, 10px);
  border: 1px solid rgba(19, 44, 51, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
  color: #ffffff;
  background: #172629;
  box-shadow: 0 14px 34px rgba(19, 44, 51, 0.22);
  font-size: 0.88rem;
  font-weight: 850;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.use-current-lyrics {
  width: fit-content;
  margin-top: 14px;
}

.coupon-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: -4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 900;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  color: var(--teal-dark);
  background: #ffffff;
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.coupon-list {
  display: grid;
  gap: 8px;
  max-height: min(280px, 36dvh);
  overflow-y: auto;
}

.coupon-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: #fbfdfd;
}

.coupon-item strong {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 0.92rem;
}

.coupon-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.auth-card__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 1.7rem;
  line-height: 1;
}

.auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.auth-arrow {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 7px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: var(--teal);
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(7, 112, 112, 0.18);
  transition: transform 0.16s ease, opacity 0.16s ease, background 0.16s ease;
}

.auth-arrow svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.6;
}

.auth-arrow:hover:not(:disabled),
.auth-arrow:focus-visible {
  transform: translateY(-1px);
  background: #0b7979;
}

.auth-arrow:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}

.auth-arrow--back {
  color: var(--teal);
  background: #e8f4f3;
  box-shadow: none;
}

.auth-arrow--back:hover:not(:disabled),
.auth-arrow--back:focus-visible {
  color: #ffffff;
}

.password-rules {
  display: grid;
  gap: 4px;
  margin: -2px 0 0;
  padding: 0;
  list-style: none;
  color: #b84135;
  font-size: 0.86rem;
  font-weight: 800;
}

.password-rules li::before {
  content: "• ";
}

.password-rules li.is-ok {
  color: #0d7a48;
}

.auth-help {
  position: absolute;
  right: 52px;
  top: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid #b8c9cc;
  border-radius: 50%;
  color: #0055aa;
  background: #fff;
  font-weight: 800;
  cursor: pointer;
}

.auth-help-dialog,
.player-edit-dialog {
  border: 0;
  padding: 0;
  width: min(92vw, 480px);
  border-radius: 8px;
}

.auth-help-dialog::backdrop {
  background: rgba(8, 24, 28, 0.42);
}

.button--danger {
  border-color: #d8665a;
  color: #9b3128;
  background: #fff5f3;
}

.password-wrap {
  position: relative;
  display: block;
}

.password-wrap input {
  width: 100%;
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.password-toggle:hover,
.password-toggle.is-visible {
  color: var(--coral);
}

.hero__content {
  width: min(660px, calc(100% - 36px));
  margin: 64px clamp(18px, 5vw, 72px) clamp(54px, 10vh, 112px);
}

main {
  background: var(--paper);
}

body.flow-active main {
  padding-top: 64px;
}

#criacao {
  scroll-margin-top: 76px;
}

.app-shell {
  width: min(860px, calc(100% - 32px));
  margin: 24px auto 80px;
  display: block;
}

body.flow-active .app-shell {
  margin-top: 18px;
}

.compositor {
  min-height: calc(100dvh - 100px);
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.progress {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 26px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 18px;
  max-width: 11ch;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(1.65rem, 4vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero__copy {
  max-width: 590px;
  color: #314a50;
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-player-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

.hero-player-entry > span {
  color: #236ca8;
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-player-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #236ca8;
  border-radius: var(--radius);
  padding: 0 16px;
  color: #155a91;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-weight: 850;
}

.hero-player-button:hover {
  color: #ffffff;
  background: #155a91;
}

.hero-player-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.recover-task-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(0, 85, 170, 0.28);
  border-radius: 8px;
  padding: 9px 12px;
  color: #0055aa;
  background: #ffffff;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 1px 0 rgba(0, 85, 170, 0.08);
}

.recover-task-button:hover,
.recover-task-button:focus-visible {
  border-color: #0055aa;
  background: var(--blue-soft);
}

.recover-task-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task-start-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.new-task-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(21, 109, 186, 0.28);
  border-radius: 8px;
  padding: 9px 12px;
  color: #156dba;
  background: #ffffff;
  cursor: pointer;
  font-weight: 850;
  box-shadow: 0 1px 0 rgba(21, 109, 186, 0.08);
}

.new-task-button:hover,
.new-task-button:focus-visible {
  border-color: #156dba;
  background: #eaf4fd;
}

.new-task-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.player-view {
  min-height: 100dvh;
  padding: 84px 16px 190px;
  background: var(--paper);
}

.player-view__header,
.player-library,
.player-dock {
  width: min(760px, 100%);
  margin-inline: auto;
}

.player-library + .player-library {
  margin-top: 24px;
}

.player-library h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.player-view__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.player-view__header h1 {
  max-width: none;
  margin: 0;
  font-size: 2rem;
  line-height: 1.1;
}

.player-close svg,
.player-controls svg,
.player-track svg,
.player-track-remove svg,
.player-track-edit svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.player-playlist {
  display: grid;
  gap: 6px;
}

.player-track {
  scroll-margin-block: 84px 190px;
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px 12px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  cursor: pointer;
}

.player-track-wrap {
  position: relative;
}

.player-track-wrap.is-deleting {
  opacity: 0.55;
  filter: grayscale(0.4);
  pointer-events: none;
}

.player-track-wrap .player-track {
  padding-right: 58px;
}

.player-track-remove,
.player-track-edit {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.player-track-remove {
  color: var(--muted);
}

.player-track-edit {
  color: #0055aa;
}

.player-track-remove:hover {
  color: #9f2d1f;
  background: var(--coral-soft);
}

.player-track-edit:hover {
  background: var(--blue-soft);
}

.player-track-remove.is-armed {
  color: #fff;
  background: #c84436;
}

.player-track:hover,
.player-track.is-active {
  border-color: var(--teal);
  background: var(--blue-soft);
}

.player-track.is-pulsing {
  animation: player-track-pulse 2s ease-in-out;
}

@keyframes player-track-pulse {
  0%,
  100% {
    border-color: var(--teal);
    background: var(--blue-soft);
  }

  50% {
    border-color: var(--coral);
    background: #ffd6c8;
    box-shadow: 0 0 0 4px rgba(212, 105, 85, 0.16);
  }
}

@media (prefers-reduced-motion: reduce) {
  .player-track.is-pulsing {
    animation: none;
    border-color: var(--coral);
    background: var(--coral-soft);
  }
}

.player-track__number {
  color: var(--teal);
  font-size: 1.05rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.player-track__copy {
  min-width: 0;
  display: grid;
}

.player-track__copy strong,
.player-track__copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-track__copy small {
  color: var(--muted);
}

.player-track__copy .player-track__author {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 500;
}

.player-empty {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px 18px;
  color: var(--muted);
  text-align: center;
  background: var(--surface);
}

.player-dock {
  position: fixed;
  z-index: 15;
  right: 16px;
  bottom: max(12px, env(safe-area-inset-bottom));
  left: 16px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.player-now {
  min-width: 0;
  display: grid;
  text-align: center;
}

.player-now strong,
.player-now span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-now span {
  color: var(--muted);
  font-size: 0.78rem;
}

.player-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.player-controls button {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  color: var(--teal-dark);
  background: #ffffff;
  cursor: pointer;
}

.player-controls .player-play {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.player-controls .player-play svg {
  fill: none;
}

.player-play .player-icon-pause {
  display: none;
}

.player-play.is-playing .player-icon-play {
  display: none;
}

.player-play.is-playing .player-icon-pause {
  display: block;
}

.player-controls button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.player-progress {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.player-progress input {
  width: 100%;
  accent-color: var(--teal);
  cursor: pointer;
}

body.player-active .hero,
body.player-active .app-shell {
  display: none;
}

.compositor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.chat-launcher {
  position: fixed;
  z-index: 70;
  right: 16px;
  bottom: max(96px, calc(env(safe-area-inset-bottom) + 76px));
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 1px solid #0e6570;
  border-radius: 50%;
  background: #0f707b;
  color: #fff;
  box-shadow: 0 8px 24px rgba(15, 64, 70, 0.24);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.chat-launcher:active {
  cursor: grabbing;
}

.chat-launcher:focus-visible {
  outline: 3px solid rgba(212, 105, 85, 0.45);
  outline-offset: 3px;
}

.chat-launcher svg,
.chat-panel__tools svg,
.chat-form button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-launcher > span {
  position: absolute;
  top: -4px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 0 4px;
  background: var(--coral);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
}

.chat-panel {
  position: fixed;
  z-index: 69;
  top: 70px;
  right: 12px;
  bottom: 12px;
  width: min(390px, calc(100vw - 24px));
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid #bfd2d3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(23, 55, 60, 0.22);
}

.chat-panel[hidden] {
  display: none;
}

.chat-panel__header {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7fbfb;
}

.chat-panel__header strong,
.chat-panel__header span {
  display: block;
}

.chat-panel__header span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.78rem;
}

.chat-panel__tools {
  display: flex;
  gap: 6px;
}

.chat-panel__tools button,
.chat-form button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid #c5d7d7;
  border-radius: 6px;
  background: #fff;
  color: #174e55;
}

.chat-panel__notice {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.76rem;
}

.chat-panel__notice button {
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: #0055aa;
  font-weight: 800;
}

.chat-messages {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  padding: 14px 12px;
  background: #fbfdfd;
}

.chat-empty {
  margin: auto;
  color: var(--muted);
  text-align: center;
}

.chat-message {
  width: fit-content;
  max-width: 84%;
  border: 1px solid #d8e4e4;
  border-radius: 8px 8px 8px 2px;
  padding: 8px 10px;
  background: #fff;
}

.chat-message.is-user {
  align-self: flex-end;
  border-color: #b9d6d8;
  border-radius: 8px 8px 2px 8px;
  background: #e5f2f3;
}

.chat-message.is-agent {
  border-color: #f0c5ba;
  background: #fff4f0;
}

.chat-message > span,
.chat-message time {
  display: block;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
}

.chat-message p {
  margin: 3px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message time {
  text-align: right;
}

.chat-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.chat-body a {
  color: #0f707b;
  font-weight: 800;
  text-decoration: underline;
  word-break: break-all;
}

/* Avatar do bot (Tom) no balão */
.chat-message.is-bot {
  position: relative;
  padding-top: 18px;
  border-color: #b8d4e6;
  background: #f4f9fd;
}

.chat-message.is-agent {
  position: relative;
  padding-top: 18px;
}

.chat-avatar {
  position: absolute;
  top: -16px;
  left: -16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.chat-avatar svg {
  width: 28px;
  height: 28px;
}

/* Avatar humano (futuro — atendentes no Panel) */
.chat-avatar--human {
  background: #fff4f0;
  box-shadow: 0 1px 4px rgba(212,105,85,0.15);
}

.chat-label {
  display: block;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
}

.chat-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.chat-image {
  display: block;
  max-width: 100%;
  border-radius: 8px;
  margin-bottom: 8px;
}

.chat-pix-card {
  background: #f0fdfa;
  border: 2px solid #0f707b;
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
}

.chat-pix-card .chat-image {
  max-width: 200px;
  margin: 0 auto 8px auto;
}

.chat-pix-card .chat-body {
  text-align: center;
  font-size: 0.85rem;
}

.chat-pix-card .chat-actions {
  justify-content: center;
}

.chat-pix-card .chat-action--clipboard {
  background: #0f707b;
  color: #fff;
  border-color: #0f707b;
}

.chat-action {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 12px;
  border: 1.5px solid #0f707b;
  border-radius: 20px;
  background: #fff;
  color: #0f6370;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s, color 0.15s;
}

.chat-action:hover,
.chat-action:focus-visible {
  background: #0f707b;
  color: #fff;
  outline: none;
}

.chat-load-error {
  margin: auto;
  text-align: center;
}

.chat-action--clipboard {
  background: #156DBA;
  color: #fff;
  border-color: #156DBA;
}

.chat-action--clipboard:hover,
.chat-action--clipboard:focus-visible {
  background: #0f5a9e;
  color: #fff;
}

.chat-load-error button {
  border: 1px solid #0f707b;
  border-radius: 6px;
  padding: 8px 12px;
  background: #fff;
  color: #0f6370;
  font-weight: 800;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 8px;
  padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.chat-form textarea {
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  border: 1px solid #bfcfd0;
  border-radius: 6px;
  padding: 10px;
  font: inherit;
}

.chat-form button {
  border-color: #0f707b;
  background: #0f707b;
  color: #fff;
}

.chat-form button:disabled,
.chat-panel__notice button:disabled {
  opacity: 0.55;
}

.button {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink);
  background: transparent;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

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

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.button--primary {
  background: var(--teal);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 99, 112, 0.22);
}

.button--primary:hover {
  background: var(--teal-dark);
}

.button--secondary {
  border: 1px solid var(--teal);
  background: var(--blue-soft);
  color: var(--teal-dark);
}

.button--ghost,
.button--ghost-dark {
  border: 1px solid rgba(19, 44, 51, 0.28);
  background: rgba(255, 255, 255, 0.62);
}

.button--ghost-dark {
  background: #ffffff;
}

.order-card__label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.progress__bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9efee;
}

#progress-fill {
  display: block;
  width: 7%;
  height: 100%;
  border-radius: inherit;
  background: var(--coral);
  transition: width 260ms ease;
}

#progress-label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.step {
  display: none;
  min-height: calc(100dvh - 340px);
  animation: step-in 220ms ease both;
}

.step.is-active {
  display: block;
}

.step__copy {
  max-width: 680px;
  color: var(--muted);
}

.step__tip {
  margin-top: 12px;
  font-size: 13px;
}

.step__tip a {
  color: #0055aa;
  text-decoration: underline;
  cursor: pointer;
}

.option-grid,
.chip-grid,
.field-grid {
  display: grid;
  gap: 12px;
}

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

.option-grid--compact {
  margin-top: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-card,
.chip-grid button,
.segmented button {
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.choice-card {
  padding: 18px;
  text-align: left;
}

.choice-card--input {
  font-family: inherit;
  font-size: inherit;
  font-weight: 850;
  width: 100%;
  outline: none;
  box-sizing: border-box;
}

.choice-card--input::placeholder {
  color: var(--ink-light, #888);
  font-weight: 500;
}

.choice-card--input:focus {
  border-color: var(--teal);
  background: var(--blue-soft);
}

.choice-card--input.is-invalid {
  border-color: var(--danger, #dc3545);
  background: #fff5f5;
}

.choice-card:hover,
.chip-grid button:hover,
.segmented button:hover {
  border-color: var(--teal);
  background: var(--blue-soft);
}

.choice-card.is-selected,
.chip-grid button.is-selected,
.segmented button.is-selected {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.chip-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.chip-grid--wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.field-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--ink);
  font-weight: 850;
}

.field small {
  color: var(--muted);
  line-height: 1.35;
}

.field.is-invalid input {
  border-color: #b7372a;
  box-shadow: 0 0 0 3px rgba(183, 55, 42, 0.12);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 14px;
  min-height: 50px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #8a999b;
}

.field-note {
  margin-top: 10px;
  color: var(--muted);
}

.provider-note {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.provider-note[data-provider="deepseek"] {
  color: var(--teal-dark);
}

.provider-note[data-provider="local-simulated"],
.provider-note[data-provider="browser-fallback"] {
  color: var(--coral);
}

.prompt-panel,
.generation-box,
.lyrics-card,
.lyrics-edit-panel,
.revision-panel,
.sample-player,
.composer-access-card,
.waiting-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.prompt-panel {
  margin-bottom: 18px;
  padding: 16px;
  color: var(--teal-dark);
  background: var(--blue-soft);
  font-weight: 750;
}

.prompt-panel ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

.generation-box,
.waiting-card {
  min-height: 238px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid #d9e7e5;
  border-top-color: var(--coral);
  animation: spin 780ms linear infinite;
}

.lyrics-card {
  max-height: 430px;
  overflow: auto;
  background: #fffaf7;
}

.lyrics-card pre {
  margin: 0;
  white-space: pre-wrap;
  color: #21373c;
  padding: 20px;
  font: 600 1rem/1.65 ui-serif, Georgia, "Times New Roman", serif;
}

.lyrics-edit-panel,
.revision-panel {
  margin-top: 14px;
  padding: 16px;
  background: var(--coral-soft);
}

.lyrics-edit-panel textarea {
  min-height: 320px;
  font-family: ui-serif, Georgia, "Times New Roman", serif;
  line-height: 1.6;
}

.lyrics-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}

.music-progress {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

.music-progress__bar {
  position: relative;
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9efee;
}

.music-progress__bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  transition: width 260ms ease;
}

.music-progress__bar strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.music-progress__row {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0 16px;
  color: var(--muted);
  font-weight: 850;
  background: #ffffff;
}

.music-progress__row span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #b8c6c8;
}

.music-progress__row.is-done {
  color: var(--teal-dark);
  background: var(--blue-soft);
}

.music-progress__row.is-done span {
  border-color: var(--teal);
  background: var(--teal);
}

.music-progress__row.is-active {
  color: var(--ink);
  border-color: var(--coral);
}

.music-progress__row.is-active span {
  border-color: var(--coral);
  box-shadow: 0 0 0 6px rgba(212, 105, 85, 0.15);
}

.music-error {
  margin-top: 18px;
  border: 1px solid #e7b5aa;
  border-radius: var(--radius);
  padding: 16px;
  color: #8f2d20;
  background: #fff0eb;
}

.music-error.is-status {
  border-color: var(--line);
  color: var(--teal-dark);
  background: var(--blue-soft);
}

.music-error p {
  margin: 6px 0 14px;
  color: #8f2d20;
}

.music-error.is-status p {
  margin-bottom: 0;
  color: var(--teal-dark);
}

.sample-player {
  margin-top: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
}

.sample-player span {
  display: block;
  color: var(--muted);
}

.sample-player.is-used {
  background: #f5f2ee;
}

.composer-access-card {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.composer-access-status {
  display: grid;
  gap: 6px;
  border-radius: var(--radius);
  padding: 14px;
  color: var(--teal-dark);
  background: var(--blue-soft);
}

.composer-access-status strong {
  color: var(--ink);
  font-size: 1rem;
}

.composer-access-status span {
  color: var(--muted);
  line-height: 1.45;
}

.composer-access-status.is-ready {
  color: #167047;
  background: #e8f7ee;
}

.composer-access-status.is-pending {
  color: #8f5a17;
  background: #fff6df;
}

.composer-access-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button--google {
  border-color: var(--line);
  color: var(--ink);
  background: #ffffff;
}

.button--google svg {
  width: 18px;
  height: 18px;
}

.button--google:disabled {
  opacity: 0.62;
  cursor: not-allowed;
}

.payment-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.coupon-panel {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #fbfdfd;
}

.checkout-total {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  background: #ffffff;
}

.checkout-total__row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.checkout-total span {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.checkout-total strong {
  color: var(--ink);
  font-size: clamp(1.04rem, 4vw, 1.3rem);
  line-height: 1.1;
}

.checkout-total__discount {
  grid-template-columns: 92px minmax(0, max-content) minmax(0, max-content);
}

.checkout-total__discount .button {
  width: fit-content;
  min-height: 36px;
  padding: 8px 13px;
}

.checkout-total__pay {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.checkout-total__pay strong {
  color: var(--coral);
}

.coupon-panel strong {
  color: var(--teal-dark);
  font-size: 0.92rem;
}

.coupon-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.coupon-panel .button {
  width: fit-content;
}

#qr-canvas {
  width: 220px;
  height: 220px;
  border: 10px solid #ffffff;
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px var(--line);
  background: #ffffff;
}

.payment-copy {
  display: grid;
  gap: 12px;
}

.payment-copy code {
  display: block;
  min-height: 90px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  overflow-wrap: anywhere;
  color: var(--teal-dark);
  background: var(--blue-soft);
  font-size: 0.9rem;
}

.pix-expiration {
  display: block;
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--teal);
  font-weight: 500;
}

.status-rail {
  width: min(520px, 100%);
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 20px;
  padding-top: 18px;
}

.status-rail span {
  position: relative;
  min-height: 38px;
  display: grid;
  place-items: end center;
  border: 0;
  border-radius: 0;
  padding-top: 12px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 850;
  background: transparent;
}

.status-rail span::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 13px;
  height: 13px;
  border: 2px solid #b8c6c8;
  border-radius: 50%;
  background: #ffffff;
  transform: translateX(-50%);
}

.status-rail span::after {
  content: "";
  position: absolute;
  top: 7px;
  left: calc(50% + 8px);
  width: calc(100% - 16px);
  height: 2px;
  background: #d7e1df;
}

.status-rail span:last-child::after {
  display: none;
}

.status-rail .is-done {
  color: var(--teal-dark);
}

.status-rail .is-done::before {
  border-color: var(--teal);
  background: var(--teal);
}

.status-rail .is-done::after {
  background: var(--teal);
}

.status-rail .is-active {
  color: var(--coral);
}

.status-rail .is-active::before {
  border-color: var(--coral);
  box-shadow: 0 0 0 6px rgba(212, 105, 85, 0.14);
}

.download-ready {
  margin-top: 8px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.delivery-hints {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.delivery-hints span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.delivery-hints svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.error-message {
  min-height: 24px;
  margin: 14px 0 0;
  color: #9f2d1f;
  font-weight: 800;
}

.compositor-actions {
  justify-content: space-between;
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 940px) {
  .hero {
    min-height: 78dvh;
  }

  .hero__shade {
    background:
      linear-gradient(0deg, rgba(251, 253, 252, 0.96) 0%, rgba(251, 253, 252, 0.62) 58%, rgba(251, 253, 252, 0.2) 100%);
  }

  .hero__image {
    object-position: 42% center;
  }

}

@media (max-width: 720px) {
  .topbar__share {
    display: none;
  }

  .chat-panel {
    top: 58px;
    right: 6px;
    bottom: 6px;
    left: 6px;
    width: auto;
  }

  .hero__content {
    margin: 64px 20px 34px;
  }

  h1 {
    max-width: 10ch;
  }

  .option-grid,
  .option-grid--compact,
  .chip-grid,
  .chip-grid--wide,
  .field-grid,
  .segmented,
  .payment-layout,
  .checkout-total {
    grid-template-columns: 1fr;
  }

  .checkout-total__row,
  .checkout-total__discount {
    grid-template-columns: minmax(76px, 0.35fr) minmax(0, max-content) minmax(0, max-content);
  }

  .sample-player {
    align-items: stretch;
    flex-direction: column;
  }

  #qr-canvas {
    justify-self: center;
  }

  .compositor-actions .button {
    flex: 1 1 140px;
  }

  .hero-player-entry {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .player-view {
    padding-inline: 10px;
  }

  .player-dock {
    right: 8px;
    left: 8px;
    padding-inline: 10px;
  }

  .player-controls {
    justify-content: space-between;
  }
}

/* Notification dialog */
.notif-dialog {
  border: none;
  border-radius: 12px;
  padding: 0;
  max-width: min(420px, calc(100vw - 32px));
  background: transparent;
}

.notif-dialog::backdrop {
  background: rgba(15, 34, 38, 0.55);
}

.notif-card {
  border-radius: 12px;
  padding: 28px;
  background: #fff;
  text-align: center;
}

.notif-card h2 {
  margin: 6px 0 16px;
  font-size: 22px;
  color: #0f6370;
}

.notif-card ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.notif-card li {
  padding: 8px 12px;
  border-radius: 8px;
  background: #edf6f6;
  color: #1b4a4f;
  font-size: 15px;
  text-align: left;
}

.notif-card .field-note {
  font-size: 12px;
  color: #657c80;
}

/* Compositor title */
.compositor > h3 {
  margin: 0;
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  color: #0f6370;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 16px 4px;
}

/* User menu above chat */
.user-menu {
  z-index: 1001;
}

.chat-launcher,
.chat-panel {
  z-index: 999;
}

/* Satisfaction survey (Bloco 4a) */
.chat-satisfaction {
  padding: 14px 12px max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fff;
  text-align: center;
}

.chat-satisfaction__prompt,
.chat-satisfaction__thanks {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.chat-satisfaction__emojis {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-satisfaction__binary {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.chat-satisfaction__binary button {
  min-width: 72px;
}

.chat-satisfaction__emoji {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 0;
  background: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.chat-satisfaction__emoji:hover,
.chat-satisfaction__emoji:focus-visible {
  transform: scale(1.15);
  border-color: var(--teal);
  background: var(--blue-soft);
  outline: none;
}

.chat-satisfaction__emoji:active {
  transform: scale(0.95);
}

.chat-satisfaction__new {
  margin-top: 12px;
}

.chat-typing {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 4px 0;
}

.chat-typing__dots {
  display: flex;
  gap: 4px;
}

.chat-typing__dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  animation: chat-typing-bounce 1.2s infinite ease-in-out both;
}

.chat-typing__dots span:nth-child(1) { animation-delay: -0.32s; }
.chat-typing__dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes chat-typing-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

.chat-typing__label {
  font-size: 0.82rem;
  color: var(--muted);
}

/* PWA Install Dialog */
.install-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 200ms ease;
}

.install-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 20px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.25);
  animation: scaleIn 220ms ease;
}

.install-dialog-icon {
  margin-bottom: 12px;
}

.install-dialog h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: #132c33;
}

.install-dialog p {
  margin: 0 0 20px;
  font-size: 0.9rem;
  color: #5f6f73;
  line-height: 1.5;
}

.install-dialog-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.install-dialog-install {
  width: 100%;
  min-height: 48px;
  border: none;
  border-radius: 10px;
  background: #0f6370;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms;
}

.install-dialog-install:hover {
  background: #0a424a;
}

.install-dialog-skip {
  font-size: 0.82rem;
  color: #0f6370;
  text-decoration: none;
  padding: 8px;
}

.install-dialog-skip:hover {
  text-decoration: underline;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}


.user-menu__link {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 9px 12px;
  color: var(--ink);
  background: #ffffff;
  cursor: pointer;
  font-weight: 850;
  text-align: left;
  text-decoration: none;
}
.user-menu__link:hover {
  border-color: var(--coral);
  color: var(--coral);
}

.cookie-banner {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 9800;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 36px rgba(19, 44, 51, 0.18);
}
.cookie-banner[hidden] {
  display: none;
}
.cookie-banner p {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
}
.cookie-banner a {
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
  white-space: nowrap;
}
.cookie-banner a:hover {
  text-decoration: underline;
}
.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.cookie-banner__accept {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--teal);
  cursor: pointer;
  font-weight: 900;
}
.cookie-banner__secondary {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--ink-soft);
  background: #ffffff;
  cursor: pointer;
  font-weight: 850;
}

.legal-page {
  min-height: 100dvh;
  color: var(--ink);
  background: var(--paper);
}
.legal-shell {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}
.legal-shell h1 {
  margin: 8px 0 18px;
  font-size: clamp(2rem, 7vw, 3rem);
}
.legal-shell h2 {
  margin: 28px 0 8px;
  font-size: 1.2rem;
}
.legal-shell p {
  color: var(--muted);
  line-height: 1.65;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--blue);
  font-weight: 850;
  text-decoration: none;
}
.legal-back:hover {
  text-decoration: underline;
}

@media (max-width: 620px) {
  .cookie-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .cookie-banner__actions {
    width: 100%;
  }
  .cookie-banner a,
  .cookie-banner__accept,
  .cookie-banner__secondary {
    width: 100%;
    text-align: center;
  }
  .cookie-banner__actions > button {
    flex: 1;
  }
}

/* Terms dialog */
.terms-dialog {
  width: min(720px, calc(100% - 28px));
  height: min(80vh, 800px);
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.terms-dialog::backdrop {
  background: rgba(19, 44, 51, 0.5);
}

.terms-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.terms-card > .auth-card__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

.terms-card h1 {
  max-width: inherit;
  font-size: clamp(1.15rem, 3.5vw, 1.55rem);
  margin: 0;
  padding: 0px 28px 0;
  line-height: 1.3;
}

.terms-card__toplogo {
  display: block;
  max-width: 50dvh;
  height: auto;
  margin: 8px 28px 0;
}

.terms-card > .field-note {
  margin: 0 0 6px;
  padding: 0 28px;
  color: var(--muted);
  font-size: 0.82rem;
}

.terms-card__body {
  flex: 1;
  overflow-y: auto;
  padding: 0 28px 28px;
}

.terms-card__body section {
  margin-top: 18px;
}

.terms-card__body h2 {
  font-size: 1rem;
  margin: 0 0 8px;
  color: var(--ink);
}

.terms-card__body h3 {
  font-size: 0.92rem;
  margin: 14px 0 6px;
  color: var(--ink);
}

.terms-card__body p {
  margin: 0 0 10px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
}

.terms-card__body ul {
  margin: 6px 0 12px;
  padding-left: 20px;
}

.terms-card__body li {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
  margin-bottom: 4px;
}

.terms-card__body a {
  color: var(--blue);
  text-decoration: underline;
}

.terms-reminder {
  color: #d32f2f;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 0 10px;
  padding: 8px 12px;
  background: #fff0f0;
  border-radius: 6px;
}

.terms-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0 6px;
  margin-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.terms-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  cursor: pointer;
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--line);
  padding: 8px 16px;
  text-align: center;
}

.app-footer__terms {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 4px 8px;
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
  text-decoration: none;
  font-family: inherit;
}

.app-footer__terms:hover {
  color: var(--blue);
}

.app-footer__logo {
  height: 20px;
  width: auto;
  display: block;
}
