/* Modal styles belong only to the isolated stakeholder review. */
.ppl-dialog {
  --ppl-wine: #741e38;
  --ppl-ink: #352327;
  --ppl-muted: #71635d;
  --ppl-gold: #ac8239;
  --ppl-line: #ddcebc;
  --ppl-cream: #fffaf1;
  box-sizing: border-box;
  width: min(760px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid #c9b58e;
  border-radius: 24px;
  background: var(--ppl-cream);
  color: var(--ppl-ink);
  font-family: inherit;
  box-shadow: 0 28px 120px #24171459;
  overflow: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 20px 112px;
}
.ppl-dialog::backdrop { background: #231218bf; backdrop-filter: blur(7px); }
.ppl-dialog *, .ppl-dialog *::before, .ppl-dialog *::after { box-sizing: border-box; }
.ppl-dialog button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.ppl-dialog button:focus-visible { outline: 3px solid #235c78; outline-offset: 3px; scroll-margin-block: 12px; }
.ppl-dialog button:disabled { cursor: default; }
.ppl-header { position: relative; padding: 30px 32px 20px; border-bottom: 1px solid var(--ppl-line); }
.ppl-eyebrow { margin: 0 44px 10px 0; color: var(--ppl-wine); font-size: 11px; font-weight: 800; letter-spacing: .19em; }
.ppl-title { margin: 0 28px 12px 0; font: 500 clamp(27px, 4vw, 38px)/1.08 Georgia, 'Times New Roman', serif; letter-spacing: -.025em; }
.ppl-instructions { max-width: 600px; margin: 0; color: var(--ppl-muted); font-size: 14px; line-height: 1.6; }
.ppl-close { position: absolute; right: 18px; top: 18px; width: 44px; height: 44px; border: 1px solid var(--ppl-line); border-radius: 50%; color: var(--ppl-wine); background: transparent; font-size: 26px !important; line-height: 1; }
.ppl-close:hover { background: #f2e9dc; }
.ppl-body { padding: 22px 32px; }
.ppl-context { display: inline-block; margin-bottom: 18px; padding: 6px 11px; border-radius: 5px; background: #eee5d7; color: #604d36; font-size: 11px; font-weight: 700; letter-spacing: .025em; }
.ppl-footer { position: sticky; bottom: 0; z-index: 3; padding: 18px 32px 26px; border-top: 1px solid var(--ppl-line); background: var(--ppl-cream); }
.ppl-primary { display: block; width: 100%; min-height: 48px; padding: 12px 20px; border: 1px solid var(--ppl-wine); border-radius: 50px; background: var(--ppl-wine); color: #fffaf1; font-weight: 700 !important; }
.ppl-primary:hover:enabled { background: #571329; }
.ppl-primary:disabled { border-color: #d6c7bf; color: #6e635d; background: #e7ded4; }
.ppl-note { margin: 14px 0 0; color: var(--ppl-muted); font-size: 11px; line-height: 1.6; }
.ppl-footer > .ppl-note { margin: 0; }
.ppl-match-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.ppl-match-column { min-width: 0; }
.ppl-column-title { margin: 0 0 12px; color: var(--ppl-muted); text-transform: uppercase; font-size: 10px; letter-spacing: .14em; }
.ppl-food-card, .ppl-wine-card {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 98px; margin-bottom: 10px;
  padding: 12px; border: 1px solid var(--ppl-line); border-radius: 12px; background: #fffdf8;
  color: var(--ppl-ink); text-align: left; transition: border-color .15s, background .15s;
}
.ppl-food-card:hover, .ppl-wine-card:hover { border-color: var(--ppl-gold); }
.ppl-food-card.is-selected, .ppl-wine-card.is-selected { border-color: var(--ppl-wine); box-shadow: inset 0 0 0 1px var(--ppl-wine); background: #f6e9e6; }
.ppl-food-card.is-paired:not(.is-selected) { background: #f3ecdf; }
.ppl-food-image { width: 60px; height: 60px; flex: 0 0 60px; object-fit: contain; user-select: none; }
.ppl-food-emoji { display: block; flex: 0 0 52px; font-size: 38px; line-height: 1.2; text-align: center; }
.ppl-food-label { display: block; min-width: 0; }
.ppl-food-label strong, .ppl-wine-card strong { display: block; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.ppl-pair-choice { display: block; margin-top: 6px; font-size: 10px; line-height: 1.35; color: var(--ppl-muted); }
.ppl-wine-icon { display: block; width: 30px; height: 48px; flex: 0 0 30px; object-fit: contain; }
.ppl-feedback { min-height: 44px; margin: 16px 0 0; padding: 12px 15px; border-left: 3px solid var(--ppl-gold); background: #f0e6d7; color: #5f4937; font-size: 12px; line-height: 1.5; }
.ppl-format-option { display: flex; width: 100%; flex-direction: column; gap: 9px; padding: 22px; margin-bottom: 14px; border: 1px solid var(--ppl-line); border-radius: 14px; background: #fffdf8; text-align: left; color: var(--ppl-ink); }
.ppl-format-option:hover { background: #f3e8de; border-color: var(--ppl-wine); }
.ppl-format-option strong { font: 25px/1.15 Georgia, serif; }
.ppl-format-option span { font-size: 13px; color: var(--ppl-muted); }
.ppl-format-option small { margin-top: 8px; color: var(--ppl-wine); font-weight: 800; }
.ppl-score-panel { display: flex; align-items: baseline; justify-content: center; gap: 15px; padding: 7px 0 25px; }
.ppl-score { font: 64px/1 Georgia, serif; color: var(--ppl-wine); letter-spacing: -.06em; }
.ppl-score-label { font-size: 13px; color: var(--ppl-muted); }
.ppl-answer-list { list-style: none; margin: 0; padding: 0; }
.ppl-answer { margin: 0 0 12px; padding: 14px 16px; border: 1px solid var(--ppl-line); border-left-width: 4px; border-radius: 11px; background: #fffdf8; }
.ppl-answer.is-correct { border-left-color: #477257; }
.ppl-answer.is-wrong { border-left-color: #a85546; }
.ppl-answer-heading { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.ppl-answer-heading .ppl-food-image { height: 36px; width: 36px; flex-basis: 36px; }
.ppl-answer-status { margin-left: auto; color: #477257; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; }
.ppl-answer.is-wrong .ppl-answer-status { color: #923e32; }
.ppl-choice-detail { margin: 7px 0 0; color: var(--ppl-muted); font-size: 11px; line-height: 1.45; }
.ppl-explanation { margin: 8px 0 0; color: #544843; font-size: 12px; line-height: 1.55; }
.ppl-question-progress { margin: 0 0 14px; color: var(--ppl-wine); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
.ppl-question { display: flex; align-items: center; gap: 20px; padding: 8px 0 20px; }
.ppl-question .ppl-food-image { width: 90px; height: 90px; flex-basis: 90px; }
.ppl-question h3 { margin: 0; font: 25px/1.2 Georgia, serif; }
.ppl-trivia-answers { display: grid; gap: 10px; }
.ppl-trivia-answer { width: 100%; min-height: 50px; padding: 14px 18px; border: 1px solid var(--ppl-line); border-radius: 12px; background: #fffdf8; color: var(--ppl-ink); text-align: left; font-size: 13px !important; line-height: 1.5; }
.ppl-trivia-answer:hover:enabled { border-color: var(--ppl-wine); background: #f4e8e3; }
.ppl-trivia-answer.is-correct { background: #e6eee0; border-color: #4d7455; color: #2e573a; }
.ppl-trivia-answer.is-wrong { background: #f4e2dc; border-color: #a15547; color: #883b31; }
.ppl-trivia-answer:disabled { opacity: 1; }
.ppl-trivia-feedback:not(:empty) { padding: 18px 4px 0; font-size: 13px; color: #544843; line-height: 1.6; }
.ppl-trivia-feedback p { margin: 7px 0 0; }
.ppl-slice-board { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 20px; border: 1px solid #d4bea0; border-radius: 18px; background: radial-gradient(ellipse at 50% 60%, #ead9b6, #f9efda 80%); touch-action: none; user-select: none; }
.ppl-slice-food { z-index: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; min-height: 135px; padding: 10px 6px; border: 1px solid #d8c29b; border-radius: 50% 50% 20px 20px; background: #fffaf0eb; color: var(--ppl-ink); touch-action: none; }
.ppl-slice-food .ppl-food-image { width: 65px; height: 65px; flex: 0 0 65px; transition: transform .2s; pointer-events: none; }
.ppl-slice-food strong { margin-top: 7px; font-size: 12px; line-height: 1.2; pointer-events: none; }
.ppl-slice-status { margin-top: 5px; color: var(--ppl-muted); font-size: 10px; pointer-events: none; }
.ppl-slice-food:hover { border-color: var(--ppl-wine); }
.ppl-slice-food.is-correct { border-color: #547854; background: #e6efdde8; }
.ppl-slice-food.is-wrong { border-color: #a95845; background: #f3dcd1e8; }
.ppl-slice-food.is-sliced .ppl-food-image { transform: rotate(-10deg) scale(.87); }
.ppl-slice-food.is-sliced .ppl-slice-status { color: var(--ppl-ink); font-weight: 800; }
.ppl-swipe-trail { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.ppl-swipe-trail line { stroke: #a06b24; stroke-width: 5; stroke-linecap: round; filter: drop-shadow(0 0 4px #fff2b0); animation: ppl-trail-fade .45s ease-out forwards; }
@keyframes ppl-trail-fade { from { opacity: 1; } to { opacity: 0; } }
@media (max-width: 520px) {
  .ppl-dialog {
    width: calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right));
    max-height: calc(100vh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    border-radius: 19px;
    font-size: 15px;
  }
  .ppl-header { padding: 22px 19px 18px; }
  .ppl-body { padding: 18px 16px; }
  .ppl-footer { padding: 14px 19px max(18px, env(safe-area-inset-bottom)); }
  .ppl-title { font-size: clamp(27px, 7.2vw, 31px); line-height: 1.15; margin-right: 35px; }
  .ppl-eyebrow { font-size: 11px; line-height: 1.5; letter-spacing: .13em; }
  .ppl-instructions { font-size: 15px; line-height: 1.5; }
  .ppl-close { right: 10px; top: 10px; }
  .ppl-primary { min-height: 50px; padding: 13px 16px; font-size: 15px; line-height: 1.4; }
  .ppl-note { font-size: 13px; line-height: 1.5; }
  .ppl-context { font-size: 12px; line-height: 1.5; }
  .ppl-match-board { gap: 10px; }
  .ppl-column-title { font-size: 12px; letter-spacing: .09em; }
  .ppl-food-card, .ppl-wine-card { padding: 9px 8px; gap: 6px; min-height: 128px; }
  .ppl-food-card { flex-direction: column; justify-content: center; text-align: center; }
  .ppl-food-card .ppl-food-image { height: 42px; width: 42px; flex-basis: 42px; }
  .ppl-food-label strong, .ppl-wine-card strong { font-size: 14px; line-height: 1.35; }
  .ppl-wine-icon { display: none; }
  .ppl-wine-card { justify-content: center; text-align: center; }
  .ppl-pair-choice { font-size: 12px; line-height: 1.4; margin-top: 4px; overflow-wrap: anywhere; }
  .ppl-feedback { font-size: 14px; padding: 12px; }
  .ppl-format-option { min-height: 50px; padding: 18px; }
  .ppl-format-option span { font-size: 15px; line-height: 1.5; }
  .ppl-format-option small { font-size: 13px; line-height: 1.4; }
  .ppl-score-panel { flex-wrap: wrap; gap: 10px; }
  .ppl-score { font-size: 56px; }
  .ppl-score-label { font-size: 14px; }
  .ppl-answer { padding: 14px 12px; }
  .ppl-answer-heading { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 5px 10px; font-size: 15px; }
  .ppl-answer-heading strong { overflow-wrap: anywhere; }
  .ppl-answer-status { grid-column: 2; margin-left: 0; font-size: 11px; line-height: 1.4; }
  .ppl-choice-detail { font-size: 13px; }
  .ppl-explanation { font-size: 14px; }
  /* Keep all six targets in two rows; hit detection reads their rendered bounds. */
  .ppl-slice-board { gap: 8px; padding: 8px; }
  .ppl-slice-food { min-height: 140px; padding: 10px 4px; }
  .ppl-slice-food .ppl-food-image { width: clamp(44px, 13vw, 58px); height: clamp(44px, 13vw, 58px); flex-basis: clamp(44px, 13vw, 58px); }
  .ppl-slice-food strong { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
  .ppl-slice-status { font-size: 11px; line-height: 1.3; }
  .ppl-question { gap: 13px; }
  .ppl-question h3 { font-size: 22px; }
  .ppl-question .ppl-food-image { width: 58px; height: 58px; flex-basis: 58px; }
  .ppl-question-progress { font-size: 12px; line-height: 1.5; }
  .ppl-trivia-answer { min-height: 52px; padding: 13px 14px; font-size: 15px !important; }
  .ppl-trivia-feedback:not(:empty) { font-size: 15px; line-height: 1.5; }
}
@media (max-width: 360px) {
  .ppl-header { padding-inline: 16px; }
  .ppl-body { padding-inline: 12px; }
  .ppl-footer { padding-inline: 15px; }
  .ppl-question { align-items: flex-start; gap: 10px; }
  .ppl-question h3 { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) {
  .ppl-dialog * { transition: none !important; animation: none !important; }
}
