/* Point map: the product's own styling, on top of room-base.css. Phone-first; checked from 320px to 1280px wide. */
.row.wrap { flex-wrap: wrap; }
.pm-field { display: grid; gap: 4px; text-align: left; }
.pm-away { opacity: .6; }
h3 { margin: 12px 0 6px; font-size: 15px; }
ol, ul { margin: 0; padding-left: 20px; }

/* ---- add form + queue: stacked on phones, side by side on wide screens ---- */
.pm-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; align-items: start; }
@media (min-width: 900px) { .pm-top { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); } }
.pm-form h2 { margin: 0; }
.pm-more summary { cursor: pointer; padding: 4px 0 8px; color: var(--muted); }
.pm-more .stack { margin-top: 4px; }

.pm-queue-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.pm-queue-item { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; min-width: 0; }
.pm-queue-item.placing { border-color: var(--accent); }
.pm-queue-item .row { margin-top: 2px; }

/* ---- story text ---- */
.pm-story-title { font-weight: 600; overflow-wrap: anywhere; }
.pm-ticket { font-family: ui-monospace, monospace; color: var(--muted); overflow-wrap: anywhere; }
a.pm-ticket { color: var(--link); }
.pm-notes { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; color: var(--muted); }
.pm-badge {
  display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px;
  background: var(--accent); color: var(--accent-text); vertical-align: middle;
}
.pm-badge.anchor-badge { background: var(--caution); display: block; width: fit-content; margin-bottom: 4px; }

/* ---- placing a story ---- */
.pm-placing { border-color: var(--accent); }
.pm-progress { margin-bottom: 8px; }
.pm-compare { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: stretch; }
@media (min-width: 700px) { .pm-compare { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; } }
.pm-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--bg); display: grid; gap: 4px; min-width: 0; align-content: start; }
.pm-card.pm-new { border-color: var(--accent); }
.pm-card .pm-story-title { font-size: 19px; }
.pm-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pm-vs { text-align: center; color: var(--muted); font-size: 14px; }
.pm-question { margin: 16px 0 10px; font-size: 20px; }
.pm-where { margin: 10px 0 0; }

.pm-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 520px) { .pm-choices { grid-template-columns: minmax(0, 1fr); } }
.pm-points { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px; }
.pm-choice {
  display: grid; gap: 2px; place-items: center; min-height: 64px; padding: 10px 8px; font-size: 20px; font-weight: 600;
  border-width: 2px; text-align: center; overflow-wrap: anywhere;
}
.pm-choice-main { font-size: 19px; }
.pm-choice-hint { font-weight: 400; color: var(--muted); }
.pm-choice.chosen { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.pm-choice.chosen .pm-choice-hint { color: inherit; opacity: .85; }
.pm-choice:disabled.chosen { opacity: 1; }

/* ---- reveal ---- */
.pm-result { margin-top: 14px; display: grid; gap: 8px; }
.pm-result h3 { margin: 0; }
.pm-results { list-style: none; padding: 0; display: grid; gap: 6px; }
.pm-results li { display: grid; grid-template-columns: minmax(0, 9em) 2em minmax(0, 1fr); gap: 4px 10px; align-items: baseline; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; }
.pm-results li.win { border-color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.pm-res-choice { font-weight: 600; }
.pm-res-count { font-variant-numeric: tabular-nums; text-align: right; }
.pm-res-names { color: var(--muted); overflow-wrap: anywhere; }
@media (max-width: 420px) { .pm-results li { grid-template-columns: minmax(0, 1fr) 2em; } .pm-res-names { grid-column: 1 / -1; } }
.pm-outcome { margin: 4px 0; font-weight: 600; }
.pm-tie { color: var(--caution); }
.pm-host { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.pm-direct { margin-top: 10px; }
.pm-trail-box { margin-top: 12px; }
.pm-trail { display: grid; gap: 4px; margin-top: 6px; overflow-wrap: anywhere; }

/* ---- the map: a column per point value (smallest stories at the top); they stack on a phone ---- */
.pm-map { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 10px; align-items: start; }
.pm-col { border: 1px solid var(--border); border-radius: 10px; padding: 8px; display: grid; gap: 8px; min-width: 0; background: var(--bg); }
.pm-col.empty { padding: 6px 8px; opacity: .65; }
.pm-col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pm-points-label { font-size: 22px; font-weight: 700; }
.pm-tier { display: grid; gap: 4px; min-width: 0; }
.pm-tier.tied { border-left: 3px solid var(--accent); padding-left: 6px; }
.pm-item { min-width: 0; }
.pm-story {
  display: grid; gap: 2px; width: 100%; text-align: left; padding: 8px 10px; background: var(--panel);
  white-space: normal; overflow-wrap: anywhere; min-width: 0;
}
.pm-story.anchor { border-color: var(--caution); }
.pm-item.open .pm-story { border-color: var(--accent); }
.pm-detail { display: grid; gap: 6px; padding: 8px 4px 4px; min-width: 0; overflow-wrap: anywhere; }
.pm-detail h3 { margin: 4px 0 2px; }

/* ---- reference ---- */
#pm-ref h2 select { display: inline-block; width: auto; min-width: 4.5em; font-size: inherit; font-weight: 700; padding: 2px 8px; }
.pm-ref-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.pm-ref-list li { border-left: 3px solid var(--accent); padding-left: 10px; display: grid; gap: 2px; min-width: 0; }
.pm-glance { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; }
.pm-glance dt { font-weight: 700; text-align: right; }
.pm-glance dd { margin: 0; overflow-wrap: anywhere; }

@media (max-width: 600px) {
  .pm-choice { min-height: 60px; }
  .pm-question { font-size: 18px; }
}
