:root{
  --bg: #fff7fb;
  --milk: #fffaf2;
  --card: #ffffff;
  --pink: #f4a7c4;
  --pink-2: #f08fb6;
  --text: #3a2b33;
  --muted: #7b5a6a;
  --border: rgba(240,143,182,.35);
  --shadow: 0 12px 30px rgba(80,30,50,.10);
  --radius: 20px;

  --font-ui: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-message: "Pacifico", cursive; /* default to Pacifico */
}

*{ box-sizing: border-box; }
html, body{ height: 100%; }

body{
  margin: 0;
  font-family: var(--font-ui);
  color: var(--text);
  background: radial-gradient(1200px 600px at 50% 0%, var(--milk), var(--bg));
}

/* Headline */
h1{
  font-family: "Pacifico", cursive;
  margin: 8px 0 6px;
  font-size: clamp(34px, 4.4vw, 54px);
  letter-spacing: .5px;
}

.subtitle{ margin: 0; color: var(--muted); }

/* controls */
button, input, select, textarea{
  font-family: inherit;
  font-size: 100%;
}

/* side images */
.side{
  position: fixed;
  width: auto;
  height: auto;
  max-width: clamp(70px, 10vw, 130px);
  max-height: clamp(220px, 55vh, 520px);
  object-fit: contain;
  pointer-events: none;
  opacity: .95;
  filter: drop-shadow(0 10px 18px rgba(80,30,50,.10));
  transform: translateY(-50%);
  z-index: 0;
}
.side-left{ left: 0; top: 22%; }
.side-right{ right: 0; top: 72%; }

.card{
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 18px 36px;
}

.hero{
  text-align: center;
  padding: 18px 14px 6px;
}

.panel{
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.label{
  display: block;
  margin: 10px 0 6px;
  font-weight: 700;
  color: #5b3b49;
}

.textarea, .input{
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  font-size: 16px;
  outline: none;
  background: #ffffff;
}

.textarea{ resize: vertical; min-height: 150px; }

.grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 800;
  font-size: 16px;
  color: #5a1f36;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 10px 18px rgba(240,143,182,.22);
}

.btn.small{
  padding: 10px 12px;
  font-size: 14px;
  border-radius: 14px;
}

/* add space between inputs */
.btn-paws:not(.small),
.btn-burn{
  margin-top: 14px;
}

/* paws, ignore clipping */
.btn-paws, .btn-burn{
  width: 100%;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.35), rgba(255,255,255,0)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='90' viewBox='0 0 160 90'><g fill='%23ffffff' fill-opacity='.55' transform='translate(28 18) rotate(45 60 30)'><circle cx='20' cy='14' r='6'/><circle cx='35' cy='10' r='5'/><circle cx='50' cy='14' r='6'/><path d='M35 44c-10 0-18-7-18-15 0-7 6-12 18-12s18 5 18 12c0 8-8 15-18 15z'/></g></svg>");


    background-repeat: no-repeat, repeat-x;
  
    background-size: auto, 74px 44px;
  
    background-position: center, center calc(50% + 10px);
}


.btn-paws{
  background-color: var(--pink);
}
.btn-paws:hover{
  background-color: var(--pink-2);
}

.btn-burn{
  background-color: #f39abf;
}
.btn-burn:hover{
  filter: brightness(0.98);
}

.result{ margin-top: 14px; }
.result-row{
  display: flex;
  gap: 10px;
  align-items: center;
}
.hint{ margin: 10px 2px 0; color: var(--muted); }
.error{ margin: 12px 2px 0; color: #a0194a; font-weight: 700; }

.toolbar{
  display: flex;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

/* messages font */
.message{
  font-family: var(--font-message);
  white-space: pre-wrap;
  word-break: break-word;
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(240,143,182,.55);
  background: linear-gradient(180deg, #fff, #fff4f8);
  min-height: 140px;
  font-size: 20px; 
  line-height: 1.6; 
  transition: font-size 0.2s ease; 
}

/* markdown */
.markdown p{ margin: 0 0 12px; }
.markdown ul{ margin: 0 0 12px 18px; padding: 0; }
.markdown code{
  padding: 2px 6px;
  border-radius: 8px;
  background: #fff0f6;
  border: 1px solid rgba(240,143,182,.35);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.markdown a{ color: #a0194a; font-weight: 800; }

.burn-face{
  width: 34px;
  height: 34px;
  background: url("/assets/burn-angry.svg") center/contain no-repeat;
}

.zoom-controls{
  display: flex;
  gap: 8px;
  align-items: center;
}

.zoom-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-weight: 900;
  font-size: 20px;
  color: var(--text);
  user-select: none;
  transition: all 0.2s ease;
}

.zoom-btn:hover{
  background: var(--pink);
  border-color: var(--pink-2);
  transform: scale(1.1);
}

.zoom-btn:active{
  transform: scale(0.95);
}

.zoom-label{
  font-size: 14px;
  color: var(--muted);
  min-width: 45px;
  text-align: center;
}

/* responsiveness (i hope lmao) */
@media (max-width: 820px){
  .grid{ grid-template-columns: 1fr; }
  .side{ width: 86px; opacity: .35; }
}

/* mobile */
@media (max-width: 480px){
  body{
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .panel{ padding: 14px; }
  .result-row{ flex-direction: column; align-items: stretch; }

  .side{
    display: block;
    opacity: .55;
    max-width: 120px;
    max-height: 84px;
    transform: translateX(-50%);
    left: 50%;
    right: auto;
    filter: drop-shadow(0 8px 14px rgba(80,30,50,.10));
  }
  .side-left{ top: 14px; bottom: auto; }
  .side-right{ top: auto; bottom: 14px; }
}