/* PetzU content uses the shared POMS palette and fonts. */
.petzu-site {
  background: #90bfe2;
  background-position: 0 52px;
  color: var(--poms-text);
  font-family: 'Comic Sans MS', sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.petzu-site > header {
  background: #5597ca url('/petzu/assets/500px-Graph-paper.png') repeat;
  background-position: 0 -40px;
  border-bottom: 1px solid var(--poms-border);
  padding: 24px;
}

.petzu-site > header img { display: block; margin: auto; max-height: 125px; }

.petzu-site > .layout > main,
.petzu-site > .layout > .user-menu {
  position: relative;
  padding: 24px;
  background: var(--poms-panel);
  border: 1px solid var(--poms-border);
  border-radius: 12px;
  box-shadow: 1px 1px 0 rgba(255, 250, 241, .7);
}

.petzu-site > .layout > .user-menu { background: var(--poms-card-sage); }

.petzu-site > .layout > main::before,
.petzu-site > .layout > .user-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 40px;
  height: 14px;
  background: url('/assets/pixel-tape-green.png') center / contain no-repeat;
  transform: translateX(-50%);
  pointer-events: none;
}

.petzu-site h1, .petzu-site h2, .petzu-site h3,
.petzu-site h4, .petzu-site h5, .petzu-site h6 {
  font-family: 'Jua', 'Comic Sans MS', sans-serif;
  font-weight: normal;
  color: var(--poms-heading);
  line-height: 1.2;
}

.petzu-site h1 { font-size: clamp(2rem, 4vw, 40px); margin: 0 0 20px; }
.petzu-site h2 { font-size: 29px; margin: 0 0 16px; }
.petzu-site h3 { border-bottom: 2px dotted var(--poms-border); }
.petzu-site a:link, .petzu-site a:visited,
.petzu-site .actions a { color: var(--poms-link); }
.petzu-site a:hover, .petzu-site a:active,
.petzu-site .actions a:hover { color: var(--poms-link-hover); }
.petzu-site .meta, .petzu-site .small,
.petzu-site .comment time { color: var(--poms-sidebar-dark); }
.petzu-site .comment strong { color: var(--poms-heading); }

.petzu-site input, .petzu-site select, .petzu-site textarea,
.petzu-frame .petzu-navigation input {
  min-width: 0;
  max-width: 100%;
  padding: 8px;
  background: var(--poms-panel);
  color: var(--poms-text);
  border: 1px solid var(--poms-border);
  border-radius: 6px;
  font: inherit;
}

.petzu-frame .petzu-navigation input { width: 100%; }
.petzu-frame .petzu-navigation h2 { font-family: 'Jua', sans-serif; font-size: 22px; }
.petzu-frame .petzu-navigation form { display: flex; flex-direction: column; }
.petzu-frame .petzu-navigation img { max-width: calc(100% - 24px); height: auto; }

.petzu-site button:not(.subtle-button):not(.comment-delete-button),
.petzu-site .button {
  background: var(--poms-heading);
  color: var(--poms-sidebar-text);
  border: 2px solid var(--poms-sidebar-dark);
  border-radius: 6px;
  box-shadow: 2px 2px 0 rgba(62, 56, 48, .18);
  font-family: inherit;
}

.petzu-site a.button:link, .petzu-site a.button:visited,
.petzu-site a.button:hover { color: var(--poms-sidebar-text); text-decoration: none; }
.petzu-site button:not(.subtle-button):not(.comment-delete-button):hover,
.petzu-site .button:hover { background: var(--poms-sidebar-dark); }
.petzu-site .button.danger { background: #863d43; border-color: #6c3037; }
.petzu-site .button.danger:hover { background: #6c3037; }
.petzu-site .button.reply, .petzu-site .markdown-toolbar button {
  background: var(--poms-card-sage);
  color: var(--poms-heading);
  border: 1px solid var(--poms-border);
  box-shadow: none;
}
.petzu-site .button.reply:hover, .petzu-site .markdown-toolbar button:hover {
  background: var(--poms-sidebar-light);
}

.petzu-site .comment {
  background: var(--poms-card-peach);
  border-color: var(--poms-border);
  box-shadow: none;
}
.petzu-site .subtle-button { color: var(--poms-link); }
.petzu-site .comment-delete-button { color: #863d43; }
.petzu-site .tutorial-item { border-bottom-color: var(--poms-border) !important; }
.petzu-site pre, .petzu-site :not(pre) > code {
  background: var(--poms-card-sage);
  color: var(--poms-heading);
}
.petzu-site #color-popup {
  background: var(--poms-panel);
  color: var(--poms-text);
  border-color: var(--poms-border);
  font-family: inherit;
  max-width: calc(100vw - 32px);
  min-width: min(220px, calc(100vw - 32px));
}
.petzu-site #markdown-preview {
  background: var(--poms-panel) !important;
  border-color: var(--poms-border) !important;
  color: var(--poms-text);
}
.petzu-site .message.success {
  background: var(--poms-card-sage);
  color: var(--poms-heading);
  border-color: var(--poms-border);
}
.petzu-site .message.error {
  background: var(--poms-card-pink);
  color: #863d43;
  border-color: #c98e91;
}
.petzu-site .site-footer {
  padding: 16px;
  text-align: center;
  color: var(--poms-heading);
  border-top: 1px solid var(--poms-border);
}
.petzu-site .body-content { overflow-wrap: anywhere; }
.petzu-site .body-content table { display: block; max-width: 100%; overflow-x: auto; }
.petzu-site .body-content img { max-width: 100%; height: auto; }
.petzu-site input:focus-visible, .petzu-site textarea:focus-visible,
.petzu-site select:focus-visible {
  outline: 2px solid var(--poms-sidebar-dark);
  outline-offset: 2px;
}

/* The editor sets an inline left offset; keep its color popup onscreen
   when the toolbar wraps in the narrower content column. */
@media (max-width: 1100px) {
  .petzu-site #color-popup { left: auto !important; right: 16px; }
}

@media (max-width: 767px) {
  .petzu-site > .layout { padding: 16px; }
  .petzu-site > .layout > main, .petzu-site > .layout > .user-menu { padding: 20px; }
  .petzu-site input, .petzu-site textarea, .petzu-site select { font-size: 16px; }
}
