.mgy-pi{--pi-red:#a52332;--pi-ink:#192b36;--pi-paper:#fffdf8;color:var(--pi-ink);font:16px/1.6 system-ui,-apple-system,"Microsoft YaHei",sans-serif;background:var(--pi-paper);border:1px solid #ded5c6;border-radius:16px;margin:24px 0;padding:clamp(16px,3vw,32px);overflow-wrap:anywhere}.mgy-pi *{box-sizing:border-box}.mgy-pi h2{font-size:clamp(23px,3vw,32px);line-height:1.3;margin:5px 0 12px}.mgy-pi h3{font-size:21px;margin:0 0 12px}.mgy-pi p{margin:8px 0}.mgy-pi>section,.mgy-pi-tip{border-top:1px solid #e6dfd3;margin-top:24px;padding-top:20px}.mgy-pi-eyebrow{font-size:14px;font-weight:700;color:var(--pi-red);letter-spacing:.05em}.mgy-pi-verdict{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:#f1eee5;padding:14px;border-radius:10px}.mgy-pi-verdict strong{font-size:22px;color:var(--pi-red)}.mgy-pi-verdict span{font-size:15px}.mgy-pi-toolbar,.mgy-pi-ranges{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.mgy-pi button,.mgy-pi select,.mgy-pi input,.mgy-pi textarea{font:inherit;max-width:100%;border:1px solid #bfb7a8;border-radius:7px;min-height:44px;padding:9px 12px;background:#fff;color:var(--pi-ink)}.mgy-pi button{cursor:pointer;font-weight:650;line-height:1.3}.mgy-pi button:hover,.mgy-pi button:focus-visible{border-color:var(--pi-red);background:#f9e8e7}.mgy-pi button[aria-pressed=true],.mgy-pi button[type=submit],.mgy-pi [data-pi-add]{background:var(--pi-red);border-color:var(--pi-red);color:#fff}.mgy-pi button:disabled{opacity:.55;cursor:wait}.mgy-pi label{display:block;margin:12px 0;font-weight:600}.mgy-pi label input,.mgy-pi label select,.mgy-pi label textarea{display:block;width:100%;margin-top:5px}.mgy-pi label input[type=checkbox]{display:inline;width:22px;min-height:22px;margin:0 8px 0 0;vertical-align:middle}.mgy-pi form{max-width:780px}.mgy-pi-muted{color:#5b6266;font-size:14px}.mgy-pi-status{color:#8b2331;font-weight:650;min-height:1.6em}.mgy-pi summary{cursor:pointer;min-height:44px;font-weight:700;padding:8px 0}.mgy-pi a{color:#952333;text-decoration:underline;text-underline-offset:3px}.mgy-pi-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:16px 0}.mgy-pi-metrics div{background:#f5f1e9;padding:12px;border-radius:8px}.mgy-pi-metrics strong{display:block;font-size:21px}.mgy-pi-chart{width:100%;height:auto;display:block;background:#fff;border:1px solid #e3ddd1;border-radius:10px}.mgy-pi-table-wrap{overflow-x:auto}.mgy-pi table{width:100%;border-collapse:collapse;font-size:15px}.mgy-pi th,.mgy-pi td{text-align:left;vertical-align:top;padding:10px;border-bottom:1px solid #e6dfd3}.mgy-pi .mgy-pi-quote,.mgy-pi-review,.mgy-pi-list-item{border:1px solid #e0d8cb;padding:14px;border-radius:9px;margin:10px 0;background:#fff}.mgy-pi-quote h4{font-size:19px;margin:0}.mgy-pi-price{font-size:24px;font-weight:750;color:var(--pi-red)}.mgy-pi-review small{display:block;color:#58616a}.mgy-pi-dialog{border:1px solid #c9bdad;border-radius:12px;padding:20px;width:min(760px,calc(100vw - 24px));max-height:85dvh;overflow:auto;color:var(--pi-ink);background:var(--pi-paper)}.mgy-pi-dialog::backdrop{background:#14223388}.mgy-pi-dialog-head{display:flex;justify-content:space-between;align-items:start;gap:10px}.mgy-pi-dialog h2{font-size:24px}.mgy-pi-list-item .mgy-pi-row{display:flex;gap:10px;align-items:center}.mgy-pi-list-item input[type=number]{max-width:100px}.mgy-pi-list-item details{font-size:14px}.mgy-pi-list-item[data-bought=true]{opacity:.65}.mgy-pi-list-item[data-bought=true]>strong{text-decoration:line-through}@media(max-width:480px){.mgy-pi{padding:15px;margin:16px 0}.mgy-pi-metrics{grid-template-columns:1fr}.mgy-pi-ranges{gap:5px}.mgy-pi-ranges button{padding:9px;flex:1}.mgy-pi-toolbar button{flex:1 1 130px}.mgy-pi th,.mgy-pi td{padding:8px}.mgy-pi-dialog{padding:15px}.mgy-pi-dialog-head h2{font-size:21px}}
.mgy-pi-toolbar{align-items:center}.mgy-pi-toolbar>label{margin:0}.mgy-pi-toolbar>button{align-self:center}
@media(max-width:480px){.mgy-pi-ranges button{white-space:nowrap;font-size:14px;padding:9px 5px;min-width:42px}}
.mgy-pi-actions{margin:14px 0 18px}.mgy-pi-actions .mgy-pi-toolbar{margin-bottom:6px}.mgy-pi .mgy-pi-action-status{margin:0;min-height:1.6em;font-size:16px;line-height:1.6;font-weight:650;color:#245a42}.mgy-pi .mgy-pi-storage-status{padding:10px 12px;border:1px solid #bc7f23;border-radius:8px;background:#fff3d6;color:#714400;font-size:15px;line-height:1.6}.mgy-pi [data-pi-add]:hover,.mgy-pi [data-pi-add]:focus-visible{background:#80202b;border-color:#80202b;color:#fff}.mgy-pi [data-pi-add][data-pi-added=true]{background:#245a42;border-color:#245a42;color:#fff}.mgy-pi [data-pi-add][data-pi-added=true]:hover,.mgy-pi [data-pi-add][data-pi-added=true]:focus-visible{background:#17442f;border-color:#17442f;color:#fff}.mgy-pi [data-pi-open-list]{border:2px solid #a52332;color:#80202b;background:#fff8f3}.mgy-pi-actions button:focus-visible{outline:3px solid #192b36;outline-offset:3px}@media(max-width:480px){.mgy-pi-actions .mgy-pi-toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}.mgy-pi-actions .mgy-pi-toolbar>button{align-self:stretch;min-width:0;padding:11px 8px;font-size:16px}.mgy-pi .mgy-pi-action-status{font-size:16px}}

.mgy-pi-signal-counts{display:flex;flex-wrap:wrap;gap:6px 14px;margin:12px 0;font-size:15px}.mgy-pi-signal-counts span{background:#f1eee5;padding:4px 8px;border-radius:6px;white-space:nowrap}.mgy-pi .mgy-pi-signal-status{color:#245a42;font-size:16px;font-weight:650;min-height:1.6em}.mgy-pi [data-pi-feedback-value][aria-pressed=true]{background:#245a42;border-color:#245a42;color:#fff}.mgy-pi [data-pi-vote][aria-pressed=true]{background:#80202b;border-color:#80202b;color:#fff}

.mgy-pi-reason-dialog{max-width:540px}.mgy-pi-reason-dialog fieldset{border:0;padding:0;margin:8px 0}.mgy-pi-reason-dialog legend{font-weight:650}.mgy-pi-reason-dialog label{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid #ddd4c6;border-radius:8px;margin:8px 0;min-height:48px}.mgy-pi-reason-dialog label:has(input:checked){border-color:#a52332;background:#fff0ed}.mgy-pi-reason-dialog input[type=radio]{width:22px;height:22px;min-height:22px;margin:0;flex:0 0 22px;accent-color:#a52332}.mgy-pi-reason-dialog button[type=submit]{width:100%}.mgy-pi-reason-summary{font-size:15px}

/* Keep the selected list visible above its items at every dialog width. */
[data-pi-list] .mgy-pi-list-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
  gap: 8px;
  padding: 12px 0 16px;
  border-bottom: 1px solid #ded5c6;
}
[data-pi-list] .mgy-pi-list-controls label {
  min-width: 0;
  margin: 0;
  color: #536068;
  font-size: 14px;
}
[data-pi-list] .mgy-pi-list-controls select {
  height: 44px;
  padding-block: 6px;
  color: var(--pi-ink);
  font-size: 16px;
  font-weight: 700;
}
[data-pi-list] .mgy-pi-list-controls button {
  min-height: 44px;
  margin: 0;
}
[data-pi-list] button[aria-expanded="true"] {
  border-color: var(--pi-red);
  color: var(--pi-red);
}
[data-pi-list] .mgy-pi-list-settings:not([hidden]) {
  padding: 4px 12px;
  background: #f5f1e9;
  border-radius: 8px;
}
[data-pi-list] .mgy-pi-list-item > strong {
  display: block;
  margin-bottom: 8px;
  line-height: 1.4;
}
[data-pi-list] .mgy-pi-list-item > label {
  margin: 6px 0;
}
[data-pi-plans] fieldset {
  min-inline-size: 0;
  margin: 8px 0;
  padding: 8px 12px;
  border: 1px solid #ded5c6;
  border-radius: 8px;
}
@media (max-width: 540px) {
  [data-pi-list] .mgy-pi-list-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  [data-pi-list] .mgy-pi-list-controls label {
    grid-column: 1 / -1;
  }
}
