/* OneAppleFall · Is This Photo Real? — rendered inside a shadow root */
#pc {
  --paper: #FFFFFF;
  --sheet: #FFFFFF;
  --ink: #15172b;
  --muted: #5d6077;
  --line: #e6e5f3;
  --loupe: #4f46e5;
  --loupe-ink: #FFFFFF;
  --safelight: #B3261E;
  --amber: #8F5B00;
  --film: #2B6E52;
  --neutral: #4B5868;
  --tint-safelight: #FBE9E7;
  --tint-amber: #FFF3DC;
  --tint-film: #E3F2EA;
  --tint-neutral: #eef2ff;
  --focus: #7c3aed;
  --serif: 'Clash Display', 'DM Sans', system-ui, sans-serif;
  --sans: 'DM Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#pc, #pc * { box-sizing: border-box; }
#pc {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  padding: 0 16px 64px;
}
#pc .wrap { max-width: 1120px; margin: 0 auto; }
#pc a { color: var(--loupe); text-underline-offset: 2px; }
#pc :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
#pc button, #pc input, #pc select { font: inherit; color: inherit; }
#pc .visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The light table: drop zone and viewer share crop marks */
#pc .table {
  position: relative;
  background: var(--sheet);
  border-radius: 6px;
  padding: 22px;
}
#pc .marks { position: absolute; inset: 8px; pointer-events: none; color: var(--muted); }
#pc .marks svg { position: absolute; width: 18px; height: 18px; }
#pc .marks .tl { top: 0; left: 0; }
#pc .marks .tr { top: 0; right: 0; transform: scaleX(-1); }
#pc .marks .bl { bottom: 0; left: 0; transform: scaleY(-1); }
#pc .marks .br { bottom: 0; right: 0; transform: scale(-1, -1); }

#pc .drop {
  display: grid; justify-items: start; gap: 12px;
  padding: 28px 18px;
  border: 2px dashed var(--line);
  border-radius: 4px;
  transition: border-color .15s, background-color .15s;
}
#pc .drop.is-over { border-color: var(--loupe); background: var(--tint-neutral); }
#pc .drop h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.2; margin: 0; }
#pc .drop p { margin: 0; color: var(--muted); font-size: 15px; }
#pc .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border-radius: 999px; border: 1.5px solid var(--loupe);
  background: var(--loupe); color: var(--loupe-ink);
  font-weight: 600; font-size: 16px; cursor: pointer; text-decoration: none;
}
#pc .btn:hover { filter: brightness(1.08); }
#pc .btn.ghost { background: transparent; color: var(--loupe); }
#pc .btn.small { min-height: 38px; padding: 6px 14px; font-size: 15px; }
#pc .btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
#pc .drop .privacy { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--film); }
#pc .error { color: var(--safelight); font-weight: 600; font-size: 15px; margin: 0; }

/* Results */
#pc .results {
  display: none; margin-top: 36px; gap: 24px 28px; scroll-margin-top: 16px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "verdict" "viewer" "findings";
}
#pc .results.is-on { display: grid; }
#pc .results .verdict { grid-area: verdict; }
#pc .results .viewer-col { grid-area: viewer; }
#pc .results .findings-col { grid-area: findings; }
#pc .findings-col h3.first { margin-top: 4px; }
@media (min-width: 960px) {
  #pc .results {
    grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
    grid-template-rows: auto 1fr;
    grid-template-areas: "viewer verdict" "viewer findings";
    align-items: start;
  }
  #pc .results .viewer-col { position: sticky; top: 16px; }
}
#pc .viewer {
  position: relative; overflow: hidden; border-radius: 3px;
  background: repeating-conic-gradient(var(--tint-neutral) 0% 25%, var(--sheet) 0% 50%) 50% / 20px 20px;
  touch-action: pan-y;
}
#pc .viewer img, #pc .viewer canvas { display: block; width: 100%; height: auto; }
#pc .viewer canvas { position: absolute; inset: 0; height: 100%; clip-path: inset(0 0 0 50%); }
#pc .viewer .split { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: none; }
#pc .viewer .split::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.4);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M13 11l-6 6 6 6M21 11l6 6-6 6' fill='none' stroke='%2317202B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
#pc .viewer input[type=range].split-range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize;
}
#pc .viewer.no-ela canvas, #pc .viewer.no-ela .split, #pc .viewer.no-ela .split-range { display: none; }
#pc .viewer .nopreview { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 15px; }
#pc .split-legend { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: 8px; }
#pc .ela-panel { margin-top: 18px; font-size: 15px; color: var(--muted); }
#pc .ela-panel label { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 600; }
#pc .ela-panel input[type=range] { flex: 1; accent-color: var(--loupe); }
#pc .ela-panel p { margin: 8px 0 0; }
#pc .file-line { font-size: 14px; color: var(--muted); margin: 10px 0 0; overflow-wrap: anywhere; }

/* Verdict */
#pc .verdict { border-left: 6px solid var(--neutral); background: var(--tint-neutral); padding: 18px 20px; border-radius: 0 6px 6px 0; }
#pc .verdict[data-tone=ai] { border-color: var(--safelight); background: var(--tint-safelight); }
#pc .verdict[data-tone=edit] { border-color: var(--amber); background: var(--tint-amber); }
#pc .verdict[data-tone=camera] { border-color: var(--film); background: var(--tint-film); }
#pc .verdict h2 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.15; margin: 0 0 8px; }
#pc .verdict p { margin: 0; }
#pc .verdict .caveat { margin-top: 10px; font-size: 15px; color: var(--muted); }

#pc h3 { font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.25; margin: 30px 0 10px; }
#pc .signals { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
#pc .signals li { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
#pc .signals li:last-child { border-bottom: 0; }
#pc .tag { align-self: start; justify-self: start; font-size: 13px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--tint-neutral); color: var(--neutral); white-space: nowrap; }
#pc .tag[data-k=ai] { background: var(--tint-safelight); color: var(--safelight); }
#pc .tag[data-k=edit] { background: var(--tint-amber); color: var(--amber); }
#pc .tag[data-k=camera] { background: var(--tint-film); color: var(--film); }
#pc .tag[data-k=privacy] { background: var(--tint-amber); color: var(--amber); }
#pc .signals b { display: block; font-weight: 650; }
#pc .signals span.d { display: block; color: var(--muted); font-size: 15px; overflow-wrap: anywhere; }

#pc .callout { margin-top: 18px; padding: 16px 18px; border-radius: 6px; background: var(--sheet); border: 1.5px solid var(--amber); }
#pc .callout h4 { margin: 0 0 6px; font-size: 17px; }
#pc .callout p { margin: 0 0 12px; font-size: 15px; color: var(--muted); }
#pc .row-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

#pc .thumbbox { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; align-items: start; margin-top: 8px; }
#pc .thumbbox img { width: 120px; height: auto; border-radius: 3px; border: 1px solid var(--line); background: var(--sheet); }
#pc .thumbbox p { margin: 0; font-size: 15px; color: var(--muted); }

#pc details.meta { border-top: 1px solid var(--line); }
#pc details.meta:last-of-type { border-bottom: 1px solid var(--line); }
#pc details.meta summary { cursor: pointer; padding: 12px 0; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
#pc details.meta summary::-webkit-details-marker { display: none; }
#pc details.meta summary::after { content: "+"; font-weight: 400; font-size: 22px; line-height: 1; color: var(--muted); }
#pc details.meta[open] summary::after { content: "\2212"; }
#pc details.meta summary .count { color: var(--muted); font-weight: 400; margin-left: auto; }
#pc dl.kv { margin: 0 0 14px; display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr); gap: 6px 14px; font-size: 15px; }
#pc dl.kv dt { color: var(--muted); }
#pc dl.kv dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
#pc pre.prompt { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--sans); font-size: 14px; background: var(--tint-neutral); padding: 12px; border-radius: 4px; margin: 0 0 14px; max-height: 260px; overflow: auto; }

/* Content sections */
#pc .section { margin-top: 72px; display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { #pc .section { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 48px; } }
#pc .section > header h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 4.6vw, 40px); line-height: 1.1; margin: 0 0 12px; }
#pc .section > header p { margin: 0; color: var(--muted); max-width: 34em; }

#pc .engines { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
#pc .engine { display: grid; gap: 2px; padding: 14px 16px; background: var(--sheet); border-radius: 6px; text-decoration: none; color: var(--ink); border: 1.5px solid transparent; }
#pc .engine:hover { border-color: var(--loupe); }
#pc .engine b { font-weight: 650; }
#pc .engine span { font-size: 14px; color: var(--muted); }
#pc .urlform { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
#pc .urlform input { flex: 1 1 240px; min-height: 44px; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--sheet); }
#pc .tip { font-size: 15px; color: var(--muted); margin: 14px 0 0; }
#pc .status { font-size: 15px; color: var(--film); min-height: 1.4em; margin: 10px 0 0; }

#pc .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
#pc .chip { min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--sheet); cursor: pointer; font-size: 15px; }
#pc .chip[aria-pressed=true] { border-color: var(--loupe); background: var(--loupe); color: var(--loupe-ink); font-weight: 600; }
#pc .checklist { list-style: none; margin: 0; padding: 0; background: var(--sheet); border-radius: 6px; }
#pc .checklist li { border-bottom: 1px solid var(--line); }
#pc .checklist li:last-child { border-bottom: 0; }
#pc .checklist label { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; padding: 14px 16px; cursor: pointer; }
#pc .checklist input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--film); }
#pc .checklist b { display: block; font-weight: 650; }
#pc .checklist span { display: block; font-size: 15px; color: var(--muted); }
#pc .checklist input:checked + div b { text-decoration: line-through; text-decoration-color: var(--film); }
#pc .progress { font-size: 15px; color: var(--muted); margin-top: 12px; }

#pc .tells { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 28px; margin: 0; padding: 0; list-style: none; }
#pc .tells svg { width: 40px; height: 40px; color: var(--loupe); margin-bottom: 6px; }
#pc .tells b { display: block; font-weight: 650; margin-bottom: 2px; }
#pc .tells p { margin: 0; font-size: 15px; color: var(--muted); }

#pc .faq details { border-top: 1px solid var(--line); padding: 2px 0; }
#pc .faq details:last-child { border-bottom: 1px solid var(--line); }
#pc .faq summary { cursor: pointer; padding: 14px 0; font-weight: 650; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
#pc .faq summary::-webkit-details-marker { display: none; }
#pc .faq summary::after { content: "+"; font-weight: 400; font-size: 24px; line-height: 1; color: var(--muted); }
#pc .faq details[open] summary::after { content: "\2212"; }
#pc .faq details p { margin: 0 0 16px; color: var(--muted); max-width: 40em; }

#pc .foot { margin-top: 72px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
#pc .foot p { margin: 0 0 8px; max-width: 48em; }

#pc .loading { display: none; align-items: center; gap: 10px; font-size: 15px; color: var(--muted); }
#pc .loading.is-on { display: flex; }
#pc .spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--loupe); animation: pc-spin .8s linear infinite; }
@keyframes pc-spin { to { transform: rotate(360deg); } }
#pc .results.is-on .reveal { animation: pc-develop .6s ease-out both; }
@keyframes pc-develop { from { opacity: 0; filter: brightness(1.8) contrast(.6); } to { opacity: 1; filter: none; } }
@media (prefers-reduced-motion: reduce) {
  #pc *, #pc *::before, #pc *::after { animation: none !important; transition: none !important; }
}
@media (max-width: 520px) {
  #pc { font-size: 16px; }
  #pc .table { padding: 16px; }
  #pc .signals li { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  #pc dl.kv { grid-template-columns: minmax(0, 1fr); gap: 0 0; }
  #pc dl.kv dd { margin-bottom: 8px; }
  #pc .thumbbox { grid-template-columns: 88px minmax(0, 1fr); }
  #pc .thumbbox img { width: 88px; }
}

/* ── Colourful skin (matches the AI Image Upscaler) ─────────────────────────────────────────────── */
#pc { padding: 0; border-radius: 26px; overflow: hidden; border: 1px solid #e9e5fb; box-shadow: 0 30px 70px -40px rgba(30,27,75,.55); margin: 6px 0 36px; }
#pc .wrap { max-width: none; }
#pc .pc-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; padding: 16px 22px; color: #fff;
  background: radial-gradient(600px 160px at 0% 0%, rgba(236,72,153,.6), transparent 70%), radial-gradient(500px 160px at 100% 100%, rgba(6,182,212,.45), transparent 70%), #0d1226; }
#pc .pc-title { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-weight: 700; font-size: 18px; letter-spacing: -.01em; }
#pc .pc-logo { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #ec4899, #7c3aed); }
#pc .pc-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
#pc .pc-badges li { font-size: 12.5px; font-weight: 700; padding: 5px 11px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); }
#pc .pc-badges li::before { content: '\2713  '; color: #6ee7b7; }
#pc .pc-body { padding: 22px; background: linear-gradient(180deg, #faf9ff, #fff 240px); }
#pc .table { border-radius: 20px; border: 1px solid #ecebf7; box-shadow: 0 18px 40px -28px rgba(30,27,75,.5); }
#pc .marks { color: #c4b5fd; }
#pc .drop { border: 2px dashed #c7c2f0; border-radius: 16px; justify-items: center; text-align: center; padding: 34px 18px;
  background: radial-gradient(500px 200px at 50% 0%, rgba(124,58,237,.06), transparent 70%); }
#pc .drop.is-over { border-color: #7c3aed; background: #f5f3ff; }
#pc .drop-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; color: #fff;
  background: linear-gradient(135deg, #ec4899, #7c3aed 55%, #4f46e5); box-shadow: 0 12px 26px -12px rgba(124,58,237,.9); }
#pc .drop h2 { font-size: 26px; }
#pc .drop .privacy { color: #059669; font-weight: 700; }
#pc .btn { border: 0; background: linear-gradient(135deg, #4f46e5, #7c3aed 60%, #a855f7); color: #fff; box-shadow: 0 12px 24px -12px rgba(124,58,237,.95); font-weight: 800; }
#pc .btn:hover { filter: none; transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(236,72,153,.85); }
#pc .btn.ghost { background: #fff; color: #4f46e5; border: 1.5px solid #c7c2f0; box-shadow: none; }
#pc .btn.ghost:hover { border-color: #7c3aed; color: #7c3aed; }
#pc .samples { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
#pc .samples span { width: 100%; font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
#pc .sample { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid #e2def5; background: #fff;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; color: var(--ink); }
#pc .sample:hover { border-color: #a78bfa; }
#pc .sample img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
#pc .verdict { border-left: 0; border-radius: 20px; padding: 20px 22px; position: relative; overflow: hidden; box-shadow: 0 18px 40px -30px rgba(30,27,75,.6); }
#pc .verdict::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, #64748b, #94a3b8); }
#pc .verdict[data-tone=ai]::before { background: linear-gradient(180deg, #ef4444, #ec4899); }
#pc .verdict[data-tone=edit]::before { background: linear-gradient(180deg, #f59e0b, #f97316); }
#pc .verdict[data-tone=camera]::before { background: linear-gradient(180deg, #10b981, #059669); }
#pc .verdict h2 { font-size: 27px; }
#pc .tag { padding: 3px 10px; }
#pc details.meta summary::after { color: #7c3aed; }
#pc .callout { border: 0; border-radius: 16px; background: linear-gradient(135deg, #fff7ed, #fef3c7); box-shadow: 0 14px 30px -24px rgba(249,115,22,.7); }
#pc .viewer { border-radius: 14px; }
#pc .ela-panel input[type=range] { accent-color: #7c3aed; }
/* Reverse search and story checklists: colourful panels */
#pc .section { margin-top: 26px; padding: 26px; border-radius: 22px; }
#pc .section#search { background: linear-gradient(135deg, #eef2ff, #faf5ff); }
#pc .section#story { background: linear-gradient(135deg, #fff7ed, #fdf2f8); }
#pc .section > header h2 { font-size: clamp(24px, 3vw, 32px); padding-bottom: 12px;
  background: linear-gradient(90deg, #4f46e5, #ec4899, #f97316) left bottom / 56px 4px no-repeat; }
#pc .engine { position: relative; overflow: hidden; border: 0; border-radius: 16px; padding: 16px 16px 16px 20px; box-shadow: 0 14px 30px -24px rgba(30,27,75,.6); transition: transform .15s; }
#pc .engine::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: linear-gradient(180deg, #818cf8, #4f46e5); }
#pc .engine:nth-child(2)::before { background: linear-gradient(180deg, #f472b6, #db2777); }
#pc .engine:nth-child(3)::before { background: linear-gradient(180deg, #22d3ee, #0891b2); }
#pc .engine:nth-child(4)::before { background: linear-gradient(180deg, #fbbf24, #f97316); }
#pc .engine:hover { border: 0; transform: translateY(-2px); }
#pc .urlform input { border-color: #e2def5; }
#pc .chip { border-color: #e2def5; font-weight: 700; }
#pc .chip[aria-pressed=true] { border-color: transparent; background: linear-gradient(135deg, #ec4899, #f97316); color: #fff; }
#pc .checklist { border-radius: 18px; box-shadow: 0 14px 30px -24px rgba(30,27,75,.6); overflow: hidden; }
#pc .checklist input { accent-color: #10b981; }
#pc .status { color: #059669; }
@media (max-width: 640px) {
  #pc .pc-body { padding: 14px; }
  #pc .section { padding: 18px; }
  #pc .pc-badges li { font-size: 11.5px; }
}
