@tailwind base;
@tailwind components;
@tailwind utilities;

/*

@layer components {
  .btn-primary {
    @apply py-2 px-4 bg-blue-200;
  }
}

*/
@layer components {
  a {
    @apply text-blue-700 font-medium hover:text-blue-500 transition transition-colors active:text-blue-900;
  }
  .scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .scrollbar-hide::-webkit-scrollbar {
    display: none;
  }
}

/* PAGY TAILWIND STYLES (copied from gem/stylesheets/pagy.tailwind.css) */
@layer components { /* Or place outside if you prefer */

  /* Main Pagy navigation container */
  .pagy.nav { /* Targets <nav class="pagy nav"> */
    @apply isolate inline-flex -space-x-px rounded-md shadow-sm;
  }

  /* Generic style for all <a> tags within .pagy.nav that are NOT the gap indicator */
  .pagy.nav a:not(.gap) {
    @apply relative inline-flex items-center text-sm font-semibold ring-1 ring-inset ring-gray-300 focus:z-20 focus:outline-offset-0;
  }

  /* Clickable Page Number Links (not prev/next, not current, not gap) */
  .pagy.nav a[href]:not([aria-label="Previous"]):not([aria-label="Next"]):not(.current) {
    @apply px-4 py-2 text-gray-900 hover:bg-gray-50;
  }

  /* Current Page Link */
  /* Pagy uses <a class="current" aria-current="page" aria-disabled="true"> for the current page, which has no href */
  .pagy.nav a.current {
    @apply z-10 bg-blue-600 px-4 py-2 text-sm font-semibold text-white focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600;
    /* Ensure it doesn't get hover styles from more generic rules if they exist */
    @apply hover:bg-blue-600;
    cursor: default; /* It's the current page, typically not a link to itself */
  }

  /* Previous Link */
  .pagy.nav a[aria-label="Previous"] {
    @apply rounded-l-md px-2 py-2 text-gray-400;
  }
  .pagy.nav a[href][aria-label="Previous"] { /* Clickable Previous */
    @apply hover:bg-gray-50;
  }
  .pagy.nav a:not([href])[aria-label="Previous"] { /* Disabled Previous */
    @apply cursor-not-allowed;
    /* text-gray-400 is already applied by the more general rule above */
  }

  /* Next Link */
  .pagy.nav a[aria-label="Next"] {
    @apply rounded-r-md px-2 py-2 text-gray-400;
  }
  .pagy.nav a[href][aria-label="Next"] { /* Clickable Next */
    @apply hover:bg-gray-50;
  }
  .pagy.nav a:not([href])[aria-label="Next"] { /* Disabled Next */
    @apply cursor-not-allowed bg-gray-50;
    /* text-gray-400 is already applied by the more general rule above */
  }

  /* Gap Indicator (Pagy uses <a class="gap" role="link" aria-disabled="true">) */
  .pagy.nav a.gap {
    /* Mimic Tailwind UI's span for ellipsis */
    @apply relative inline-flex items-center px-4 py-2 text-sm font-semibold text-gray-700 ring-1 ring-inset ring-gray-300 focus:outline-offset-0;
    cursor: default;
    text-decoration: none !important; /* Ensure it doesn't look like a link */
    @apply hover:bg-transparent; /* No hover effect for gap */
  }

  /* --- Styles for other Pagy helpers, if you use them --- */
  .pagy label { /* For combo_nav_js and limit_selector_js */
    @apply inline-block whitespace-nowrap bg-gray-200 rounded-lg px-3 py-0.5;
  }
  .pagy label input { /* For combo_nav_js and limit_selector_js */
    @apply bg-gray-100 border-none rounded-md;
  }

}

/* Turbo loading state */
/*
  The following rule was too broad and caused spinners to always be visible.
  [data-turbo-loading] {
    @apply block;
  }
*/

/* Hide content while loading */
.turbo-loading [data-turbo-frame] > *:not([data-turbo-loading]),
[data-turbo-frame].turbo-loading > *:not([data-turbo-loading]) {
  @apply hidden;
}

/* Show loading spinner while loading */
.turbo-loading [data-turbo-frame] [data-turbo-loading],
[data-turbo-frame].turbo-loading [data-turbo-loading] {
  @apply block;
}

/* Ensure the frame itself shows loading state */
.turbo-loading,
[data-turbo-frame].turbo-loading {
  @apply relative;
}

/* Add a slight delay to prevent flickering on fast loads */
.turbo-loading [data-turbo-loading],
[data-turbo-frame].turbo-loading [data-turbo-loading] {
  @apply transition-opacity duration-150;
  animation: fadeIn 150ms ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Styles for Turbo Frame loading state, specifically when we manually add .turbo-loading to the frame */

/* Hide actual content when frame has .turbo-loading class */
turbo-frame.turbo-loading > *:not([data-turbo-loading]) {
  @apply hidden;
}

/* Show loading spinner when frame has .turbo-loading class */
turbo-frame.turbo-loading [data-turbo-loading] {
  @apply block; /* Overrides .hidden class on the spinner div */
  @apply transition-opacity duration-150; /* Apply fade-in animation */
  animation: fadeIn 150ms ease-in;
}

/* Keyframes for the fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Ensure the frame itself (if it's the one with .turbo-loading) is relatively positioned for absolute children if any */
/* This rule might be redundant if the spinner positioning doesn't require it, but good for completeness */
turbo-frame.turbo-loading {
  @apply relative;
}
/* QueuePanda design tokens — shared across the 11-page redesign batch.
 * Auto-bundled into application.css via require_tree.
 * OKLCH values are the source of truth; the hex on the same line is the
 * closest sRGB equivalent for email clients / very old browsers. */
:root {
  --paper:        oklch(97.5% 0.008 80);   /* #f8f4ec  warm off-white page bg */
  --paper-warm:   oklch(95%   0.012 80);   /* #f1ece0  card insets, banded surfaces */
  --paper-warmer: oklch(92%   0.018 80);   /* #e8e1cf */
  --prim:         oklch(15%   0.01 240);   /* #1a1f24  primary text + dark surfaces */
  --sec:          oklch(50%   0.01 240);   /* #6a7177 */
  --tert:         oklch(62%   0.008 240);  /* #8a9096 */
  --quiet:        oklch(75%   0.006 240);  /* #b3b8bd */
  --border:       oklch(91%   0.008 80);   /* #e6e1d6 */
  --hairline:     oklch(94%   0.006 80);   /* #efebe1 */
  --inset:        oklch(96%   0.01 80);    /* #f3eee4 */
  --accent:       oklch(48%   0.18 255);   /* #2f5fc7  primary CTA + active state */
  --accent-soft:  oklch(95%   0.04 255);   /* #e9edf9 */
  --accent-mid:   oklch(85%   0.08 255);   /* #bccdf0 */
  --gold:         oklch(75%   0.16 80);    /* #d6a13a  highlights, ratings */
  --gold-deep:    oklch(60%   0.16 70);    /* #a8742a */
  --green:        oklch(58%   0.18 145);   /* #2f9d5b  success / loved */
  --green-soft:   oklch(94%   0.05 145);   /* #e3f3e8 */
  --brick:        oklch(58%   0.18 30);    /* #c7563f */
  --brick-soft:   oklch(94%   0.05 30);    /* #f6e6e1 */
  --violet:       oklch(55%   0.17 290);   /* #7a51c0 */
  --violet-soft:  oklch(94%   0.04 290);   /* #ece5f6 */
  --dark:         oklch(13%   0.01 240);   /* #15191d  hero gradients, admin sidebar */
  --dark-2:       oklch(18%   0.012 240);  /* #21262b */
  --dark-3:       oklch(22%   0.012 240);  /* #2a3036 */
}

/* ─── Shared redesign primitives (ported from redesigns-shared.jsx) ───
 * Scoped under .qp so they never leak into the legacy pages that still
 * use plain Tailwind / scaffold styling. */
.qp { font-family: 'Outfit', system-ui, sans-serif; color: var(--prim); }
.qp .serif { font-family: 'Fraunces', Georgia, serif; font-optical-sizing: auto; letter-spacing: -0.02em; }
.qp .mono  { font-family: 'JetBrains Mono', ui-monospace, monospace; }

.qp-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 36px; background: #fff; border-bottom: 1px solid var(--border);
}
.qp-nav .left { display: flex; align-items: center; gap: 28px; }
.qp-nav .brand {
  display: flex; align-items: center; gap: 9px;
  font-family: 'Fraunces', Georgia, serif; font-weight: 800; font-size: 19px;
  letter-spacing: -0.6px; color: var(--prim); text-decoration: none;
}
.qp-nav .brand .panda {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--prim); color: var(--gold);
  display: grid; place-items: center; font-size: 14px; font-weight: 800;
}
.qp-nav .links { display: flex; gap: 22px; }
.qp-nav .links a { font-size: 13px; font-weight: 500; color: var(--sec); text-decoration: none; }
.qp-nav .links a.on { color: var(--prim); }
.qp-nav .right { display: flex; gap: 12px; align-items: center; }
.qp-nav .add {
  width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff;
  display: grid; place-items: center; font-size: 18px; font-weight: 700; text-decoration: none;
}
.qp-nav .kbd { font-size: 12px; color: var(--tert); }

.qp-av { border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; flex-shrink: 0; }

.qp-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 100px; font-size: 12px; font-weight: 600;
  background: var(--inset); color: var(--sec); border: 1px solid transparent;
}
.qp-pill.on { background: var(--prim); color: #fff; }
.qp-pill.accent { background: var(--accent-soft); color: var(--accent); }
.qp-pill.gold { background: oklch(94% 0.08 80); color: oklch(40% 0.14 70); }
.qp-pill.green { background: var(--green-soft); color: oklch(35% 0.14 145); }
.qp-pill.brick { background: var(--brick-soft); color: oklch(42% 0.16 30); }
.qp-pill.violet { background: var(--violet-soft); color: oklch(40% 0.16 290); }

.qp-card { background: #fff; border-radius: 16px; border: 1px solid var(--border); }

.qp-stars { display: inline-flex; gap: 2px; color: var(--gold-deep); font-size: 14px; letter-spacing: 1px; }

.qp-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}
.qp-eyebrow::before { content: ''; width: 22px; height: 1.5px; background: var(--accent); }

.qp-poster {
  position: relative; aspect-ratio: 2/3; border-radius: 6px; overflow: hidden;
  background: linear-gradient(140deg, #2a3760, #813a3e 50%, #cb6d3f);
  box-shadow: 0 10px 20px -8px rgba(20,20,40,0.25);
}
.qp-poster.book   { background: linear-gradient(140deg, #2d5a3d, #a6814c 70%, #d4b572); }
.qp-poster.movie  { background: linear-gradient(140deg, #0f1f3a, #6e1e2a 60%, #c9444a); }
.qp-poster.tv     { background: linear-gradient(140deg, #2a1f3d, #3f4f8c 50%, #6f9bd6); }
.qp-poster.game   { background: linear-gradient(140deg, #15191f, #2d6e6b 60%, #88c5ad); }
.qp-poster.pod    { background: linear-gradient(140deg, #3a1f0f, #b5651f 60%, #f1a542); }
.qp-poster.album  { background: linear-gradient(140deg, #1a0d33, #5a1e69 60%, #c75cb5); }
.qp-poster.yt     { background: linear-gradient(140deg, #5a0d0d, #c81f1f 50%, #ff6b6b); }
.qp-poster.city   { background: linear-gradient(140deg, #1d3a4d, #5a8aa6 50%, #c4d6e0); }
.qp-poster::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.18), transparent 45%),
    repeating-linear-gradient(35deg, transparent 0 14px, rgba(0,0,0,0.04) 14px 18px);
}
.qp-poster .glyph { position: absolute; bottom: 10px; right: 10px; font-size: 20px; opacity: 0.85; }
.qp-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.qp-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 100px; font-size: 13px; font-weight: 600;
  border: 1px solid var(--border); cursor: pointer; background: #fff; color: var(--prim);
  text-decoration: none;
}
.qp-btn.dark { background: var(--prim); color: #fff; border-color: var(--prim); }
.qp-btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.qp-btn.ghost { background: transparent; border-color: var(--border); }
.qp-btn.sm { padding: 7px 12px; font-size: 12px; }

.qp-sec-h {
  font-family: 'Fraunces', Georgia, serif; font-weight: 700; letter-spacing: -0.6px;
  font-size: 28px; display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 18px;
}
.qp-sec-h small { font-family: 'Outfit', sans-serif; font-weight: 500; font-size: 12px; color: var(--sec); letter-spacing: 0; }

/* ─── Batch 6-10 page CSS (ported from redesigns-*.jsx) ─────────────── */

/* My Profile */
.qp .prof-hero { position: relative; padding: 40px 56px 36px; background: linear-gradient(180deg, var(--paper-warm) 0%, var(--paper) 100%); border-bottom: 1px solid var(--hairline); }
.qp .prof-hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.4; background: radial-gradient(60% 60% at 90% 0%, oklch(95% 0.08 80 / 0.6), transparent 60%), radial-gradient(50% 60% at 0% 100%, oklch(95% 0.06 255 / 0.5), transparent 60%); }
.qp .prof-id { display: flex; gap: 28px; align-items: center; position: relative; flex-wrap: wrap; }
.qp .prof-id .qp-av { box-shadow: 0 20px 40px -16px oklch(50% 0.15 30 / 0.5), 0 0 0 6px white; }
.qp .prof-name { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 280px; }
.qp .prof-name h1 { font-family: 'Fraunces', serif; font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -2px; margin: 0; }
.qp .prof-handle { display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--sec); flex-wrap: wrap; }
.qp .prof-handle .dot { width: 4px; height: 4px; background: var(--quiet); border-radius: 50%; }
.qp .prof-bio { font-family: 'Fraunces', serif; font-style: italic; font-weight: 500; font-size: 18px; line-height: 1.4; color: var(--prim); max-width: 540px; }
.qp .prof-actions { display: flex; gap: 10px; }
.qp .prof-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 32px; background: white; border: 1px solid var(--border); border-radius: 16px; overflow: hidden; position: relative; }
.qp .prof-stat { padding: 18px 22px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--hairline); }
.qp .prof-stat:last-child { border-right: 0; }
.qp .prof-stat .v { font-family: 'Fraunces', serif; font-size: 32px; font-weight: 700; letter-spacing: -1px; }
.qp .prof-stat .l { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tert); }
.qp .prof-stat .sub { font-size: 11px; color: var(--sec); margin-top: 2px; }
.qp .prof-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); padding: 0 56px; background: var(--paper); flex-wrap: wrap; }
.qp .prof-tabs .t { padding: 18px 22px 16px; font-size: 13px; font-weight: 600; color: var(--sec); position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; }
.qp .prof-tabs .t .ct { font-size: 10px; padding: 2px 7px; background: var(--inset); border-radius: 100px; color: var(--sec); }
.qp .prof-tabs .t.on { color: var(--prim); }
.qp .prof-tabs .t.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--prim); }
.qp .prof-body { padding: 32px 56px 60px; display: grid; grid-template-columns: 2fr 1fr; gap: 36px; }
.qp .prof-now { background: white; border-radius: 18px; padding: 22px; border: 1px solid var(--border); }
.qp .prof-now-lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.qp .prof-now-strip { display: flex; gap: 12px; overflow-x: auto; }
.qp .prof-now-cell { flex: 1; min-width: 110px; }
.qp .prof-now-cell .qp-poster { margin-bottom: 8px; }
.qp .prof-now-cell .t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qp .prof-now-cell .s { font-size: 11px; color: var(--sec); margin-top: 2px; }
.qp .prof-now-cell .progress { height: 4px; background: var(--inset); border-radius: 100px; margin-top: 6px; overflow: hidden; }
.qp .prof-now-cell .progress > div { height: 100%; background: var(--accent); }
.qp .prof-side { display: flex; flex-direction: column; gap: 18px; }
.qp .prof-card { background: white; border-radius: 18px; padding: 20px; border: 1px solid var(--border); }
.qp .prof-card h3 { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.qp .prof-friends { display: flex; flex-direction: column; gap: 10px; }
.qp .prof-friend { display: flex; align-items: center; gap: 10px; font-size: 13px; text-decoration: none; color: inherit; }
.qp .prof-friend .meta { flex: 1; }
.qp .prof-friend .meta .n { font-weight: 600; }
.qp .prof-friend .meta .m { font-size: 11px; color: var(--tert); }
.qp .prof-card .more { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: 14px; display: inline-block; text-decoration: none; }
.qp .prof-feed { display: flex; flex-direction: column; gap: 14px; margin-top: 22px; }
.qp .prof-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 16px 22px; background: white; border-radius: 14px; border: 1px solid var(--border); text-decoration: none; color: inherit; }
.qp .prof-row .qp-poster { width: 40px; height: 60px; aspect-ratio: auto; }
.qp .prof-row .body { display: flex; flex-direction: column; gap: 4px; }
.qp .prof-row .t { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; letter-spacing: -0.4px; }
.qp .prof-row .m { font-size: 12px; color: var(--sec); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qp .prof-row .r { text-align: right; }
.qp .prof-row .r .a { font-size: 14px; color: var(--tert); }

/* My Reviews */
.qp .rev-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 36px; padding: 40px 56px 24px; align-items: end; }
.qp .rev-head h1 { font-family: 'Fraunces', serif; font-weight: 800; font-size: 64px; line-height: 0.95; letter-spacing: -2.2px; margin: 0; }
.qp .rev-head h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.qp .rev-head .blurb { font-size: 14px; line-height: 1.55; color: var(--sec); max-width: 380px; }
.qp .rev-summary { margin: 0 56px; background: var(--prim); color: white; border-radius: 20px; padding: 28px 32px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 36px; align-items: center; }
.qp .rev-summary .nums { display: flex; gap: 28px; flex-wrap: wrap; }
.qp .rev-summary .num { display: flex; flex-direction: column; gap: 3px; }
.qp .rev-summary .num .v { font-family: 'Fraunces', serif; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: -1.5px; color: var(--gold); }
.qp .rev-summary .num .l { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: oklch(75% 0.01 240); }
.qp .rev-bar-row { display: flex; flex-direction: column; gap: 8px; }
.qp .rev-bar-row .ttl { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: oklch(75% 0.01 240); margin-bottom: 4px; }
.qp .rev-bar { display: grid; grid-template-columns: 90px 1fr 36px; gap: 12px; align-items: center; font-size: 12px; }
.qp .rev-bar .lbl { color: oklch(80% 0.01 240); }
.qp .rev-bar .track { height: 9px; background: rgba(255,255,255,0.08); border-radius: 100px; overflow: hidden; }
.qp .rev-bar .track > div { height: 100%; border-radius: 100px; }
.qp .rev-bar .n { text-align: right; font-variant-numeric: tabular-nums; }
.qp .rev-filters { display: flex; align-items: center; gap: 10px; padding: 22px 56px 8px; flex-wrap: wrap; }
.qp .rev-filters .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tert); margin-right: 4px; }
.qp .rev-filters .qp-pill { text-decoration: none; }
.qp .rev-filters .sort { margin-left: auto; font-size: 12px; color: var(--sec); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.qp .rev-filters .sort a { background: white; border: 1px solid var(--border); padding: 6px 12px; border-radius: 100px; font-weight: 600; color: var(--prim); text-decoration: none; font-size: 12px; }
.qp .rev-filters .sort a.on { background: var(--prim); color: white; }
.qp .rev-stream { padding: 16px 56px 60px; display: flex; flex-direction: column; gap: 18px; }
.qp .rev-card { background: white; border: 1px solid var(--border); border-radius: 18px; padding: 22px; display: grid; grid-template-columns: 72px 1fr; gap: 20px; }
.qp .rev-card > .qp-poster { width: 72px; aspect-ratio: 2/3; }
.qp .rev-card .body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.qp .rev-card .topline { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qp .rev-card .t { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; letter-spacing: -0.6px; text-decoration: none; color: inherit; }
.qp .rev-card .t .yr { font-weight: 400; font-style: italic; color: var(--tert); margin-left: 4px; }
.qp .rev-card .verdict { font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 9px; border-radius: 100px; }
.qp .rev-card .verdict.loved { background: var(--green-soft); color: oklch(35% 0.14 145); }
.qp .rev-card .verdict.queue { background: var(--accent-soft); color: var(--accent); }
.qp .rev-card .verdict.mid { background: oklch(94% 0.04 80); color: oklch(45% 0.12 80); }
.qp .rev-card .quote { font-family: 'Fraunces', serif; font-style: italic; font-size: 16px; line-height: 1.4; color: var(--prim); padding-left: 14px; border-left: 2px solid var(--gold); }
.qp .rev-card .meta { display: flex; gap: 18px; align-items: center; font-size: 12px; color: var(--sec); padding-top: 6px; border-top: 1px solid var(--hairline); flex-wrap: wrap; }

/* Pending Friends */
.qp .pf-head { padding: 40px 56px 24px; }
.qp .pf-tabs { padding: 0 56px; display: flex; gap: 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.qp .pf-tabs .t { padding: 14px 22px 16px; font-size: 13px; font-weight: 600; color: var(--sec); position: relative; display: flex; align-items: center; gap: 10px; }
.qp .pf-tabs .t .ct { font-size: 11px; padding: 2px 8px; background: var(--inset); border-radius: 100px; color: var(--sec); }
.qp .pf-tabs .t.on { color: var(--prim); }
.qp .pf-tabs .t.on .ct { background: var(--accent); color: white; }
.qp .pf-tabs .t.on::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--prim); }
.qp .pf-body { padding: 28px 56px 60px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.qp .pf-stack { display: flex; flex-direction: column; gap: 12px; }
.qp .pf-card { background: white; border-radius: 18px; border: 1px solid var(--border); padding: 22px; display: grid; grid-template-columns: 64px 1fr auto; gap: 18px; align-items: center; position: relative; overflow: hidden; }
.qp .pf-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); }
.qp .pf-card.out::before { background: var(--gold); }
.qp .pf-card.declined { opacity: 0.5; }
.qp .pf-card .body .nm { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.qp .pf-card .body .hdl { font-size: 12px; color: var(--tert); margin-top: 2px; }
.qp .pf-card .body .meta { font-size: 12px; color: var(--sec); margin-top: 10px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.qp .pf-card .body .meta .pip { width: 4px; height: 4px; background: var(--quiet); border-radius: 50%; }
.qp .pf-card .body .note { font-family: 'Fraunces', serif; font-style: italic; font-size: 14px; color: var(--sec); margin-top: 10px; padding: 10px 14px; background: var(--paper-warm); border-radius: 12px; border-left: 2px solid var(--gold); }
.qp .pf-card .acts { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.qp .pf-card .acts form { margin: 0; }
.qp .pf-side { display: flex; flex-direction: column; gap: 16px; }
.qp .pf-side .card { background: white; border: 1px solid var(--border); border-radius: 18px; padding: 20px; }
.qp .pf-side .card h3 { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.qp .pf-suggest { display: flex; flex-direction: column; gap: 14px; }
.qp .pf-suggest .row { display: flex; align-items: center; gap: 12px; }
.qp .pf-suggest .row .body { flex: 1; }
.qp .pf-suggest .row .nm { font-weight: 600; font-size: 13px; }
.qp .pf-suggest .row .m { font-size: 11px; color: var(--tert); }
.qp .pf-suggest .row form { margin: 0; }
.qp .pf-empty-state { background: linear-gradient(165deg, var(--paper-warm), var(--paper)); border: 1px dashed var(--border); border-radius: 18px; padding: 24px; display: flex; gap: 16px; align-items: flex-start; }
.qp .pf-empty-state .ic { font-size: 36px; }
.qp .pf-empty-state h4 { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.qp .pf-empty-state p { font-size: 12px; color: var(--sec); line-height: 1.5; }

/* ════ CONNECTIONS ════ */
.qp .cn { padding: 40px 56px 60px; }
.qp .cn-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: end; margin-bottom: 32px; }
.qp .cn-head h1 { font-family: 'Fraunces', serif; font-weight: 800; font-size: 60px; line-height: 0.95; letter-spacing: -2px; margin: 0; }
.qp .cn-head h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.qp .cn-head .blurb { font-size: 14px; color: var(--sec); line-height: 1.55; max-width: 380px; }

.qp .cn-maker {
  background: linear-gradient(165deg, oklch(96% 0.04 80), oklch(95% 0.03 290));
  border: 1px solid var(--border); border-radius: 24px; padding: 36px; position: relative; overflow: hidden;
}
.qp .cn-maker::before {
  content: ''; position: absolute; right: -40px; top: -40px; width: 240px; height: 240px;
  background: radial-gradient(circle, oklch(75% 0.16 60 / 0.3), transparent 70%); border-radius: 50%;
}
.qp .cn-maker-h { font-family: 'Fraunces', serif; font-size: 24px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.5px; position: relative; }
.qp .cn-maker-sub { font-size: 13px; color: var(--sec); margin-bottom: 24px; position: relative; }
.qp .cn-slots { position: relative; display: grid; grid-template-columns: 1fr 60px 1fr; gap: 18px; align-items: center; }
.qp .cn-slot {
  background: white; border-radius: 18px; padding: 22px; border: 1px solid var(--border); min-height: 220px;
  display: flex; flex-direction: column; gap: 14px;
}
.qp .cn-slot .lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--tert); }
.qp .cn-slot .picked { display: flex; align-items: center; gap: 14px; }
.qp .cn-slot .picked .body .nm { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 700; letter-spacing: -0.4px; }
.qp .cn-slot .picked .body .m { font-size: 11px; color: var(--tert); margin-top: 2px; }
.qp .cn-slot .traits { display: flex; gap: 6px; flex-wrap: wrap; }
.qp .cn-slot .empty { font-size: 13px; color: var(--tert); flex: 1; display: flex; align-items: center; }
.qp .cn-slot select.pick { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 13px; background: var(--inset); color: var(--prim); font-family: inherit; }
.qp .cn-slot .change { font-size: 12px; color: var(--accent); font-weight: 600; margin-top: auto; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-family: inherit; }
.qp .cn-arrow {
  display: grid; place-items: center; font-family: 'Fraunces', serif; font-weight: 700; font-size: 28px;
  color: var(--accent); position: relative;
}
.qp .cn-arrow::before {
  content: ''; position: absolute; left: -8px; right: -8px; top: 50%; height: 2px;
  background: repeating-linear-gradient(90deg, var(--accent) 0 4px, transparent 4px 8px);
  z-index: 0;
}
.qp .cn-arrow .b { position: relative; background: white; border-radius: 50%; width: 48px; height: 48px; border: 2px solid var(--accent); display: grid; place-items: center; }

.qp .cn-overlap {
  background: white; border-radius: 16px; padding: 18px; margin-top: 22px; position: relative;
  border: 1px solid var(--border);
}
.qp .cn-overlap .ttl { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }
.qp .cn-overlap .grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.qp .cn-overlap .ti { display: flex; flex-direction: column; gap: 6px; font-size: 11px; text-align: center; text-decoration: none; color: var(--prim); }
.qp .cn-overlap .ti .qp-poster { width: 100%; aspect-ratio: 2/3; }
.qp .cn-overlap .ti .n { font-weight: 600; line-height: 1.2; }
.qp .cn-overlap .ti-empty { font-size: 12px; color: var(--tert); }

.qp .cn-cta {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--hairline); position: relative; flex-wrap: wrap;
}
.qp .cn-cta .note { font-size: 12px; color: var(--sec); max-width: 480px; flex: 1; min-width: 240px; }
.qp .cn-cta .note input { width: 100%; margin-top: 6px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 12px; font-family: inherit; background: white; color: var(--prim); }
.qp .cn-cta .note .pfx { font-family: 'Fraunces', serif; font-weight: 700; font-style: italic; color: var(--prim); }
.qp .cn-cta .acts { display: flex; gap: 10px; }
.qp .cn-cta form { margin: 0; }

.qp .cn-history { margin-top: 40px; }
.qp .cn-history .h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.qp .cn-history .h h2 { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 700; letter-spacing: -0.6px; margin: 0; }
.qp .cn-history .h .sub { font-size: 12px; color: var(--tert); }
.qp .cn-list { display: flex; flex-direction: column; gap: 12px; }
.qp .cn-item {
  background: white; border: 1px solid var(--border); border-radius: 16px; padding: 18px 22px;
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
}
.qp .cn-item .pair { display: flex; align-items: center; gap: 10px; }
.qp .cn-item .pair .a, .qp .cn-item .pair .b { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; }
.qp .cn-item .pair .x { color: var(--quiet); font-size: 14px; }
.qp .cn-item .why { font-family: 'Fraunces', serif; font-style: italic; font-size: 14px; color: var(--sec); }
.qp .cn-item .why .when { font-style: normal; font-family: 'Outfit', sans-serif; font-size: 11px; color: var(--tert); margin-top: 4px; }
.qp .cn-item .status { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; white-space: nowrap; }
.qp .cn-item .status.done { background: var(--green-soft); color: oklch(35% 0.14 145); }
.qp .cn-item .status.pending { background: oklch(94% 0.04 80); color: oklch(45% 0.12 80); }
.qp .cn-empty { background: linear-gradient(165deg, var(--paper-warm), var(--paper)); border: 1px dashed var(--border); border-radius: 16px; padding: 28px; text-align: center; font-size: 13px; color: var(--sec); }

/* A List (show) */
.qp .lst-show-cover { padding: 48px 56px 36px; background: linear-gradient(180deg, oklch(96% 0.04 80) 0%, var(--paper) 100%); border-bottom: 1px solid var(--hairline); position: relative; overflow: hidden; }
.qp .lst-show-cover .ghost-glyph { position: absolute; right: -40px; top: -40px; font-size: 320px; opacity: 0.04; pointer-events: none; line-height: 1; }
.qp .lst-show-cover .crumb { font-size: 12px; color: var(--tert); margin-bottom: 16px; position: relative; }
.qp .lst-show-cover .crumb a { color: var(--sec); text-decoration: none; }
.qp .lst-show-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end; position: relative; }
.qp .lst-show-id { display: flex; gap: 20px; align-items: flex-end; }
.qp .lst-show-id .icn { width: 80px; height: 80px; border-radius: 18px; background: white; box-shadow: 0 2px 0 var(--border); display: grid; place-items: center; font-size: 44px; flex-shrink: 0; }
.qp .lst-show-id h1 { font-family: 'Fraunces', serif; font-weight: 800; font-size: 56px; line-height: 1; letter-spacing: -2px; margin: 0; }
.qp .lst-show-id .meta { font-size: 13px; color: var(--sec); margin-top: 8px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.qp .lst-show-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.qp .lst-show-blurb { font-family: 'Fraunces', serif; font-style: italic; font-size: 18px; color: var(--prim); max-width: 600px; margin-top: 18px; line-height: 1.4; position: relative; }
.qp .lst-show-rail { padding: 28px 56px 60px; display: grid; grid-template-columns: 2.2fr 1fr; gap: 36px; }
.qp .lst-titles { display: flex; flex-direction: column; gap: 0; background: white; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.qp .lst-row { display: grid; grid-template-columns: 30px 64px 1fr auto; gap: 18px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--hairline); background: white; }
.qp .lst-row:last-child { border-bottom: 0; }
.qp .lst-row .pos { font-family: 'Fraunces', serif; font-size: 20px; font-weight: 500; color: var(--tert); font-variant-numeric: tabular-nums; }
.qp .lst-row .qp-poster { width: 56px; aspect-ratio: 2/3; }
.qp .lst-row .t { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 600; letter-spacing: -0.3px; text-decoration: none; color: inherit; }
.qp .lst-row .by { font-size: 12px; color: var(--sec); margin-top: 2px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qp .lst-row .r { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.qp .lst-row .drag { color: var(--quiet); cursor: grab; font-size: 16px; line-height: 1; }
.qp .lst-row.drag-on, .qp .lst-row.qp-dragging { background: var(--paper-warm); }
.qp .lst-side { display: flex; flex-direction: column; gap: 18px; }
.qp .lst-side .card { background: white; border: 1px solid var(--border); border-radius: 18px; padding: 22px; }
.qp .lst-side .card h3 { font-family: 'Fraunces', serif; font-size: 18px; font-weight: 700; margin-bottom: 14px; }
.qp .lst-collab { display: flex; flex-direction: column; gap: 12px; font-size: 13px; }
.qp .lst-collab .row { display: flex; align-items: center; gap: 10px; }

/* Admin shell */
.qp-ad { width: 100%; min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; background: oklch(98% 0.004 240); }
.qp-ad .ad-side { background: var(--dark); color: white; padding: 22px 0; display: flex; flex-direction: column; gap: 0; border-right: 1px solid oklch(22% 0.012 240); }
.qp-ad .ad-side .brand { padding: 0 22px 22px; display: flex; align-items: center; gap: 10px; font-family: 'Fraunces', serif; font-weight: 800; font-size: 18px; border-bottom: 1px solid oklch(22% 0.012 240); margin-bottom: 14px; color: white; text-decoration: none; }
.qp-ad .ad-side .brand .panda { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--prim); display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.qp-ad .ad-side .brand .tag { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 9px; letter-spacing: 0.18em; color: var(--gold); background: oklch(22% 0.05 60); padding: 2px 6px; border-radius: 4px; margin-left: 6px; font-weight: 600; }
.qp-ad .ad-side .group { padding: 0 14px; margin-top: 14px; }
.qp-ad .ad-side .group .label { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: oklch(55% 0.01 240); padding: 8px 12px 6px; }
.qp-ad .ad-side .group .item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; font-size: 13px; color: oklch(82% 0.01 240); cursor: pointer; position: relative; text-decoration: none; }
.qp-ad .ad-side .group .item:hover { background: oklch(20% 0.012 240); color: white; }
.qp-ad .ad-side .group .item .ic { width: 18px; text-align: center; opacity: 0.8; }
.qp-ad .ad-side .group .item .ct { margin-left: auto; font-size: 10px; padding: 2px 7px; background: oklch(22% 0.012 240); border-radius: 100px; color: oklch(70% 0.01 240); font-weight: 600; }
.qp-ad .ad-side .group .item.alert .ct { background: oklch(40% 0.18 30); color: oklch(95% 0.05 30); }
.qp-ad .ad-side .group .item.on { background: oklch(48% 0.18 255 / 0.18); color: white; }
.qp-ad .ad-side .group .item.on::before { content: ''; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; background: var(--accent); border-radius: 0 4px 4px 0; }
.qp-ad .ad-side .group .item.on .ct { background: var(--accent); color: white; }
.qp-ad .ad-side .me { margin-top: auto; padding: 14px 22px; border-top: 1px solid oklch(22% 0.012 240); display: flex; align-items: center; gap: 10px; }
.qp-ad .ad-side .me .body { flex: 1; min-width: 0; }
.qp-ad .ad-side .me .nm { font-size: 13px; font-weight: 600; }
.qp-ad .ad-side .me .role { font-size: 10px; color: var(--gold); font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: 0.1em; }
.qp-ad .ad-main { display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
.qp-ad .ad-bar { background: white; border-bottom: 1px solid var(--border); padding: 16px 32px; display: grid; grid-template-columns: 1fr auto auto; gap: 22px; align-items: center; }
.qp-ad .ad-bar .crumb { font-size: 12px; color: var(--tert); display: flex; align-items: center; gap: 8px; }
.qp-ad .ad-bar .crumb b { color: var(--prim); font-weight: 600; font-family: 'Fraunces', serif; font-size: 16px; letter-spacing: -0.3px; }
.qp-ad .ad-bar .search { width: 320px; max-width: 40vw; background: var(--inset); border: 1px solid var(--border); border-radius: 100px; padding: 7px 14px 7px 36px; font-size: 13px; color: var(--sec); position: relative; }
.qp-ad .ad-bar .search::before { content: '\2315'; position: absolute; left: 12px; top: 6px; color: var(--quiet); font-size: 14px; }
.qp-ad .ad-bar .actions { display: flex; gap: 8px; align-items: center; }
.qp-ad .ad-content { padding: 28px 32px; overflow: auto; flex: 1; }
.qp-ad .ad-h { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; margin-bottom: 22px; }
.qp-ad .ad-h h1 { font-family: 'Fraunces', serif; font-size: 36px; font-weight: 700; letter-spacing: -1px; margin: 0; }
.qp-ad .ad-h .meta { font-size: 13px; color: var(--sec); margin-top: 6px; }
.qp-ad .ad-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.qp-ad .ad-stat { background: white; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; position: relative; overflow: hidden; }
.qp-ad .ad-stat .v { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 700; letter-spacing: -0.8px; }
.qp-ad .ad-stat .l { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tert); }
.qp-ad .ad-stat .delta { font-size: 11px; font-weight: 600; margin-top: 6px; }
.qp-ad .ad-stat .delta.up { color: var(--green); }
.qp-ad .ad-stat .delta.down { color: oklch(55% 0.18 30); }
.qp-ad .ad-stat .spark { position: absolute; right: 14px; bottom: 14px; width: 70px; height: 28px; }
.qp-ad .ad-stat .spark path { stroke: var(--accent); stroke-width: 1.5; fill: none; }
.qp-ad .ad-toolbar { background: white; border: 1px solid var(--border); border-radius: 14px 14px 0 0; padding: 14px 18px; display: flex; align-items: center; gap: 10px; border-bottom: 0; flex-wrap: wrap; }
.qp-ad .ad-toolbar .lbl { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tert); margin-right: 4px; }
.qp-ad .ad-toolbar .right { margin-left: auto; display: flex; gap: 8px; }
.qp-ad .ad-table { background: white; border: 1px solid var(--border); border-radius: 0 0 14px 14px; overflow-x: auto; }
.qp-ad .ad-row { display: grid; gap: 14px; padding: 12px 18px; align-items: center; border-bottom: 1px solid var(--hairline); font-size: 13px; min-width: 720px; }
.qp-ad .ad-row.head { background: var(--inset); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--tert); padding: 10px 18px; }
.qp-ad .ad-row:last-child { border-bottom: 0; }
.qp-ad .ad-row .who { display: flex; align-items: center; gap: 10px; }
.qp-ad .ad-row .who .body .nm { font-weight: 600; font-size: 13px; }
.qp-ad .ad-row .who .body .em { font-size: 11px; color: var(--tert); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.qp-ad .ad-row .badge { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; padding: 3px 8px; border-radius: 100px; display: inline-block; }
.qp-ad .ad-row .badge.live { background: var(--green-soft); color: oklch(35% 0.14 145); }
.qp-ad .ad-row .badge.invite { background: var(--accent-soft); color: var(--accent); }
.qp-ad .ad-row .badge.pause { background: var(--inset); color: var(--sec); }
.qp-ad .ad-row .badge.flag { background: oklch(94% 0.05 30); color: oklch(45% 0.16 30); }
.qp-ad .ad-row .num { font-variant-numeric: tabular-nums; }
.qp-ad .ad-row .actions { display: flex; gap: 10px; justify-content: flex-end; }
.qp-ad .ad-row .actions a { font-size: 13px; color: var(--sec); text-decoration: none; }
.qp-ad .ad-row .actions a:hover { color: var(--accent); }
.qp-ad .ad-foot { display: flex; justify-content: space-between; padding: 14px 4px 0; font-size: 12px; color: var(--sec); flex-wrap: wrap; gap: 10px; }
.qp-ad .ad-foot .pager { display: flex; gap: 6px; }
.qp-ad .ad-foot .pager .page, .qp-ad .ad-foot .pager a { padding: 4px 10px; border-radius: 8px; text-decoration: none; color: var(--sec); }
.qp-ad .ad-foot .pager .active { background: var(--prim); color: white; font-weight: 600; }

@media (max-width: 900px) {
  .qp .prof-body, .qp .rev-head, .qp .rev-summary, .qp .pf-body, .qp .lst-show-rail, .qp .lst-show-grid, .qp .cn-head, .qp .cn-slots { grid-template-columns: 1fr; }
  .qp .rev-summary { margin: 0 24px; }
  .qp .cn-arrow { display: none; }
  .qp .cn-overlap .grid { grid-template-columns: repeat(3, 1fr); }
  .qp .cn-item { grid-template-columns: 1fr; }
  .qp .prof-hero, .qp .prof-body, .qp .prof-tabs, .qp .pf-head, .qp .pf-tabs, .qp .pf-body, .qp .rev-head, .qp .rev-filters, .qp .rev-stream, .qp .lst-show-cover, .qp .lst-show-rail, .qp .cn { padding-left: 24px; padding-right: 24px; }
  .qp .prof-stats, .qp-ad .ad-stats { grid-template-columns: repeat(2, 1fr); }
  .qp-ad { grid-template-columns: 1fr; }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

 [x-cloak] { display: none !important; }
