:root{--profile-ink:#182536;--profile-muted:#64748b;--profile-line:#e2e8f0}
html{scroll-behavior:smooth;scroll-padding-top:24px}
body{background:#f6f8fb;color:var(--profile-ink)}
.profile-intro{max-width:1180px;margin:32px auto 0;padding:0 16px}
.profile-breadcrumb{display:flex;gap:12px;font-size:13px;color:var(--profile-muted)}
.profile-breadcrumb a{text-decoration:none}
.profile-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 0}
.profile-heading h1{font-size:clamp(26px,4vw,38px);line-height:1.5;margin:4px 0;font-weight:800;overflow-wrap:anywhere}
.profile-heading p{margin:0;color:var(--profile-muted);font-size:14px}
.profile-heading .profile-kicker{font-size:12px;font-weight:700;letter-spacing:.3px}
.ownership-status{border:1px solid #cbd5e1;background:#edf1f5;color:#475569;padding:8px 16px;border-radius:30px;font-size:13px;font-weight:700;white-space:nowrap}
body[data-ownership="claimed"] .ownership-status{color:#166534;background:#f0fdf4;border-color:#bbf7d0}
.ownership-notice{background:#edf0f3;border:1px solid #cbd2da;border-right:4px solid #64748b;border-radius:16px;padding:20px 24px;color:#334155}
.ownership-notice strong{font-size:17px}.ownership-notice p{font-size:14px;margin:8px 0 12px;max-width:850px}
.ownership-notice a{font-weight:700;font-size:14px;text-underline-offset:5px}
.profile-navigation{display:flex;gap:8px;overflow-x:auto;padding:18px 0 4px;scrollbar-width:thin}
.profile-navigation a{flex-shrink:0;background:white;border:1px solid var(--profile-line);padding:9px 16px;border-radius:10px;text-decoration:none;font-size:13px;color:#475569}
.profile-navigation a:hover{border-color:#94a3b8;background:#f1f5f9}
.main-layout{gap:24px}.card,.comments-section{border-radius:18px;box-shadow:0 3px 16px #18253605;padding:26px;border:1px solid var(--profile-line)}
.section-heading h2,.comments-title{font-size:19px}.section-heading p{line-height:1.9}
.side-column .owner-claim-card{position:sticky;top:24px}
.shop-hero{border-radius:14px}.shop-hero-copy p{white-space:pre-line;overflow-wrap:anywhere;max-height:320px;overflow:auto}
.shop-row strong{overflow-wrap:anywhere;min-width:0}.shop-actions{flex-wrap:wrap}
.profile-categories{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.profile-categories span{padding:5px 12px;border-radius:30px;background:#f1f5f9;color:#475569;font-size:13px}
body[data-ownership="unknown"]{--page-accent:#475569;--page-tint:#f1f5f9;--page-border:#cbd5e1;background:#f3f4f6}
body[data-ownership="unknown"] .shop-hero,body[data-ownership="unknown"] .owner-claim-card{background:#f4f5f7;border-color:#d5dae1}
body[data-ownership="unknown"] .shop-eyebrow,body[data-ownership="unknown"] .shop-score,body[data-ownership="unknown"] .shop-actions a,body[data-ownership="unknown"] .owner-claim-button{background:#475569;color:#fff}
body[data-ownership="unknown"] .shop-score strong,body[data-ownership="unknown"] .shop-score span{color:#fff}
a:focus-visible,button:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #64748b;outline-offset:4px}
.comment-feedback{padding:12px 16px;background:#f1f5f9;border-radius:10px;color:#334155;margin:16px 0}
.comment-feedback:empty{display:none}.comments-pagination{display:flex;align-items:center;justify-content:center;gap:20px;margin-top:24px;font-size:14px}
.rating-input .star-label{position:relative;display:inline-flex}
.rating-input input[type="radio"]{display:block;position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.rating-input .star-label:focus-within{outline:3px solid #64748b;outline-offset:4px;border-radius:6px}
.comments-pagination a{padding:8px 16px;border:1px solid #cbd5e1;border-radius:10px;text-decoration:none}
@media(max-width:980px){.side-column{grid-row:1}.side-column .owner-claim-card{position:static}.owner-claim-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.main-layout{gap:0}}
@media(max-width:600px){.profile-intro{margin-top:20px}.profile-heading{align-items:flex-start;flex-direction:column;gap:12px;padding:20px 0}.ownership-notice{padding:16px}.ownership-notice strong{font-size:15px}.card,.comments-section{padding:18px;border-radius:14px}.main-layout{padding-left:12px;padding-right:12px}.profile-intro{padding:0 12px}.shop-grid{grid-template-columns:1fr}.shop-hero{gap:16px}.shop-score{min-width:72px}.profile-navigation a{padding:8px 12px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*::before,*::after{animation:none!important;transition:none!important}}

/* Small visual refinements for the standalone/PWA profile view. */
body {
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .08), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, #f3f6fb 55%, #eef3f9 100%);
}
.main-layout { padding-top: 8px; }
.card, .comments-section, .owner-claim-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover, .comments-section:hover, .owner-claim-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .09);
  border-color: #cbd5e1;
}
.profile-navigation a { box-shadow: 0 2px 8px rgba(15, 23, 42, .04); }
.profile-navigation a:hover { transform: translateY(-1px); }
.section-heading { position: relative; }
.section-heading h2::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 1.1em;
  margin-left: 9px;
  vertical-align: -0.16em;
  border-radius: 99px;
  background: linear-gradient(180deg, #2563eb, #38bdf8);
}

/* Dark mode: keep the profile readable when the PWA follows the device theme. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --profile-ink: #e5e7eb;
    --profile-muted: #a7b1c2;
    --profile-line: #334155;
    --color-text-primary: #e5e7eb;
    --color-text-secondary: #b7c1d1;
    --color-text-muted: #94a3b8;
    --color-border: #334155;
    --color-border-hover: #475569;
    --color-bg-base: #172033;
    --color-bg-subtle: #0f172a;
    --color-bg-muted: #243047;
    --color-primary-light: #1e3a66;
  }

  html, body,
  body[data-ownership="unknown"] {
    background: #0b1220 !important;
    color: #e5e7eb !important;
  }

  h1, h2, h3, h4, h5, h6,
  strong, b,
  .section-heading h2,
  .card-title,
  .profile-heading h1,
  .form-label,
  .comment-author-name,
  .faq-question,
  .claim-title {
    color: #f1f5f9 !important;
  }

  p, .section-heading p, .profile-heading p,
  .card-body, .claim-description, .comment-body,
  .faq-answer, .comment-date, .profile-breadcrumb,
  .nmd-subtitle, .nmd-header-meta {
    color: #b7c1d1 !important;
  }

  .card, .comments-section, .profile-navigation a,
  .ownership-notice, .nmd-header-card, .owner-claim-card,
  .shop-info-card, .faq-item, .comment-item,
  .form-input, .form-textarea, .form-select {
    background: #172033 !important;
    color: #e5e7eb !important;
    border-color: #334155 !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .24) !important;
  }

  .comment-item, .category-item, .tag-item,
  .profile-categories span, .comment-feedback,
  .profile-navigation a:hover {
    background: #243047 !important;
    color: #dbeafe !important;
    border-color: #475569 !important;
  }

  .profile-navigation a,
  .comments-pagination a,
  .ownership-status {
    color: #dbeafe !important;
    border-color: #475569 !important;
  }

  .ownership-status { background: #243047 !important; }
  .ownership-notice { color: #dbeafe !important; }
  .ownership-notice strong { color: #f8fafc !important; }
  .form-input::placeholder, .form-textarea::placeholder { color: #94a3b8; }
  .site-footer { background: #080d18 !important; }
  .nmd-header { --nmd-card-bg: #172033; --nmd-text: #f1f5f9; --nmd-text-muted: #b7c1d1; --nmd-border: #334155; }
  .nmd-header-card { color: #e5e7eb; }
}
