.pp-shell {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.pp-header {
  min-height: 104px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0 10px;
}

.pp-brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  flex: 1 1 auto;
}

.brand-image {
  height: clamp(58px, 9.5vw, 128px);
  width: auto;
  max-width: min(100%, 680px);
  object-fit: contain;
  object-position: left center;
  display: block;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 63px;
  height: 63px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  cursor: pointer;
}
.icon-button:hover { border-color: var(--gold); }

.icon-button img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.icon-button-ideas img { width: 39px; height: 39px; }

.icon-button-ideas {
  border-color: rgba(184, 138, 45, 0.38);
  background: linear-gradient(180deg, rgba(255,247,219,0.72), rgba(255,252,245,0.92));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.56);
}
.icon-button-ideas:hover,
.icon-button-ideas:focus-visible {
  border-color: rgba(184, 138, 45, 0.72);
  background: rgba(255, 242, 199, 0.82);
}

/* — Subheader — */
.pp-subheader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 0 14px;
  color: var(--muted);
  font-size: var(--text-base);
}

.external-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.external-links a {
  color: var(--green-soft);
  border-bottom: 1px solid transparent;
}
.external-links a:hover { border-color: var(--gold); }

.current-date { white-space: nowrap; }
.date-separator { color: var(--gold); padding: 0 8px; }

/* — Drawer lateral — */
.side-panel {
  position: fixed;
  z-index: 20;
  top: 0; right: 0;
  width: min(380px, calc(100vw - 24px));
  height: 100vh;
  padding: 22px;
  background: var(--surface-strong);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateX(105%);
  transition: transform 180ms ease;
  overflow-y: auto;
}
.side-panel.is-open { transform: translateX(0); }

/* — Popover de Ideias — */
.ideas-popover {
  position: fixed;
  z-index: 25;
  top: 88px;
  right: max(16px, calc((100vw - var(--max)) / 2));
  width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(170, 126, 37, 0.42);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgba(41, 34, 14, 0.16);
  overflow: hidden;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, transform 150ms ease;
  touch-action: none;
}
.ideas-popover.is-open {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}
.ideas-popover.is-dragging {
  transition: none;
  user-select: none;
}

.idea-popover-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--paper-soft), var(--surface));
  color: var(--green);
  cursor: move;
  touch-action: none;
}

.idea-popover-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: var(--text-base);
}
.idea-popover-brand img {
  width: 28px;
  height: 28px;
  object-fit: contain;  /* novo: garante proporção do símbolo */
}

.idea-insert-button {
  min-height: 32px;
  padding: 5px 14px;
  border: 1px solid rgba(170, 126, 37, 0.42);
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--green);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
}

.idea-close-button {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--green);
  cursor: pointer;
}

.ideas-popover .idea-form { display: grid; gap: 0; }

.ideas-popover .idea-form textarea {
  width: calc(100% - 20px);
  min-height: 136px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  color: var(--green);
  margin: 10px;
  padding: 12px;
  font-size: var(--text-base);
  line-height: var(--leading-base);
}

/* — Menu drawer interior — */
.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-top h2 { margin: 0; font-size: var(--text-xl); }
.panel-top button {
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--green);
  cursor: pointer;
}

.drawer-nav { display: grid; gap: 6px; }

.menu-item { border-bottom: 1px solid var(--line); color: var(--green); }

.menu-link,
.menu-parent-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}
.menu-link { cursor: pointer; }
.menu-parent-link { flex: 1; color: var(--green); }

.menu-toggle {
  width: 34px; height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
}
.menu-toggle span { display: inline-block; transition: transform 160ms ease; }
.menu-branch.is-open .menu-toggle span { transform: rotate(90deg); }

.menu-children {
  display: grid;
  gap: 8px;
  padding: 0 0 12px 14px;
}
.menu-children a {
  color: var(--green-soft);
  font-size: var(--text-base);
}

/* — Back to top — */
.back-to-top {
  position: fixed;
  right: 18px; bottom: 18px;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  cursor: pointer;
}
.back-to-top img { width: 30px; height: 30px; object-fit: contain; }

/* — Rodapé — */
.pp-footer {
  margin-top: 34px;
  color: var(--green-soft);
}

.footer-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 0;
}

.footer-brand-image {
  width: 28px; height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-text-main {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--green-soft);
  letter-spacing: var(--tracking-wide);
}

/* Link "Sobre o projeto" discreto no rodapé */
.footer-about-link {
  font-family: var(--font-secondary);
  font-size: var(--text-xs);
  color: var(--muted);
  border-bottom: 1px solid transparent;
  margin-left: 6px;
}
.footer-about-link:hover {
  color: var(--green-soft);
  border-color: var(--gold);
}

/* — Responsivo (duplica apenas mobile-critical do responsive.css) — */
@media (max-width: 720px) {
  .pp-header { min-height: 82px; gap: 10px; }
  .pp-subheader { align-items: flex-start; flex-direction: column; }
  .current-date { white-space: normal; }
  .ideas-popover { top: 80px; right: 14px; left: 14px; width: auto; }
  .icon-button     { width: 60px; height: 60px; }
  .icon-button img { width: 33px; height: 33px; }
  .icon-button-ideas img { width: 36px; height: 36px; }
  .back-to-top img { width: 22px; height: 22px; }
  .footer-text-main { font-size: var(--text-sm); }
}
