/* ==========================================================================
   Louis — UGC Hair Creator · cozy anime-morning theme
   Palette: soft sky blues + warm lamplight peach, white cloud cards
   ========================================================================== */

:root {
  --sky-050: #f2faff;
  --sky-100: #eaf6ff;
  --sky-200: #dceefb;
  --sky-300: #b8dff5;
  --sky-400: #a8d8ea;
  --sky-500: #7fb6d9;
  --ink: #2f4a63;
  --ink-soft: #5b7a96;
  --peach: #ffb997;
  --peach-deep: #ff9b73;
  --peach-glow: #ffd9c2;
  --cream: #fff9f2;
  --card: #ffffff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow-soft: 0 10px 30px rgba(127, 182, 217, 0.25);
  --shadow-hover: 0 16px 40px rgba(127, 182, 217, 0.38);
  --font-display: "Baloo 2", "Zen Maru Gothic", sans-serif;
  --font-body: "Zen Maru Gothic", "Baloo 2", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* The `hidden` attribute must always win, even when author CSS sets a
   `display` on the same element (e.g. flex/grid layouts toggled in JS). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: linear-gradient(180deg, var(--sky-200) 0%, var(--sky-100) 38%, var(--cream) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; }

img { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--peach-glow); color: var(--ink); }

/* --------------------------------------------------------------------------
   Sky decor: drifting clouds + sun glow + floating sparkles
   -------------------------------------------------------------------------- */

.sky {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sun {
  position: absolute;
  top: -140px;
  right: -140px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 217, 194, 0.85) 0%, rgba(255, 217, 194, 0) 68%);
}

.cloud {
  position: absolute;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 100px;
  filter: blur(1px);
  animation: drift linear infinite;
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud::before { width: 55%; height: 160%; left: 16%; bottom: 28%; }
.cloud::after  { width: 42%; height: 120%; right: 14%; bottom: 24%; }

.cloud-1 { width: 200px; height: 56px; top: 12%;  animation-duration: 85s; }
.cloud-2 { width: 140px; height: 40px; top: 34%;  animation-duration: 110s; animation-delay: -40s; opacity: 0.8; }
.cloud-3 { width: 260px; height: 70px; top: 62%;  animation-duration: 140s; animation-delay: -75s; opacity: 0.55; }

@keyframes drift {
  from { left: -320px; }
  to   { left: 110%; }
}

.spark {
  position: absolute;
  width: 10px;
  height: 10px;
  background: var(--peach-glow);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 4s ease-in-out infinite;
}
.spark-1 { top: 22%; left: 12%; animation-delay: 0s; }
.spark-2 { top: 48%; left: 88%; animation-delay: 1.3s; }
.spark-3 { top: 78%; left: 20%; animation-delay: 2.2s; }
.spark-4 { top: 15%; left: 70%; animation-delay: 3s; }

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.7) rotate(0deg); }
  50%      { opacity: 0.9;  transform: scale(1.15) rotate(20deg); }
}

@media (prefers-reduced-motion: reduce) {
  .cloud, .spark { animation: none; }
  html { scroll-behavior: auto; }
}

/* --------------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------------- */

.page {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }

.section-title {
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  margin-bottom: 8px;
}

.section-sub {
  color: var(--ink-soft);
  margin-bottom: 40px;
  max-width: 560px;
}

.title-doodle {
  display: inline-block;
  margin-left: 10px;
  transform: translateY(2px);
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 14px;
  z-index: 50;
  margin: 14px auto 0;
  max-width: 1080px;
  padding: 0 24px;
}

.nav-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 10px 12px 10px 22px;
  box-shadow: var(--shadow-soft);
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--peach-deep);
  box-shadow: 0 0 0 4px var(--peach-glow);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background 0.25s, color 0.25s;
}

.nav-links a:hover { background: var(--sky-100); color: var(--ink); }

.nav-links a.nav-cta {
  background: var(--ink);
  color: #fff;
}
.nav-links a.nav-cta:hover { background: var(--sky-500); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--ink);
  cursor: pointer;
  padding: 6px 12px;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 48px;
  padding: 96px 0 84px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sky-500);
  box-shadow: var(--shadow-soft);
  margin-bottom: 20px;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  margin-bottom: 18px;
}

.hero h1 .wave { display: inline-block; animation: wave 2.4s ease-in-out infinite; transform-origin: 70% 70%; }

@keyframes wave {
  0%, 55%, 100% { transform: rotate(0deg); }
  60% { transform: rotate(18deg); }
  70% { transform: rotate(-8deg); }
  80% { transform: rotate(14deg); }
  90% { transform: rotate(-4deg); }
}

.hero .accent { color: var(--peach-deep); }

.hero p {
  color: var(--ink-soft);
  font-size: 1.06rem;
  max-width: 480px;
  margin-bottom: 30px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border-radius: 999px;
  padding: 14px 28px;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 8px 22px rgba(47, 74, 99, 0.3);
}
.btn-primary:hover { transform: translateY(-3px); background: var(--sky-500); box-shadow: var(--shadow-hover); }

.btn-soft {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.btn-soft:hover { transform: translateY(-3px); background: var(--peach-glow); box-shadow: var(--shadow-hover); }

.hero-portrait { position: relative; justify-self: center; }

.hero-portrait img {
  width: min(300px, 70vw);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
  border: 10px solid #fff;
  box-shadow: var(--shadow-hover);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}

.hero-badge {
  position: absolute;
  bottom: 8px;
  left: -18px;
  background: #fff;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: float 6s ease-in-out infinite reverse;
}

.hero-badge .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--sky-400);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
}

/* --------------------------------------------------------------------------
   Cards (achievements)
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.cloud-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.cloud-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.cloud-card .icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--sky-200), var(--sky-100));
  display: grid;
  place-items: center;
  color: var(--sky-500);
  margin-bottom: 16px;
}

.cloud-card .icon svg { width: 26px; height: 26px; }

.cloud-card h3 { font-size: 1.12rem; margin-bottom: 6px; }
.cloud-card p { color: var(--ink-soft); font-size: 0.95rem; }

.cloud-card .stat {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--sky-500);
}

/* --------------------------------------------------------------------------
   Pricing
   -------------------------------------------------------------------------- */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}

.price-card {
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }

.price-card.featured {
  border: 2px solid var(--peach);
  position: relative;
}

.featured-tag {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--peach-deep);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 14px;
  border-radius: 999px;
  z-index: 2;
}

.price-card figure { position: relative; }
.price-card figure img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }

.price-body { padding: 24px 24px 28px; display: flex; flex-direction: column; flex: 1; }

.price-body h3 { font-size: 1.25rem; margin-bottom: 4px; }

.price-tag {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 12px 0 16px;
}

.price-rbx {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--ink);
}

.price-usd {
  color: var(--ink-soft);
  font-size: 0.95rem;
  background: var(--sky-100);
  border-radius: 999px;
  padding: 3px 12px;
}

.price-body ul {
  list-style: none;
  color: var(--ink-soft);
  font-size: 0.94rem;
  display: grid;
  gap: 8px;
  margin-bottom: 22px;
}

.price-body ul li::before {
  content: "✦";
  color: var(--peach-deep);
  margin-right: 9px;
  font-size: 0.8rem;
}

.price-body .btn { margin-top: auto; justify-content: center; }

.pricing-note {
  margin-top: 26px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Contact / footer
   -------------------------------------------------------------------------- */

.contact-card {
  background: linear-gradient(135deg, var(--sky-300), var(--peach-glow));
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.contact-card h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); margin-bottom: 10px; }
.contact-card p { color: var(--ink); opacity: 0.8; margin-bottom: 26px; max-width: 480px; margin-inline: auto; }

.contact-links { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.site-footer {
  text-align: center;
  padding: 36px 0 44px;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 2;
}

.owner-login {
  color: var(--sky-500);
  text-decoration: none;
  font-size: 0.82rem;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.owner-login:hover { opacity: 1; text-decoration: underline; }

/* --------------------------------------------------------------------------
   Portfolio page
   -------------------------------------------------------------------------- */

.portfolio-hero { padding: 84px 0 30px; text-align: center; }
.portfolio-hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 12px; }
.portfolio-hero p { color: var(--ink-soft); max-width: 520px; margin: 0 auto; }

.gallery {
  columns: 3 260px;
  column-gap: 22px;
  padding-bottom: 40px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 22px;
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: zoom-in;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.gallery-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.gallery-item img { width: 100%; }

.gallery-empty {
  color: var(--ink-soft);
  text-align: center;
  padding: 40px 0;
  column-span: all;
}

.gallery-item figcaption {
  padding: 14px 18px 16px;
  font-size: 0.92rem;
}

.gallery-item figcaption strong { font-family: var(--font-display); display: block; }
.gallery-item figcaption span { color: var(--ink-soft); font-size: 0.84rem; }

/* Lightbox */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(47, 74, 99, 0.72);
  backdrop-filter: blur(8px);
  display: grid;
  place-items: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 24px;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lightbox figure {
  max-width: min(680px, 92vw);
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: scale(0.92);
  transition: transform 0.3s;
}

.lightbox.open figure { transform: scale(1); }

.lightbox img { width: 100%; max-height: 70vh; object-fit: contain; background: var(--sky-100); }

.lightbox figcaption { padding: 16px 22px; font-weight: 500; }
.lightbox figcaption span { color: var(--ink-soft); font-size: 0.88rem; display: block; }

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 26px;
  background: #fff;
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.15rem;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s;
}

.lightbox-close:hover { transform: rotate(90deg); }

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.shown { opacity: 1; transform: none; }

.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 64px; }
  .hero p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-portrait { order: -1; }
  .card-grid, .pricing-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .card-grid, .pricing-grid { grid-template-columns: 1fr; }

  .nav-toggle { display: block; }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 24px;
    right: 24px;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-md);
    padding: 12px;
    box-shadow: var(--shadow-hover);
    text-align: center;
  }

  .nav-links.open { display: flex; }
}

/* ==========================================================================
   Accounts, chat & dashboard
   ========================================================================== */

/* Not-configured / info banner */
.notice-banner {
  background: #fff4e8;
  border: 1px solid var(--peach-glow);
  color: var(--ink);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin: 90px auto 0;
  max-width: 720px;
  font-size: 0.92rem;
  box-shadow: var(--shadow-soft);
}
.notice-banner code {
  background: #fff;
  border-radius: 6px;
  padding: 1px 6px;
  font-size: 0.85em;
}

/* Floating chat button (on landing/portfolio) */
.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 999px;
  box-shadow: var(--shadow-hover);
  transition: transform 0.25s, background 0.25s;
}
.chat-fab:hover { transform: translateY(-3px); background: var(--sky-500); }
.chat-fab svg { width: 22px; height: 22px; }
.chat-fab .fab-label { font-size: 0.95rem; }

/* Nav auth chip */
.nav-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 6px;
  border-radius: 999px;
  background: var(--sky-100);
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}
.nav-user img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* ---- Auth page ---- */
.auth-page { min-height: 70vh; display: grid; place-items: center; padding-top: 110px; padding-bottom: 60px; }
.auth-shell { width: 100%; max-width: 440px; }
.auth-card { padding: 30px 28px; }
.auth-tabs {
  display: flex; gap: 6px; background: var(--sky-100);
  border-radius: 999px; padding: 5px; margin-bottom: 22px;
}
.auth-tab {
  flex: 1; border: none; background: transparent; cursor: pointer;
  font-family: var(--font-display); font-weight: 700; color: var(--ink-soft);
  padding: 9px; border-radius: 999px; transition: background 0.2s, color 0.2s;
}
.auth-tab.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-soft); }

.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form h2 { font-size: 1.4rem; }
.auth-intro { color: var(--ink-soft); font-size: 0.92rem; margin-top: -4px; }
.auth-form label, .auth-card label {
  display: flex; flex-direction: column; gap: 6px;
  font-weight: 600; font-size: 0.9rem; color: var(--ink);
}
.auth-form input, .auth-card input[type="text"], .auth-card input[type="email"],
.auth-card input[type="password"] {
  font-family: var(--font-body); font-size: 1rem;
  border: 1.5px solid var(--sky-200); border-radius: 12px;
  padding: 11px 14px; background: var(--sky-050); color: var(--ink);
  transition: border 0.2s, background 0.2s;
}
.auth-form input:focus, .auth-card input:focus {
  outline: none; border-color: var(--sky-400); background: #fff;
}
.auth-form .btn { margin-top: 4px; justify-content: center; }

.link-btn {
  background: none; border: none; cursor: pointer;
  color: var(--sky-500); font-family: var(--font-body); font-size: 0.88rem;
  padding: 4px; align-self: center; text-decoration: underline;
}
.link-btn.danger { color: var(--peach-deep); }

.form-msg { font-size: 0.88rem; min-height: 1.1em; text-align: center; margin: 0; }
.form-msg.error { color: #d9534f; }
.form-msg.success { color: #2fa36b; }
.form-msg.info { color: var(--ink-soft); }

.profile-avatar-row { display: flex; align-items: center; gap: 18px; margin-bottom: 8px; }
.profile-avatar {
  width: 84px; height: 84px; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: var(--shadow-soft);
}
.file-btn { cursor: pointer; display: inline-block; }
.hint { color: var(--ink-soft); font-size: 0.82rem; margin: 6px 0 0; }
.profile-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.soft-divider { border: none; border-top: 1px solid var(--sky-200); margin: 20px 0; }

/* profile: bio + advanced settings */
.profile-textarea {
  font-family: var(--font-body); font-size: 1rem; border: 1.5px solid var(--sky-200);
  border-radius: 12px; padding: 11px 14px; background: var(--sky-050); color: var(--ink); resize: vertical;
}
.profile-textarea:focus { outline: none; border-color: var(--sky-400); background: #fff; }
.adv-settings { border: 1px solid var(--sky-200); border-radius: 14px; padding: 2px 16px; background: var(--sky-050); }
.adv-settings summary { cursor: pointer; font-family: var(--font-display); font-weight: 600; padding: 12px 0; color: var(--ink); }
.adv-block { padding: 12px 0 16px; border-top: 1px solid var(--sky-200); display: flex; flex-direction: column; gap: 10px; }
.adv-block:first-of-type { border-top: none; }
.adv-block h3 { font-size: 1rem; }
.account-info { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 0.9rem; margin: 0; }
.account-info dt { color: var(--ink-soft); }
.account-info dd { color: var(--ink); font-weight: 600; word-break: break-all; margin: 0; }

/* ---- Chat shared ---- */
.chat-page { padding-top: 100px; padding-bottom: 40px; }
.chat-signed-out { max-width: 460px; margin: 40px auto; padding: 40px 32px; text-align: center; }
.chat-signed-out .btn { margin-top: 18px; }

.chat-window { display: flex; flex-direction: column; min-height: 520px; min-width: 0; padding: 0; overflow: hidden; }
.chat-window-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--sky-100);
}
.chat-head-avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.chat-head-sub { display: block; color: var(--ink-soft); font-size: 0.82rem; }
.chat-head-info { flex: 1; }
.chat-head-actions { display: flex; gap: 8px; }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 20px; display: flex;
  flex-direction: column; gap: 10px; background: var(--sky-050);
  max-height: 60vh;
}
.msg-row { display: flex; }
.msg-row.mine { justify-content: flex-end; }
.msg-bubble {
  max-width: 78%; background: #fff; border-radius: 16px;
  padding: 9px 14px; box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 2px;
}
.msg-row.mine .msg-bubble { background: var(--sky-400); color: var(--ink); }
.msg-name { font-size: 0.72rem; font-weight: 700; color: var(--sky-500); }
.msg-row.mine .msg-name { color: var(--ink); opacity: 0.7; }
.msg-text { font-size: 0.95rem; white-space: pre-wrap; word-break: break-word; }
.msg-time { font-size: 0.68rem; color: var(--ink-soft); align-self: flex-end; }
.msg-row.mine .msg-time { color: var(--ink); opacity: 0.65; }

.chat-composer { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--sky-100); position: relative; }
.chat-composer input[type="text"] {
  flex: 1; min-width: 0; font-family: var(--font-body); font-size: 1rem;
  border: 1.5px solid var(--sky-200); border-radius: 999px;
  padding: 11px 18px; background: var(--sky-050);
}
.chat-composer .btn { flex-shrink: 0; }
.chat-composer input[type="text"]:focus { outline: none; border-color: var(--sky-400); background: #fff; }

.chat-attach {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--sky-100); color: var(--sky-500); transition: background 0.2s, color 0.2s;
}
.chat-attach:hover { background: var(--sky-200); color: var(--ink); }
.chat-attach svg { width: 20px; height: 20px; }

.msg-image {
  margin-top: 4px; max-width: 100%; width: 220px; border-radius: 12px;
  display: block; background: var(--sky-100);
}
.msg-image-link { display: inline-block; }

/* File attachment message */
.msg-file {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  background: var(--sky-050); border: 1px solid var(--sky-200); border-radius: 10px;
  padding: 8px 12px; text-decoration: none; color: var(--ink);
  font-size: 0.86rem; max-width: 230px;
}
.msg-file:hover { background: var(--sky-100); }
.msg-file svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--sky-500); }
.msg-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-row.mine .msg-file { background: rgba(255, 255, 255, 0.55); border-color: rgba(255, 255, 255, 0.7); }

/* Custom emoji inline in a message */
.chat-emoji { height: 1.4em; width: auto; vertical-align: -0.32em; display: inline-block; }

/* Emoji button reset (it reuses .chat-attach for shape) */
.chat-emoji-btn { border: none; font: inherit; }

/* Emoji picker popover */
.emoji-popover {
  position: absolute; bottom: 62px; left: 14px; z-index: 30;
  width: 244px; max-height: 210px; overflow-y: auto;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-hover);
  padding: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start;
}
.emoji-popover button {
  background: none; border: none; cursor: pointer; padding: 4px; border-radius: 8px;
  line-height: 0;
}
.emoji-popover button:hover { background: var(--sky-100); }
.emoji-popover img { height: 28px; width: 28px; object-fit: contain; }
.emoji-pop-empty { color: var(--ink-soft); font-size: 0.82rem; width: 100%; margin: 4px; }

/* Owner emoji manager */
.emoji-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.emoji-add input[type="text"] {
  flex: 1; min-width: 120px; font-family: var(--font-body);
  border: 1.5px solid var(--sky-200); border-radius: 10px;
  padding: 8px 12px; background: #fff; font-size: 0.9rem;
}
.emoji-add input[type="text"]:focus { outline: none; border-color: var(--sky-400); }
.emoji-manage { display: flex; flex-wrap: wrap; gap: 8px; }
.emoji-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--sky-050); border: 1px solid var(--sky-200);
  border-radius: 10px; padding: 4px 6px 4px 8px; font-size: 0.8rem; color: var(--ink-soft);
}
.emoji-chip img { height: 22px; width: 22px; object-fit: contain; }
.emoji-chip button { background: none; border: none; cursor: pointer; color: var(--peach-deep); font-size: 0.9rem; line-height: 1; }
.emoji-chip button:hover { color: var(--peach-deep); }

/* ---- Message actions (edit / delete / pin) ---- */
.msg-bubble { position: relative; }
.msg-actions {
  position: absolute; top: -12px; right: 8px; display: none; gap: 2px;
  background: #fff; border: 1px solid var(--sky-200); border-radius: 999px;
  padding: 2px 4px; box-shadow: var(--shadow-soft); z-index: 5;
}
.msg-row.mine .msg-actions { right: auto; left: 8px; }
.msg-bubble:hover .msg-actions { display: flex; }
.msg-actions button {
  background: none; border: none; cursor: pointer; font-size: 0.82rem;
  line-height: 1; padding: 3px 5px; border-radius: 999px; color: var(--ink-soft);
}
.msg-actions button:hover { background: var(--sky-100); color: var(--ink); }

.msg-edited { font-size: 0.66rem; color: var(--ink-soft); opacity: 0.8; margin-left: 4px; }
.msg-row.mine .msg-edited { color: var(--ink); opacity: 0.6; }

.msg-bubble.pinned { box-shadow: 0 0 0 2px var(--peach) inset, var(--shadow-soft); }
.msg-pin-tag { font-size: 0.66rem; color: var(--peach-deep); font-weight: 700; }

/* inline edit box */
.msg-edit { display: flex; flex-direction: column; gap: 6px; }
.msg-edit textarea {
  font-family: var(--font-body); font-size: 0.95rem; border: 1.5px solid var(--sky-300);
  border-radius: 10px; padding: 6px 10px; background: #fff; resize: vertical; min-width: 180px;
}
.msg-edit-actions { display: flex; gap: 8px; }

/* pinned strip at the top of a chat window */
.pinned-bar {
  background: var(--cream); border-bottom: 1px solid var(--sky-100);
  padding: 8px 14px; display: flex; flex-direction: column; gap: 4px;
}
.pinned-bar-title { font-size: 0.72rem; font-weight: 700; color: var(--peach-deep); }
.pinned-bar button {
  background: none; border: none; text-align: left; cursor: pointer; width: 100%;
  font-family: var(--font-body); font-size: 0.82rem; color: var(--ink-soft);
  padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pinned-bar button:hover { color: var(--ink); }

/* owner-only full-width sections below the chat (message history, to-do list) */
.history-panel, .todo-panel { grid-column: 1 / -1; padding: 22px 24px; }
.history-panel h3, .todo-panel h3 { font-size: 1.05rem; margin-bottom: 6px; }
.history-panel #owner-history { margin-top: 12px; }
.todo-panel .todo-add { margin-top: 12px; max-width: 560px; flex-wrap: wrap; }

/* to-do title + description */
.todo-row label { align-items: flex-start; }
.todo-row input[type="checkbox"] { margin-top: 3px; }
.todo-text { display: flex; flex-direction: column; }
.todo-title { font-weight: 600; }
.todo-desc { font-size: 0.8rem; color: var(--ink-soft); font-weight: 400; }

/* uploading placeholder + spinner */
.msg-uploading { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--ink-soft); font-style: italic; }
.spinner {
  width: 14px; height: 14px; border: 2px solid var(--sky-200); border-top-color: var(--sky-500);
  border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* reactions under a message */
.reactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.reaction-chip {
  display: inline-flex; align-items: center; gap: 3px; cursor: pointer;
  background: var(--sky-050); border: 1px solid var(--sky-200); border-radius: 999px;
  padding: 1px 8px; font-size: 0.86rem; color: var(--ink); line-height: 1.7;
}
.reaction-chip:hover { background: var(--sky-100); }
.reaction-chip.mine { background: var(--sky-200); border-color: var(--sky-400); }
.reaction-chip span { font-size: 0.72rem; font-weight: 700; color: var(--ink-soft); }
.reaction-chip .chat-emoji { height: 1.1em; vertical-align: -0.2em; }
.msg-row.mine .reaction-chip { background: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.7); }
.msg-row.mine .reaction-chip.mine { background: #fff; }

/* reaction picker popover (appended to body) */
.reaction-picker {
  position: absolute; z-index: 150; display: flex; flex-wrap: wrap; gap: 4px;
  max-width: 244px; background: #fff; border: 1px solid var(--sky-200);
  border-radius: 14px; padding: 8px; box-shadow: var(--shadow-hover);
}
.reaction-picker button {
  background: none; border: none; cursor: pointer; font-size: 1.15rem;
  line-height: 1; padding: 4px; border-radius: 8px;
}
.reaction-picker button:hover { background: var(--sky-100); }
.reaction-picker .chat-emoji { height: 1.35em; }

/* ---- DM search ---- */
.conv-search {
  width: 100%; font-family: var(--font-body); font-size: 0.88rem;
  border: 1.5px solid var(--sky-200); border-radius: 999px;
  padding: 8px 14px; background: var(--sky-050); color: var(--ink);
  margin-bottom: 10px;
}
.conv-search:focus { outline: none; border-color: var(--sky-400); background: #fff; }

/* ---- grouped image gallery (WhatsApp-style bubble) ---- */
.msg-gallery { display: grid; gap: 4px; margin-top: 4px; max-width: 240px; border-radius: 12px; overflow: hidden; }
.msg-gallery.g2, .msg-gallery.gmulti { grid-template-columns: 1fr 1fr; }
.msg-gallery .msg-image-link { display: block; }
.msg-gallery .msg-image { width: 100%; margin: 0; border-radius: 0; }
.msg-gallery.g1 .msg-image { width: 220px; height: auto; }
.msg-gallery.g2 .msg-image, .msg-gallery.gmulti .msg-image { height: 110px; object-fit: cover; }
.msg-gallery + .msg-text { margin-top: 6px; }

/* ---- Discord-like hover toolbar icons ---- */
.msg-actions button { display: grid; place-items: center; }
.msg-actions button svg { width: 16px; height: 16px; }
.msg-actions button.is-active { color: var(--peach-deep); }
.msg-actions button.danger:hover { background: #ffe0e0; color: #c0392b; }

/* ---- clickable names ---- */
.msg-name.clickable { cursor: pointer; }
.msg-name.clickable:hover { text-decoration: underline; }

/* ---- profile card modal ---- */
.profile-modal {
  position: fixed; inset: 0; z-index: 160;
  background: rgba(47, 74, 99, 0.45);
  display: grid; place-items: center; padding: 20px;
}
.profile-card {
  width: min(340px, 94vw); padding: 0 0 22px; overflow: hidden; position: relative;
}
.profile-card:hover { transform: none; box-shadow: var(--shadow-soft); }
.profile-card-banner {
  height: 110px;
  background: linear-gradient(120deg, var(--sky-300), var(--peach-glow));
  background-size: cover; background-position: center;
}
.profile-card-avatar {
  width: 76px; height: 76px; border-radius: 50%; object-fit: cover;
  border: 4px solid #fff; box-shadow: var(--shadow-soft);
  margin: -38px 0 0 20px; position: relative;
}
.profile-card-body { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 3px; }
.profile-card-body strong { font-family: var(--font-display); font-size: 1.15rem; }
.profile-card-role { font-size: 0.78rem; color: var(--sky-500); font-weight: 700; }
.profile-card-desc { font-size: 0.9rem; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; margin-top: 6px; }
.profile-card-close {
  position: absolute; top: 10px; right: 12px; z-index: 2;
  width: 28px; height: 28px; border: none; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.85); color: var(--ink); font-size: 0.85rem;
}
.profile-card-close:hover { background: #fff; }

/* ---- message history split: deleted | edited ---- */
.history-split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.history-col h4 { font-size: 0.95rem; margin-bottom: 2px; }
.history-col .hint { margin-bottom: 10px; }
@media (max-width: 760px) { .history-split { grid-template-columns: 1fr; } }
.edit-line { font-size: 0.84rem; word-break: break-word; white-space: pre-wrap; margin-top: 3px; }
.edit-original { color: var(--ink-soft); }
.edit-now { color: var(--ink); }
.edit-label {
  display: inline-block; font-size: 0.62rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.4px; margin-right: 7px; padding: 1px 7px; border-radius: 999px;
}
.edit-original .edit-label { background: #ffe0e0; color: #c0392b; }
.edit-now .edit-label { background: #d6f2e3; color: #1e7a4d; }

/* ---- multi-line composer (Enter sends, Shift+Enter = new line) ---- */
.chat-composer .composer-input {
  flex: 1; min-width: 0; font-family: var(--font-body); font-size: 1rem;
  border: 1.5px solid var(--sky-200); border-radius: 20px;
  padding: 11px 18px; background: var(--sky-050); color: var(--ink);
  resize: none; max-height: 120px; overflow-y: auto; line-height: 1.4;
}
.chat-composer .composer-input:focus { outline: none; border-color: var(--sky-400); background: #fff; }

/* ---- staged attachments (wait in the composer until Send) ---- */
.attach-strip {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 16px 0; border-top: 1px solid var(--sky-100); background: #fff;
}
.attach-item {
  position: relative; display: inline-flex; align-items: center;
  background: var(--sky-050); border: 1px solid var(--sky-200); border-radius: 10px;
  overflow: visible;
}
.attach-item img {
  width: 58px; height: 58px; object-fit: cover; border-radius: 9px; display: block;
}
.attach-file-name {
  max-width: 150px; padding: 8px 12px; font-size: 0.78rem; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.attach-remove {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  border: none; border-radius: 999px; cursor: pointer; font-size: 0.68rem;
  background: var(--ink); color: #fff; line-height: 1; box-shadow: var(--shadow-soft);
}
.attach-remove:hover { background: #c0392b; }

/* ---- to-do pin ---- */
.todo-actions { display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; }
.todo-pin {
  background: none; border: none; cursor: pointer; padding: 3px;
  border-radius: 8px; color: var(--ink-soft); display: grid; place-items: center;
}
.todo-pin svg { width: 15px; height: 15px; }
.todo-pin:hover { background: var(--sky-100); color: var(--ink); }
.todo-pin.is-active { color: var(--peach-deep); }
.todo-row.pinned { background: var(--cream); border-radius: 10px; padding-left: 8px; padding-right: 8px; }
.todo-row .msg-pin-tag { font-size: 0.72rem; }

/* ---- unread badges (owner inbox) ---- */
.unread-badge {
  flex-shrink: 0; min-width: 19px; height: 19px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #e74c3c; color: #fff; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700; line-height: 1;
}
.notif-btn { width: 100%; margin-bottom: 10px; justify-content: center; }
.fab-badge {
  position: absolute; bottom: -6px; right: -6px;
  min-width: 22px; height: 22px; padding: 0 5px;
  display: grid; place-items: center;
  background: #e74c3c; color: #fff; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; border: 2px solid #fff;
  box-shadow: var(--shadow-soft);
}

/* ---- fullscreen chat ---- */
.chat-fs-btn {
  margin-left: auto; flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
  border: none; cursor: pointer; display: grid; place-items: center;
  background: var(--sky-100); color: var(--sky-500); transition: background 0.2s, color 0.2s;
}
.chat-fs-btn:hover { background: var(--sky-200); color: var(--ink); }
.chat-fs-btn svg { width: 16px; height: 16px; }
.chat-head-actions .chat-fs-btn { margin-left: 4px; }

.chat-window.fullscreen {
  position: fixed; inset: 12px; z-index: 100; min-height: 0;
}
.chat-window.fullscreen .chat-messages { max-height: none; }
body.chat-fs-open { overflow: hidden; }

/* ---- portfolio: owner add-piece form + remove buttons ---- */
.portfolio-add { max-width: 720px; margin: 0 auto 34px; padding: 24px 26px; }
.portfolio-add:hover { transform: none; box-shadow: var(--shadow-soft); }
.portfolio-add h3 { margin-bottom: 2px; }
.portfolio-add form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.portfolio-add input[type="text"] {
  flex: 1 1 160px; font-family: var(--font-body); font-size: 0.95rem;
  border: 1.5px solid var(--sky-200); border-radius: 12px;
  padding: 10px 14px; background: var(--sky-050); color: var(--ink);
}
.portfolio-add input[type="text"]:focus { outline: none; border-color: var(--sky-400); background: #fff; }
.portfolio-add .form-msg { text-align: left; margin-top: 8px; }

.gallery-item { position: relative; }
.piece-del {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 28px; height: 28px; border: none; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, 0.9); color: #c0392b; font-size: 0.85rem;
  box-shadow: var(--shadow-soft);
}
.piece-del:hover { background: #ffe0e0; }

/* ---- "Request this tier" popup (pricing page) ---- */
.tier-modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(47, 74, 99, 0.45);
  display: grid; place-items: center; padding: 20px;
}
.tier-card {
  width: min(400px, 94vw); padding: 30px 28px; position: relative; text-align: center;
}
.tier-card:hover { transform: none; box-shadow: var(--shadow-soft); }
.tier-card h3 { font-size: 1.3rem; margin-bottom: 4px; }
.tier-card > p { color: var(--ink-soft); margin-bottom: 18px; }
.tier-options { display: flex; flex-direction: column; gap: 10px; }
.tier-options .btn { justify-content: center; }
.tier-close {
  position: absolute; top: 12px; right: 14px;
  width: 28px; height: 28px; border: none; border-radius: 999px; cursor: pointer;
  background: var(--sky-100); color: var(--ink); font-size: 0.85rem;
}
.tier-close:hover { background: var(--sky-200); }
.tier-card .hint { margin-top: 14px; }

/* ---- profile page banner ---- */
.profile-banner {
  height: 110px; border-radius: 14px; margin-bottom: 6px;
  background: linear-gradient(120deg, var(--sky-300), var(--peach-glow));
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px;
}
.banner-btn { background: rgba(255, 255, 255, 0.9); }

.history-item {
  background: var(--sky-050); border: 1px solid var(--sky-200); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 8px; font-size: 0.84rem;
}
.history-item .history-meta { color: var(--ink-soft); font-size: 0.72rem; margin-top: 4px; }
.history-item .history-text { color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.history-item.restorable { display: flex; flex-direction: column; gap: 6px; }
.history-restore { align-self: flex-start; }
.msg-flash { animation: msgFlash 1.4s ease; }
@keyframes msgFlash { 0%, 40% { background: var(--peach-glow); } 100% { background: transparent; } }

.autoreply-box {
  width: 100%; font-family: var(--font-body); font-size: 0.9rem;
  border: 1.5px solid var(--sky-200); border-radius: 12px;
  padding: 10px 12px; background: #fff; resize: vertical; margin-bottom: 10px;
}
.autoreply-box:focus { outline: none; border-color: var(--sky-400); }

/* ---- Customer layout ---- */
.chat-customer { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }

/* ---- Owner layout ---- */
.chat-owner { display: grid; grid-template-columns: 260px 1fr 320px; gap: 18px; align-items: start; }
.conv-list { padding: 18px 14px; max-height: 78vh; overflow-y: auto; }
.conv-list h3, .order-panel h3 { font-size: 1.05rem; margin-bottom: 12px; }
.conv-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 9px 10px; border-radius: 12px; transition: background 0.2s;
  font-family: var(--font-body);
}
.conv-item:hover { background: var(--sky-100); }
.conv-item.is-active { background: var(--sky-200); }
.conv-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.conv-name { flex: 1; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.pin-dot { font-size: 0.8rem; }
.ban-tag {
  background: #ffe0e0; color: #c0392b; font-size: 0.68rem;
  padding: 1px 6px; border-radius: 999px; font-weight: 700;
}

/* ---- Order + todo panel ---- */
.order-panel { padding: 20px 18px; max-height: 78vh; overflow-y: auto; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-section { margin-bottom: 4px; }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-danger { background: #f4b6ae; color: #7a271b; box-shadow: var(--shadow-soft); }
.btn-danger:hover { background: #ef9a8f; }

.order-card {
  background: var(--sky-050); border: 1px solid var(--sky-200);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.order-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.order-card p { font-size: 0.88rem; color: var(--ink-soft); }
.order-meta { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--ink-soft); }
.order-card.editable input, .order-card.editable textarea, .order-card.editable select {
  font-family: var(--font-body); border: 1.5px solid var(--sky-200);
  border-radius: 10px; padding: 8px 10px; background: #fff; font-size: 0.9rem; width: 100%;
}
.order-title { font-weight: 700; }
.order-row { display: flex; gap: 10px; }
.order-row label { flex: 1; font-size: 0.78rem; color: var(--ink-soft); gap: 4px; }
.order-actions { justify-content: space-between; align-items: center; margin-top: 2px; }

.badge {
  font-size: 0.72rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap;
}
.badge-ok { background: #d6f2e3; color: #1e7a4d; }
.badge-warn { background: #fdeecb; color: #a5730c; }
.badge-muted { background: var(--sky-200); color: var(--ink-soft); }
.badge-hot { background: #ffd7c7; color: #b5401d; }

.todo-add { display: flex; gap: 8px; margin-bottom: 12px; }
.todo-add input {
  flex: 1; font-family: var(--font-body); border: 1.5px solid var(--sky-200);
  border-radius: 10px; padding: 8px 12px; background: #fff; font-size: 0.9rem;
}
.todo-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--sky-100);
}
.todo-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 500; font-size: 0.92rem; }
.todo-row.done span { text-decoration: line-through; color: var(--ink-soft); }
.todo-del { font-size: 0.9rem; }

/* ---- Chat responsive ----
   The 3-column owner view needs a wide screen. Below ~1080px the Orders/side
   panel drops to full width UNDER the chat so the chat column keeps its room;
   below ~760px everything stacks into one column. */
@media (max-width: 1080px) {
  .chat-owner { grid-template-columns: 240px minmax(0, 1fr); }
  .chat-owner .order-panel { grid-column: 1 / -1; max-height: none; }
}
@media (max-width: 760px) {
  .chat-owner { grid-template-columns: 1fr; }
  .chat-customer { grid-template-columns: 1fr; }
  .conv-list, .order-panel { max-height: none; }
}

/* --------------------------------------------------------------------------
   Vouches wall
   -------------------------------------------------------------------------- */
.vouch-hero { text-align: center; padding-top: 120px; }
.vouch-hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
.vouch-hero > p { color: var(--ink-soft); max-width: 560px; margin: 8px auto 0; }

.vouch-summary {
  display: inline-flex; align-items: center; gap: 16px; margin-top: 22px;
  background: #fff; border-radius: var(--radius-md);
  padding: 16px 26px; box-shadow: var(--shadow-soft);
}
.vouch-avg { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--ink); line-height: 1; }
.vouch-avg-stars { color: var(--peach-deep); font-size: 1.15rem; letter-spacing: 2px; }
.vouch-count { color: var(--ink-soft); font-size: 0.86rem; margin-top: 2px; text-align: left; }

/* ---- Form ---- */
.vouch-form-section, .vouch-wall-section { max-width: 720px; margin: 0 auto; }
.vouch-signin { text-align: center; padding: 32px; }
.vouch-signin .btn { margin-top: 16px; }
.vouch-form { padding: 26px 28px; margin-top: 26px; }
.vouch-form h2 { font-size: 1.3rem; }

.star-picker { display: flex; gap: 4px; margin: 14px 0; }
.star-btn {
  background: none; border: none; cursor: pointer; padding: 2px;
  font-size: 2rem; line-height: 1; color: var(--sky-300);
  transition: transform 0.12s, color 0.12s;
}
.star-btn:hover { transform: scale(1.15); }
.star-btn.is-on { color: var(--peach-deep); }

.vouch-textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  border: 1.5px solid var(--sky-200); border-radius: 12px;
  padding: 11px 14px; background: var(--sky-050); color: var(--ink);
  resize: vertical; transition: border 0.2s, background 0.2s;
}
.vouch-textarea:focus { outline: none; border-color: var(--sky-400); background: #fff; }
.vouch-form-actions { display: flex; align-items: center; gap: 16px; margin-top: 14px; flex-wrap: wrap; }

/* ---- Wall ---- */
.vouch-wall {
  margin-top: 30px;
  columns: 2; column-gap: 20px;
}
.vouch-card {
  break-inside: avoid; margin-bottom: 20px; padding: 20px 22px;
  display: inline-block; width: 100%;
}
.vouch-card:hover { transform: none; box-shadow: var(--shadow-soft); }
.vouch-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.vouch-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: var(--shadow-soft); }
.vouch-who { flex: 1; min-width: 0; }
.vouch-who strong { display: block; font-family: var(--font-display); font-size: 0.98rem; }
.vouch-you { color: var(--sky-500); font-weight: 600; font-size: 0.8rem; }
.vouch-date { color: var(--ink-soft); font-size: 0.78rem; }
.vouch-stars { color: var(--peach-deep); font-size: 1rem; letter-spacing: 1px; white-space: nowrap; }
.vouch-comment { color: var(--ink); font-size: 0.95rem; white-space: pre-wrap; word-break: break-word; }
.vouch-del { margin-top: 10px; padding: 2px; font-size: 0.82rem; }

@media (max-width: 620px) {
  .vouch-wall { columns: 1; }
  .vouch-hero { padding-top: 110px; }
}

