.pip-postcard, #pip-help {
  --pip-ink: #153f37;
  --pip-paper: #fbfff7;
  --pip-rule: #c6dbcc;
  color: var(--pip-ink);
  background-color: var(--pip-paper);
  border: 1px solid #bbd4c4;
  box-shadow: var(--paper-shadow);
}
.pip-postcard {
  position: relative;
  display: flex;
  align-items: center;
  gap: 15px;
  min-height: 100px;
  width: 100%;
  padding: 16px 20px;
  text-align: left;
  border-radius: 19px;
  background: #edf5e9;
}
.pip-postcard strong { display: block; font: 700 24px/1.12 var(--display); }
.pip-postcard small { display: block; margin-top: 5px; color: #52625a; font-size: 12px; }
.pip-postcard .pip-card-arrow { margin-inline-start: auto; font-size: 21px; }
.pip-stamp {
  position: relative;
  width: 58px;
  height: 59px;
  display: grid;
  place-content: center;
  flex: none;
  overflow: hidden;
  border: 1px solid #bbd9b9;
  border-radius: 18px;
  transform: rotate(-3deg);
  background: #d4ebc7;
}
.pip-stamp .mascot { scale: .22; margin: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .pip-stamp .mascot { animation: pip-stamp-breathe 6s ease-in-out infinite; }
  @keyframes pip-stamp-breathe {
    0%,100% { transform: translateY(3px) rotate(-8deg); }
    50% { transform: translateY(-6px) rotate(-4deg); }
  }
}
#pip-help {
  box-sizing: border-box;
  padding: 0;
  border-radius: 20px;
  width: min(450px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
}
#pip-help[open] { display: flex; flex-direction: column; }
#pip-help::backdrop { background: #26392f77; }
.pip-help-header {
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--pip-rule);
  padding: 16px 20px;
}
#pip-help-title { font: 700 29px/1.12 var(--display); padding: 0; margin: 0; }
.pip-help-header form { margin-inline-start: auto; }
.pip-close {
  width: 44px;
  height: 44px;
  border: 0;
  color: var(--pip-ink);
  background: transparent;
  font: 26px/1 system-ui, sans-serif;
}
#pip-chat-log {
  min-height: 75px;
  height: min(265px, 32dvh);
  padding: 14px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #edf5ee;
}
#pip-help .pip-message {
  display: table;
  margin: 0 auto 10px 0;
  max-width: 90%;
  padding: 9px 12px;
  border: 1px solid #c0d7c6;
  border-radius: 2px 9px 8px 7px;
  background: #fafff8;
  color: var(--pip-ink);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
#pip-help .pip-message strong {
  display: block;
  margin-bottom: 2px;
  font: bold 14px/1.3 var(--display);
}
#pip-help .pip-message-player {
  margin-inline: auto 0;
  background: #e7eddf;
  border-radius: 9px 2px 7px 8px;
}
.pip-help-tools { padding: 12px 16px 15px; border-top: 1px solid var(--pip-rule); }
.pip-questions { display: flex; flex-wrap: wrap; gap: 6px; }
.pip-questions button, #pip-hint-action, #pip-question-form button {
  color: var(--pip-ink);
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #a5c5b1;
  border-radius: 10px;
  background: #fafff8;
  font: 600 13px/1.2 system-ui, sans-serif;
}
#pip-hint-panel { padding: 7px 0 0; }
#pip-help #pip-hint-note { margin: 3px 0; color: var(--pip-ink); font-size: 14px; line-height: 1.5; }
#pip-hint-action, #pip-question-form button { color: white; background: #18594b; border-color: #18594b; }
#pip-help [hidden] { display: none; }
#pip-question-form { display: flex; gap: 8px; margin-top: 10px; }
#pip-question-form input {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  color: var(--pip-ink);
  border: 1px solid #a3c3af;
  border-radius: 10px;
  background: #fbfff8;
  font: 16px/1.4 system-ui, sans-serif;
}
.pip-sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.pip-inline { min-height: 44px; }
@media (max-height: 500px) {
  .pip-help-header { padding-block: 4px; }
  .pip-help-header .pip-stamp { display: none; }
  #pip-chat-log { flex: 1 0 66px; height: auto; }
}
