/* Nano Banana Pro prompts: YouMind's masonry gallery in the site's own clothes. The cards wear the price cards'
   spotlight ring (sections.css .tier) without its blurred halo, which would be too heavy on hundreds of cards. */
.pr-head { padding-top: calc(80px + clamp(48px, 7vw, 96px)); padding-bottom: 20px; border-top: 0; }
/* a search page: everything in the hero sits on the centre line, like YouMind's */
.pr-head .sec-in { max-width: 1400px; text-align: center; }
.pr-head .lede { margin-inline: auto; }
.pr-head h1 { margin: 0 0 14px; font: 700 clamp(36px, 5.4vw, 68px)/1.1 var(--ui-font); color: #fff; text-wrap: balance; }
.pr-head .lede { margin-bottom: 28px; }

/* the describe box: one big field, it searches as you type */
.pr-describe { display: flex; align-items: center; gap: 10px; max-width: 820px; margin: 0 auto; padding: 10px 10px 10px 22px; text-align: left;
  border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.04); transition: border-color .2s; }
.pr-describe:focus-within { border-color: rgba(182,156,255,.55); }
.pr-describe textarea { flex: 1; min-width: 0; height: 28px; min-height: 28px; max-height: 180px; padding: 0; resize: none; border: 0; outline: 0;
  background: none; color: #fff; font: 17px/1.5 var(--ui-font); }
.pr-describe textarea::placeholder { color: var(--ink-3); }
.pr-go { flex: none; min-height: 46px; padding: 0 22px; border: 0; border-radius: 14px; background: #fff; color: #0b0910;
  font: 600 15px/1 var(--ui-font); cursor: pointer; transition: background-color .2s, scale 160ms var(--ease-out); }
.pr-go:hover { background: #e6dcff; }
.pr-go:active { scale: .97; }
.pr-go:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.pr-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }

/* above the grid: how many are shown, and the order */
.pr-bar { max-width: 1400px; margin: 0 auto 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.pr-status { margin: 0; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.pr-sort { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink-3); }
.pr-sort span { margin-right: 6px; }
.pr-sortbtn { min-height: 34px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 500 14px/1 var(--ui-font); cursor: pointer; transition: background-color .2s, color .2s; }
.pr-sortbtn:hover { color: #fff; }
.pr-sortbtn[aria-pressed="true"] { background: rgba(255,255,255,.1); color: #fff; }
.pr-sortbtn:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.pr-sort.is-off { opacity: .45; }
.pr-top { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 20; min-height: 44px; padding: 0 18px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(7,6,11,.8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  color: #fff; font: 500 14px/1 var(--ui-font); cursor: pointer; }
.pr-top:hover { border-color: rgba(255,255,255,.35); }

.pr-list { padding-top: 8px; border-top: 0; }
.pr-grid { max-width: 1400px; margin: 0 auto; columns: 4 260px; column-gap: 16px; }          /* before the script runs */
.pr-grid.is-masonry { columns: auto; display: flex; align-items: flex-start; gap: 16px; }
.pr-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
#pr-more { height: 1px; }
.pr-credit { max-width: 1400px; margin: 48px auto 0; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.6; color: var(--ink-3); }
.pr-credit a { color: var(--ink-2); }

/* card */
.pc {
  --border: 1.5; --radius: 18; --size: 220; --base: 225; --spread: 55;
  --border-size: calc(var(--border) * 1px); --spotlight-size: calc(var(--size) * 1px);
  --hue: calc(var(--base) + var(--xp, 0) * var(--spread));
  position: relative; isolation: isolate; break-inside: avoid; margin: 0 0 16px;
  border: var(--border-size) solid rgba(255,255,255,.08); border-radius: calc(var(--radius) * 1px);
  background-color: rgba(255,255,255,.035);
  background-image: radial-gradient(var(--spotlight-size) var(--spotlight-size) at calc(var(--x, -9999) * 1px) calc(var(--y, -9999) * 1px),
                    hsl(var(--hue) 100% 70% / .08), transparent);
}
.pr-grid.is-masonry .pc { margin: 0; }
.pc::before, .pc::after {
  content: ''; position: absolute; inset: calc(var(--border-size) * -1); z-index: 3; pointer-events: none;
  border: var(--border-size) solid transparent; border-radius: calc(var(--radius) * 1px);
  background-origin: border-box; background-repeat: no-repeat;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
}
.pc::before { filter: brightness(2);
  background-image: radial-gradient(calc(var(--spotlight-size) * .75) calc(var(--spotlight-size) * .75) at calc(var(--x, -9999) * 1px) calc(var(--y, -9999) * 1px), hsl(var(--hue) 100% 50% / 1), transparent 100%); }
.pc::after {
  background-image: radial-gradient(calc(var(--spotlight-size) * .5) calc(var(--spotlight-size) * .5) at calc(var(--x, -9999) * 1px) calc(var(--y, -9999) * 1px), hsl(0 100% 100% / 1), transparent 100%); }
.pc-open { display: block; width: 100%; padding: 0; border: 0; background: #0d0b14; cursor: zoom-in; overflow: hidden;
  border-radius: calc(var(--radius) * 1px - var(--border-size)) calc(var(--radius) * 1px - var(--border-size)) 0 0; }
.pc-img { display: block; width: 100%; height: auto; transition: transform .6s var(--ease-out); }
.pc-open:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: -3px; }
.pc-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.pc-meta { margin: 0; font-size: 12.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-list .pc-title, .pr-modal h2 { margin: 0; font: 600 15.5px/1.4 var(--ui-font); color: #fff; text-wrap: balance; }
.pc-prompt { margin: 2px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pc-actions { display: flex; gap: 8px; margin-top: 8px; }
.pc-actions button { min-height: 34px; padding: 0 14px; border-radius: 999px; font: 500 13px/1 var(--ui-font); cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, scale 160ms var(--ease-out); }
.pc-copy { border: 1px solid rgba(255,255,255,.22); background: none; color: #fff; }
.pc-copy:hover { border-color: #fff; }
.pc-copy.done { background: #fff; color: #0b0910; border-color: #fff; }
.pc-more { border: 1px solid transparent; background: none; color: var(--ink-2); }
.pc-more:hover { color: #fff; }
.pc-actions button:active { scale: .96; }
.pc-actions button:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
@media (hover: hover) and (pointer: fine) { .pc:hover .pc-img { transform: scale(1.02); } }

/* detail */
.pr-modal { width: min(1120px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line);
  border-radius: 22px; background: #0d0b14; color: var(--ink); overflow: auto; }
.pr-modal::backdrop { background: rgba(4,3,8,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pr-modal[open] { animation: pm-in .28s var(--ease-out); }
@keyframes pm-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.pm-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 28px; padding: 28px; }
.pm-x { position: absolute; top: 12px; right: 12px; z-index: 2; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.08); color: #fff; font: 400 24px/1 var(--ui-font); cursor: pointer; }
.pm-x:hover { background: rgba(255,255,255,.16); }
.pm-x:focus-visible { outline: 2px solid var(--violet-hi); }
.pm-media { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pm-main { display: block; width: 100%; max-height: 64vh; object-fit: contain; border-radius: 14px; background: #07060b; }
.pm-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pm-thumbs button { width: 64px; height: 64px; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: none; cursor: pointer; opacity: .55; transition: opacity .2s, border-color .2s; }
.pm-thumbs button[aria-current="true"] { opacity: 1; border-color: #fff; }
.pm-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-text { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-right: 28px; }
.pr-modal h2 { font-size: clamp(20px, 2vw, 26px); line-height: 1.3; }
.pm-desc { margin: 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.pm-ref { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(182,156,255,.1); color: var(--ink); font-size: 14px; line-height: 1.55; }
.pm-prompt { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.03); }
.pm-prompt pre { margin: 0; max-height: 38vh; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font: 13.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); }
.pm-var { padding: 0 3px; border-radius: 4px; background: rgba(182,156,255,.18); color: #fff; }
.pm-copy { align-self: flex-start; }
.pm-copy.done { background: #e6dcff; }
.pm-credit { margin: 0; font-size: 13px; line-height: 1.6; color: var(--ink-3); }
.pm-credit a { color: var(--ink-2); }

@media (max-width: 860px) {
  .pm-in { grid-template-columns: 1fr; padding: 18px; gap: 18px; }
  .pm-text { padding-right: 0; }
  .pr-modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
}
@media (max-width: 600px) {
  .pr-describe { padding: 8px 8px 8px 14px; border-radius: 16px; }
  .pr-describe textarea { font-size: 16px; }
  /* categories: one row you swipe, instead of a wall of chips */
  .pr-cats { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin-inline: -20px; padding: 0 20px 4px; scrollbar-width: none; }
  .pr-cats::-webkit-scrollbar { display: none; }
  .pr-cats .news-chip { flex: none; }
  .pr-go { padding: 0 16px; }
  .pr-grid.is-masonry, .pr-col { gap: 10px; }
  .pc-body { padding: 10px 11px 12px; }
  .pr-list .pc-title { font-size: 14px; }
  .pc-prompt { -webkit-line-clamp: 3; font-size: 12.5px; }
  .pc-more { display: none; }
}
@media (prefers-reduced-motion: reduce) { .pc-img, .pr-go, .pc-actions button { transition: none; } .pr-modal[open] { animation: none; } }
