/* Integration styles. The supplied PixPal palette and component geometry live in design.css. */
@font-face {
  font-family: "DM Sans";
  src: url("./fonts/dmsans.ttf") format("truetype");
  font-weight: 100 1000;
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url("./fonts/manrope.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}
*,
*::before,
*::after {
  /* Keep letters distinct even where component font shorthands reset variants. */
  font-variant-ligatures: none !important;
}
body,
button,
input,
select,
textarea {
  font-family: "DM Sans", "Microsoft YaHei", system-ui, sans-serif;
}
h1,
h2,
h3,
.logo {
  font-family: Manrope, "Microsoft YaHei", system-ui, sans-serif;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #a397d5;
  outline-offset: 3px;
}
.field {
  display: block;
  margin: 16px 0;
  font-size: 13px;
  font-weight: 600;
}
.field input:not([type="range"]),
.field select,
.field textarea,
.duration-label select {
  display: block;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  color: var(--ink);
  padding: 12px;
  font: inherit;
}
.field textarea {
  resize: vertical;
}
.field input[type="range"] {
  display: block;
  width: 100%;
  accent-color: var(--coral);
  margin: 12px 0;
}
.hint,
.muted {
  color: #797167;
  font-size: 12px;
  line-height: 1.8;
}
.hint {
  margin: 10px 0;
}
.error-text {
  color: #a3322a;
  background: #fff0ed;
  border: 1px solid #eec6bf;
  padding: 12px;
  border-radius: 10px;
  margin: 12px 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.notice {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #302c28;
  color: #fffaf2;
  padding: 15px 20px;
  border-radius: 14px;
  max-width: min(620px, calc(100% - 32px));
  box-shadow: 0 8px 30px #302c2840;
  font-size: 13px;
}
.notice button {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 22px;
  padding: 0 4px;
}
.page-header h1,
.panel-title h2,
.side-profile strong {
  overflow-wrap: anywhere;
}
.home-grid {
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, 0.75fr);
  align-items: stretch;
}
.status-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.status-options button {
  background: #ffffff75;
  border: 1px solid #d9d1eb;
  color: #706386;
  border-radius: 10px;
  font-size: 12px;
  padding: 11px 4px;
}
.status-options button.selected {
  background: #7464a9;
  color: white;
  border-color: #7464a9;
}
.form-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}
.duration-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.duration-label select {
  width: auto;
  padding: 7px;
  margin: 0;
}
.saved-avatar,
.default-avatar {
  display: block;
  object-fit: contain;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}
.retry-image {
  background: transparent;
  color: #ffe4ac;
  border: 1px solid #8c7854;
  border-radius: 9px;
  padding: 8px;
}
.online-pill {
  flex-shrink: 0;
}
.online-pill.offline {
  background: #eee9e2;
  color: #84796c;
}
.partner-meta {
  line-height: 1.7;
  min-height: 18px;
}
.partner-clock,
.pair-request-note,
.paired-summary small {
  overflow-wrap: anywhere;
}
.partner-meta:has(+ .partner-clock) {
  margin-bottom: 0;
}
.partner-clock {
  margin-top: 0;
}
.live-display .mood-nudge {
  animation: pixpal-nudge 0.32s ease-in-out 4;
}
.live-display .mood-wave img {
  transform-origin: bottom center;
  animation: pixpal-wave 0.45s ease-in-out 3 alternate;
}
.live-display .mood-heart img {
  animation: pixpal-heart 0.55s ease-in-out 3 alternate;
}
@keyframes pixpal-nudge {
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}
@keyframes pixpal-wave {
  to {
    transform: rotate(8deg);
  }
}
@keyframes pixpal-heart {
  to {
    transform: scale(1.07);
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-display .pixel-avatar,
  .live-display .pixel-avatar img {
    animation: none;
  }
}
.week-breakdown,
.week-today {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}
.bar-chart > button {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  min-width: 0;
  gap: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.bar-chart > button[aria-pressed="true"] span {
  background: var(--coral);
}
.speech-bubble {
  max-width: 180px;
  overflow-wrap: anywhere;
}
.pat-mark {
  position: absolute;
  top: 15px;
  left: 16px;
  color: #ffbd99;
  font-size: 12px;
  z-index: 5;
}
.action-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.action-grid small {
  font-size: 10px;
  color: var(--muted);
}
.events {
  margin-top: 15px;
}
.event-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.event-row:last-child {
  border: 0;
}
.event-heart {
  background: #f6e7df;
  padding: 10px;
  border-radius: 12px;
  color: #ba705b;
}
.event-row strong {
  display: block;
  font-size: 13px;
}
.event-row small {
  display: block;
  color: #8e8479;
  font-size: 11px;
  margin-top: 4px;
}
.event-status {
  margin-left: auto;
  font-size: 11px;
  white-space: nowrap;
  border-radius: 15px;
  padding: 6px 9px;
  background: #f5ead6;
  color: #947236;
}
.event-status.delivered {
  background: #e4f3ed;
  color: #358765;
}
.event-status.expired {
  background: #efece7;
  color: #8e8479;
}
.empty-note {
  color: #8e8479;
  font-size: 13px;
  padding: 20px 0;
  line-height: 1.8;
}
.setting-card {
  min-width: 0;
}
.security-card {
  display: block;
  padding: 26px;
}
.setting-card h2 {
  margin: 9px 0 16px;
  font-size: 21px;
}
.setting-card h3 {
  margin: 10px 0;
}
.settings-layout {
  align-items: start;
}
.device-row {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  font-size: 13px;
}
.device-row p {
  margin: 7px 0;
  overflow-wrap: anywhere;
}
.device-row small {
  color: #8a8076;
}
.security-card > .button {
  margin-top: 20px;
}
.customizer h2 {
  font-size: 20px;
  margin-bottom: 15px;
}
.photo-display {
  align-items: center;
}
.creator-saved-display .pixel-avatar:has(img) {
  width: 256px;
  height: 256px;
  max-width: 100%;
}
.creator-saved-display .saved-avatar {
  cursor: pointer;
}
.photo-display p {
  color: #aaa195;
  font-size: 13px;
}
.photo-display canvas {
  width: 256px;
  max-width: 95%;
  aspect-ratio: 1;
  image-rendering: pixelated;
}
.recovery-dialog {
  width: min(500px, calc(100% - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  margin: auto;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fffdf9;
  color: var(--ink);
}
.recovery-dialog::backdrop {
  background: #211d18aa;
  backdrop-filter: blur(5px);
}
.recovery-dialog h2 {
  margin: 15px 0;
  font-size: 24px;
}
.recovery-dialog p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
.recovery-dialog code {
  display: block;
  overflow-wrap: anywhere;
  padding: 18px;
  margin: 20px 0;
  border-radius: 12px;
  background: #eee8df;
  font:
    18px/1.8 ui-monospace,
    monospace;
  user-select: all;
}
.recovery-dialog .check-row {
  margin: 20px 0;
  align-items: center;
}
.loading-card {
  padding: 50px 25px;
  text-align: center;
  color: #8c8072;
}
.connection-error {
  padding: 18px;
  border-radius: 14px;
  margin-bottom: 20px;
  background: #fff0df;
  color: #8b5132;
  font-size: 13px;
}
.connection-error .button {
  margin-top: 12px;
}
@media (max-width: 650px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
  .right-column {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 1000px) {
  .notice {
    bottom: 80px;
  }
}
@media (max-width: 650px) {
  .landing > header > div {
    gap: 8px;
  }
  .panel-title {
    align-items: flex-start;
    gap: 10px;
  }
  .online-pill {
    font-size: 9px;
    padding: 6px 8px;
  }
  .event-row {
    gap: 8px;
  }
  .event-row strong {
    font-size: 11px;
  }
  .event-heart {
    padding: 7px;
  }
  .event-status {
    font-size: 9px;
    padding: 5px;
  }
  .style-options > div {
    flex-wrap: wrap;
  }
  .option-row > div {
    gap: 7px;
  }
  .speech-bubble {
    max-width: 145px;
    font-size: 10px;
  }
  .recovery-dialog {
    padding: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.language-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font:
    600 12px "DM Sans",
    "Microsoft YaHei",
    sans-serif;
  white-space: nowrap;
}
.language-select select {
  background: transparent;
  color: inherit;
  border: 0;
  padding: 8px 4px;
  min-height: 36px;
  max-width: 120px;
  cursor: pointer;
  font: inherit;
}
.header-actions,
.auth-top-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.page-header {
  gap: 15px;
}
.page-header > div:first-child {
  min-width: 0;
}
.page-header > .header-actions {
  display: flex;
}
.recovery-dialog > .language-select {
  float: right;
}
.recovery-dialog .eyebrow {
  clear: both;
}
.mini-tv .live-display {
  padding-bottom: 16px;
}
.mini-tv .live-display .pixel-avatar {
  height: 128px;
  width: 128px;
}
.ai-tip strong {
  text-wrap: balance;
}
.ai-tip .tip-link {
  font-size: 12px;
}
html[lang="zh-CN"] .hero-copy h1 {
  letter-spacing: -2px;
  line-height: 1.15;
}
@media (max-width: 1000px) {
  .action-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (max-width: 650px) {
  .landing .landing-login {
    display: inline-flex;
  }
  .header-actions {
    gap: 5px;
  }
  .header-actions .icon-button {
    width: 34px;
    height: 34px;
  }
  .page-header {
    gap: 6px;
  }
  .page-header:has(.header-actions > :only-child) {
    position: relative;
  }
  .page-header:has(.header-actions > :only-child) h1 {
    padding-inline-end: 38px;
  }
  .page-header:has(.header-actions > :only-child) .header-actions {
    position: absolute;
    inset-inline-end: 0;
    top: 0;
  }
  .page-header .language-select {
    position: relative;
    justify-content: center;
    width: 34px;
    height: 36px;
    border-radius: 8px;
  }
  .page-header .language-select select {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
  }
  .page-header .language-select:focus-within {
    outline: 3px solid #a397d5;
  }
  .language-select {
    font-size: 11px;
  }
  .language-select select {
    max-width: 100px;
  }
  .auth-top-tools {
    gap: 8px;
    font-size: 11px;
  }
  .unpaired-actions .button {
    margin: 5px;
  }
  .parallel-section {
    grid-template-columns: 1fr;
  }
}
.recorder-card audio {
  display: block;
  margin-block: 0.75rem;
}
.camera-alert {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.gallery {
  display: block;
  margin-top: 1rem;
}
.gallery summary {
  cursor: pointer;
  font-weight: bold;
}
.gallery .device-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.5rem;
}
.gallery .device-row :is(svg, img) {
  width: 3rem;
  height: 3rem;
}
.device-link .button {
  margin-block: 0.5rem;
}
