/* Perspective appearance v130 */
.yappy-pov-appearance-section{margin-top:18px}
.yappy-pov-appearance-copy{
  min-width:0;
  flex:1;
  display:flex;
  flex-direction:column;
  gap:2px;
  text-align:left;
}
.yappy-pov-appearance-copy strong{font-size:15px;font-weight:600}
.yappy-pov-appearance-copy small{
  color:var(--text-sub);
  font-size:12px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.yappy-pov-color-chip{
  width:28px;
  height:28px;
  flex:0 0 28px;
  border-radius:50%;
  border:1px solid rgba(120,120,128,.22);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.22);
}
.yappy-pov-appearance-note{
  margin:7px 4px 0;
  color:var(--text-sub);
  font-size:12px;
  line-height:16px;
}

.pov130-preview{
  min-height:112px;
  margin:4px 0 16px;
  padding:20px 18px;
  border-radius:20px;
  border:1px solid var(--divider);
  background:var(--card-bg,var(--sheet-bg));
  display:flex;
  align-items:center;
  justify-content:flex-end;
}
.pov130-preview-bubble{
  max-width:76%;
  padding:9px 14px;
  border-radius:19px;
  font-size:16px;
  line-height:21px;
}
.pov130-palette{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px 10px;
  margin:8px 0 18px;
}
.pov130-bubble-swatch{
  width:42px;
  height:42px;
  max-width:100%;
  justify-self:center;
  border-radius:50%;
  border:1px solid rgba(120,120,128,.20);
  background:var(--pov130-swatch,#0a84ff);
  position:relative;
}
.pov130-bubble-swatch.pov130-default{
  background:linear-gradient(135deg,#0a84ff 0 50%,#5ac8fa 50% 100%);
}
.pov130-bubble-swatch.selected{
  box-shadow:0 0 0 3px var(--sheet-bg),0 0 0 5px var(--text-main);
}
.pov130-bubble-swatch.selected::after{
  content:"✓";
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  color:var(--pov130-check,#fff);
  font-size:18px;
  font-weight:800;
}
.pov130-custom-row{
  display:grid;
  grid-template-columns:52px minmax(0,1fr);
  gap:8px;
  align-items:center;
  margin:7px 0 14px;
}
.pov130-custom-row input[type="color"]{
  width:52px;
  height:44px;
  padding:0;
  border:0;
  border-radius:12px;
  overflow:hidden;
  background:transparent;
}
.pov130-custom-row input[type="color"]::-webkit-color-swatch-wrapper{padding:0}
.pov130-custom-row input[type="color"]::-webkit-color-swatch{border:1px solid var(--divider);border-radius:12px}

/* iMessage live bubbles: only the outgoing bubble/tail changes, not every blue control. */
html[data-social-app="imessage"] .imessage-v19[data-yappy-perspective-bubble="1"] .im-bubble.out{
  background:var(--yappy-pov-bubble)!important;
  color:var(--yappy-pov-bubble-text,#fff)!important;
}
html[data-social-app="imessage"] .imessage-v19[data-yappy-perspective-bubble="1"] .im-msg-row.cluster-single .im-bubble.out::after,
html[data-social-app="imessage"] .imessage-v19[data-yappy-perspective-bubble="1"] .im-msg-row.cluster-end .im-bubble.out::after{
  background:var(--yappy-pov-bubble)!important;
}
html[data-social-app="imessage"] .imessage-v19[data-yappy-perspective-bubble="1"] .im-bubble.out .im44-reply-quote,
html[data-social-app="imessage"] .imessage-v19[data-yappy-perspective-bubble="1"] .im-bubble.out .im44-reply-copy{
  color:var(--yappy-pov-bubble-text,#fff)!important;
}

/* Dedicated iMessage screenshot renderer uses the same POV bubble. */
.imx-root[data-yappy-perspective-bubble="1"] .imx-bubble.out,
.imx-root[data-yappy-perspective-bubble="1"] .imx-bubble.out.tail-out{
  background:var(--yappy-pov-bubble)!important;
  color:var(--yappy-pov-bubble-text,#fff)!important;
}

@media(max-width:420px){
  .pov130-palette{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media(max-width:350px){
  .pov130-palette{grid-template-columns:repeat(4,minmax(0,1fr))}
}
