/* ========================================
   PROJECTS GALLERY (/projects/)
   The dot-grid ground is the sea. Each hackathon is an island of square
   tiles cut by glyph patterns from the hero charset.
   ======================================== */

.pg {
  --isle-teal: var(--teal);
  --isle-magenta: #FF6B9D;
  --isle-amber: #F7B731;   /* warnings only (pending, unchecked repo) */
  --isle-blue: #2D9CDB;
  /* Placings, ranked by weight: near-white, pale blue, blue */
  --isle-first: #F1FBFA;
  --isle-second: #A8DBFF;
  --isle-third: #4F9FE6;
  --tile-base: 38px;
  --aside-top: 104px;
}

@media (max-width: 600px) {
  .pg { --tile-base: 30px; }
}

.pg-head {
  display: grid;
  justify-items: start;
  gap: 0.75rem;
  padding: 2.75rem 0 1.75rem;
}

.pg-title {
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: clamp(2.75rem, 6vw, 5.25rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ink);
}

.pg-title__accent { color: var(--teal); }

.pg-stats span { white-space: nowrap; }

.pg-stats {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
}

.pg-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.pg-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--control-line);
  border-radius: 999px;
}

.pg-switch__opt {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 1.15rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-dim);
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.pg-switch__opt:hover { color: var(--ink); }

.pg-switch__opt[aria-current="page"] {
  background: var(--ink);
  color: var(--bg-0);
}

.pg-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3rem;
  align-items: start;
}

.pg-views:focus { outline: none; }

@media (min-width: 1080px) {
  .pg-body { grid-template-columns: minmax(0, 1fr) 300px; gap: 2.5rem; }
  /* An open project gets more room than the key/winners sheet */
  .pg--detail .pg-body { grid-template-columns: minmax(0, 1fr) 440px; }

  .pg-aside {
    padding: 0 0.25rem 1.5rem 2rem;
    border-left: 1px solid var(--line);
  }

  /* The sheet scrolls with the page; an open project stays beside the map */
  .pg--detail .pg-aside {
    position: sticky;
    top: var(--aside-top);
    max-height: calc(100vh - var(--aside-top) - 1rem);
    overflow-x: hidden;   /* never a sideways scroll (hover backgrounds bleed a few px) */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
  }
}

@media (max-width: 1079px) {
  .pg--detail .pg-head,
  .pg--detail .pg-views { display: none; }
  .pg--detail .pg-aside { padding-top: 1.5rem; }
}

/* ---- Buttons ---- */
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.6rem 1.2rem;
  border: 1px solid var(--control-line);
  border-radius: 999px;
  background: transparent;
  font: 600 0.9rem/1.2 var(--font-body);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.pg-btn:hover { border-color: var(--line-hover); background: var(--bg-2); }

.pg-btn--solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg-0);
}

.pg-btn--solid:hover { background: var(--ink); border-color: var(--ink); filter: brightness(0.9); }

/* ---- Key ---- */
.pg-key {
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.pg-key__item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.875rem;
  color: var(--ink-dim);
}

.pg-key--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-bottom: 1.5rem;
}

.pg-key--inline .pg-key__item {
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

@media (min-width: 1080px) {
  .pg-key--inline { display: none; }
}

.keytile {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  background: var(--isle-teal);
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--bg-0);
}

.keytile--featured { background: var(--isle-magenta); }
.keytile--win { background: var(--isle-first); }
.keytile--big { width: 26px; height: 26px; font-size: 1.35rem; }

.keytile--terrain {
  background: radial-gradient(circle, var(--isle-teal) 1px, transparent 1.4px) 0 0 / 5px 5px;
  opacity: 0.7;
}

/* ========================================
   MAP
   ======================================== */
.pmap {
  --tile: var(--tile-base);
  --tile-gap: 3px; /* read by projects-map.js layout() */
  position: relative;
  padding: 1.5rem 0 1rem;
}

.pmap__isles {
  position: relative;
  min-height: 60vh;
}

.pmap__route {
  position: absolute;
  top: 1.5rem;
  left: 0;
  pointer-events: none;
  overflow: visible;
}

.route__path {
  fill: none;
  stroke: var(--isle-teal);
  stroke-opacity: 0.55;
  stroke-width: 1.5;
  stroke-dasharray: 5 5;
  stroke-linecap: round;
}

.route__head {
  fill: none;
  stroke: var(--isle-teal);
  stroke-opacity: 0.8;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route__gap {
  font-family: var(--font-mono);
  font-size: 12px;
  fill: var(--ink-dim);
  stroke: var(--bg-0);
  stroke-width: 4px;
  paint-order: stroke;
}

/* ---- Island ---- */
.isle {
  position: absolute;
  top: 0;
  left: 0;
  width: max-content;
}

.isle__label {
  position: relative;
  display: grid;
  width: max-content; /* measured at its own width, capped by max-width in JS */
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 0.6rem;
  align-items: start;
  margin: 0 0 0.9rem var(--lx, 0);
  padding: 0.1rem 0 0.1rem 0.6rem;
  border-left: 1px solid var(--line-hover);
}

/* Leader line down to the first row of land */
.isle__label::after {
  content: "";
  position: absolute;
  top: 100%;
  left: -1px;
  width: 1px;
  height: calc(0.9rem + var(--leader, 0px));
  background: var(--line-hover);
}

/* Route-order numeral, outlined like a chart callout */
.isle__no {
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-dim);
}

.isle--focus .isle__label { border-left-color: var(--teal); }
.isle--focus .isle__label::after { background: var(--teal); }
.isle--focus .isle__name { color: var(--teal); }
.isle--focus .isle__no { -webkit-text-stroke-color: var(--teal); }

.isle__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--ink);
}

.isle__meta span { display: block; white-space: nowrap; }

.isle__meta {
  margin-top: 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.isle__land {
  position: relative;
  width: calc(var(--cols) * var(--tile) + (var(--cols) - 1) * var(--tile-gap));
  height: calc(var(--rows) * var(--tile) + (var(--rows) - 1) * var(--tile-gap));
}

.isle__ground,
.isle__tiles {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--tile));
  grid-template-rows: repeat(var(--rows), var(--tile));
  gap: var(--tile-gap);
  list-style: none;
}

.isle__ground { pointer-events: none; }

.terrain,
.tile__g,
.hill {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: calc(var(--tile) * 0.3);
  line-height: 1;
}

.terrain span,
.tile__g span,
.hill span {
  display: grid;
  place-items: center;
  overflow: hidden;
}

.terrain {
  color: var(--isle-teal);
  opacity: 0.6;
}

.hill {
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(6, 1fr);
  overflow: hidden;
  color: var(--isle-teal);
  opacity: 0.75;
}

.shallow--under { visibility: hidden; } /* under a neighbouring island */

/* Neighbours in an archipelago alternate their terrain tint, so each island
   reads as its own even where the coasts touch */
.isle--alt .terrain,
.isle--alt .hill { color: var(--isle-second); opacity: 0.5; }

.shallow {
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: calc(var(--tile) * 0.42);
  line-height: 1;
  color: var(--isle-blue);
  opacity: 0.75;
}

/* ---- Project tile ---- */
.tile { min-width: 0; }

.tile__a {
  --fill: var(--isle-teal);
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 2px;
  background: var(--fill);
  color: var(--bg-0);
  text-decoration: none;
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1), background-color 140ms ease, box-shadow 180ms ease;
}

.tile__g { width: 100%; height: 100%; }

.tile--featured .tile__a { --fill: var(--isle-magenta); }
.tile--p1 .tile__a { --fill: var(--isle-first); }
.tile--p2 .tile__a { --fill: var(--isle-second); }
.tile--p3 .tile__a { --fill: var(--isle-third); }

/* Winners carry their placement at display size, cut from the fill */
.tile__place {
  display: grid;
  place-items: center;
  white-space: nowrap;
  width: 100%;
  height: 100%;
  padding-bottom: 6%;
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: calc(var(--tile) * 0.62);
  line-height: 0.8;
  letter-spacing: -0.02em;
}

.tile__place small {
  font-size: 0.42em;
  vertical-align: 0.9em;
  letter-spacing: 0;
}

.tile--gold .tile__place,
.tile--placed .tile__place { font-size: calc(var(--tile) * 1.5); }
/* 1st also gets a hairline frame, so the ranking reads without colour */
.tile--p1 .tile__a { box-shadow: inset 0 0 0 2px var(--bg-0), inset 0 0 0 3px var(--isle-teal); }

.tile__a:hover,
.tile__a:focus-visible {
  z-index: 2;
  background: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.55);
}

.tile__a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 3px;
}

.tile__a[aria-current="true"] {
  z-index: 1;
  box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 4px var(--ink);
}


/* ---- Hover / focus callout ---- */
/* An unboxed label set on the sea, joined to its tile by a hairline */
.pmap__callout {
  --tier: var(--isle-teal);
  position: absolute;
  z-index: 5;
  display: grid;
  gap: 0.1rem;
  max-width: 16rem;
  padding: 0.3rem 0.5rem 0.35rem 0.6rem;
  background: var(--bg-0);
  border-left: 1px solid var(--line-hover);
  pointer-events: none;
}

.pmap__callout--featured { --tier: var(--isle-magenta); }
.pmap__callout--p1 { --tier: var(--isle-first); }
.pmap__callout--p2 { --tier: var(--isle-second); }
.pmap__callout--p3 { --tier: var(--isle-third); }

.pmap__callout::after {
  content: "";
  position: absolute;
  top: 100%;
  left: var(--leader-x, 18px);
  width: 1px;
  height: 14px;
  background: var(--line-hover);
}

.pmap__callout--below::after { top: auto; bottom: 100%; }

.pmap__callout-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
}

.pmap__callout-team {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--ink-dim);
}

.pmap__callout-meta {
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--tier);
}

/* ========================================
   SIGNIFICANCE MARKS
   ======================================== */
.pmark {
  --tier: var(--isle-teal);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--tier);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--tier);
}

.pmark .keytile { width: 9px; height: 9px; }
.pmark--featured { --tier: var(--isle-magenta); }
.pmark--win,
.pmark--p1 { --tier: var(--isle-first); }
.pmark--p2 { --tier: var(--isle-second); }
.pmark--p3 { --tier: var(--isle-third); }
.pmark__place { font-weight: 700; }

.pstars {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-dim);
}

.pstars .icon { color: var(--ink-faint); width: 0.95em; height: 0.95em; }

/* ========================================
   PREVIEW IMAGE / GLYPH PLATE
   ======================================== */
.ppreview {
  --tier: var(--isle-teal);
  position: relative;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  container-type: inline-size;
  background: var(--bg-1);
  border-radius: 4px;
}

.ppreview--featured { --tier: var(--isle-magenta); }
.ppreview--p1 { --tier: var(--isle-first); }
.ppreview--p2 { --tier: var(--isle-second); }
.ppreview--p3 { --tier: var(--isle-third); }

/* Every project image sits in the same 2:1 frame and is shown whole
   (contain, not cover): screenshots narrower than 2:1 all get the frame's
   height and their own width; nothing is cropped. */
.ppreview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ppreview--plate {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
}

.ppreview__field {
  margin: 0;
  font-family: var(--font-mono);
  line-height: 1;
  white-space: pre;
  color: var(--tier);
  opacity: 0.75;
}

.ppreview--lg { border-radius: 6px; }
.ppreview--lg .ppreview__field { font-size: calc(100cqw / 27.5); }
.ppreview--sm .ppreview__field { font-size: calc(100cqw / 10.4); }

.ppreview__note {
  position: absolute;
  left: 0.6rem;
  bottom: 0.5rem;
  padding: 0.15rem 0.4rem;
  background: var(--bg-1);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

/* ========================================
   DETAIL
   ======================================== */
.pdetail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.15rem;
  min-width: 0;
}

.pdetail > * { min-width: 0; }

.pdetail__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pdetail__back {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 40px;
  padding: 0 0.85rem 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font: 600 0.875rem var(--font-body);
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.pdetail__back:hover { color: var(--ink); border-color: var(--line-hover); }

/* Position and, for the submitter, the pencil, at the bar's far corner */
.pdetail__bar-end {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.pdetail__edit {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-dim);
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.pdetail__edit[hidden] { display: none; }
.pdetail__edit:hover { color: var(--teal); border-color: var(--teal-line); background: var(--teal-dim); }
.pdetail__edit .icon { width: 17px; height: 17px; }

.pdetail__note {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--teal);
}
.pdetail__note[hidden] { display: none; }

.pdetail__pos {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}

.pdetail__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
  color: var(--ink);
}

.pdetail__title:focus { outline: none; }

.pdetail__marks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.9rem;
  margin-top: 0.6rem;
}

.pdetail__summary {
  max-width: 62ch;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

.pdetail__facts {
  display: grid;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.pdetail__fact dt {
  margin-bottom: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.pdetail__fact dd > a {
  font-weight: 600;
  color: var(--ink);
  text-underline-offset: 3px;
  text-decoration-color: var(--control-line);
}

.pdetail__fact dd > a:hover { color: var(--teal); text-decoration-color: currentColor; }

.pdetail__when {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.pteam {
  list-style: none;
  display: grid;
  gap: 0.15rem;
}

.pteam__m {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-inline: -0.35rem 0;   /* text lines up with the facts; no bleed past the right edge */
  padding: 0.3rem 0.35rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 150ms ease;
}

.pteam__m:hover { background: var(--bg-2); }
.pteam__m:hover .pteam__name { color: var(--teal); }
.pteam__av { width: 36px; height: 36px; flex: none; }
.pteam__av svg { display: block; width: 36px; height: 36px; }

.pdetail__repo { justify-content: flex-start; width: 100%; min-width: 0; }
.pdetail__repo > span:not(.pdetail__repo-path) { flex: none; white-space: nowrap; }

.pdetail__repo-path {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0.7;
}

.pdetail__walk {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.pdetail__step {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.pdetail__step:hover { border-color: var(--line-hover); background: var(--bg-1); }
.pdetail__step > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdetail__step--next { justify-content: flex-end; text-align: right; }

.pdetail__step-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-faint);
}

.pdetail__onmap {
  justify-self: start;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--teal);
  text-underline-offset: 3px;
}

/* ========================================
   ATLAS SHEET
   ======================================== */
.psheet {
  display: grid;
  gap: 2.25rem;
}

.psheet__h {
  margin-bottom: 0.8rem;
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}

.pwinners,
.pisles { list-style: none; }

.pwinners__a {
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 0.6rem;
  align-items: baseline;
  padding: 0.6rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.pwinners__place {
  grid-row: span 2;
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  line-height: 0.85;
  color: var(--tier, var(--isle-first));
}

.pwinners__place small { font-size: 0.45em; vertical-align: 0.8em; }

.pwinners__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 150ms ease;
}

.pwinners__meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.pwinners__a--p1 { --tier: var(--isle-first); }
.pwinners__a--p2 { --tier: var(--isle-second); }
.pwinners__a--p3 { --tier: var(--isle-third); }
.pwinners__a--placed .pwinners__place { color: transparent; -webkit-text-stroke: 1px var(--tier); }
.pwinners__a--placed .pwinners__place small { color: var(--tier); -webkit-text-stroke: 0; }
.pwinners__a:hover .pwinners__name { color: var(--tier, var(--isle-first)); }

.pisles__b {
  display: grid;
  grid-template-columns: 1.6rem minmax(0, 1fr);
  gap: 0 0.6rem;
  width: 100%;
  padding: 0.65rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  font: inherit;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.pisles__no {
  grid-row: 1 / span 3;
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 0.9;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink-dim);
}


.pisles__name {
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 150ms ease;
}

.pisles__b:hover .pisles__name { color: var(--teal); }

.pisles__meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}

.pisles__strip {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 0.45rem;
}

.pisles__sq {
  width: 11px;
  height: 11px;
  border-radius: 1px;
  background: var(--isle-teal);
}

.pisles__sq--featured { background: var(--isle-magenta); }
.pisles__sq--p1 { background: var(--isle-first); }
.pisles__sq--p2 { background: var(--isle-second); }
.pisles__sq--p3 { background: var(--isle-third); }
.pisles__sq--gold,
.pisles__sq--placed { width: 24px; }



/* ========================================
   LIST
   ======================================== */
.plist-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding-top: 0.25rem;
}

.plist-filters__search,
.plist-filters__select {
  min-height: 40px;
  padding: 0.45em 0.75em;
  background: var(--bg-2);
  border: 1px solid var(--control-line);
  border-radius: 6px;
  font: 500 0.9rem var(--font-body);
  color: var(--ink);
  transition: border-color 150ms ease;
}

.plist-filters__search { flex: 1 1 14rem; max-width: 20rem; }
.plist-filters__search::placeholder { color: var(--ink-faint); }
.plist-filters__select { cursor: pointer; }
.plist-filters__search:hover,
.plist-filters__select:hover { border-color: var(--line-hover); }
.plist-filters__sort { margin-left: auto; }

.plist-filters__check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 40px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-dim);
  cursor: pointer;
}

.plist-filters__check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--teal);
}

.plist-count {
  margin: 1rem 0 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}

.plist__group-h {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.9rem;
  padding: 2rem 0 0.6rem;
  border-bottom: 1px solid var(--line-hover);
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: 1.6rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}

.plist__group-meta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: none;
  color: var(--ink-faint);
}

.plist__rows { list-style: none; }

.prow {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 8.5rem 8rem 3.5rem 2.25rem;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: background-color 150ms ease;
}

.prow:hover { background: var(--bg-1); }

.prow__main { min-width: 0; }

.prow__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
}

/* Whole row opens the project; team and GitHub links sit above it */
.prow__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.prow__link:focus-visible { outline: none; }
.prow:has(.prow__link:focus-visible) {
  outline: 2px solid var(--focus-ring);
  outline-offset: -2px;
  border-radius: 4px;
}

.prow:hover .prow__link { color: var(--teal); }

.prow__sub {
  display: block;
  margin-top: 0.15rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--ink-dim);
}

.prow__marks { min-width: 0; }

.prow__team {
  position: relative;
  z-index: 1;
  display: flex;
  list-style: none;
  padding-left: 6px;
}

.prow__team li { margin-left: -6px; }

.prow__av {
  display: block;
  width: 32px;
  height: 32px;
  padding: 1px;
  border-radius: 50%;
  background: var(--bg-2);
  box-shadow: 0 0 0 2px var(--bg-0);
}

.prow__av svg { display: block; width: 30px; height: 30px; }

.prow__more {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-2);
  box-shadow: 0 0 0 2px var(--bg-0);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-dim);
}

.prow__stars { justify-self: end; }

.prow__gh {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--ink-dim);
  transition: color 150ms ease, background-color 150ms ease;
}

.prow__gh:hover { color: var(--ink); background: var(--bg-2); }
.prow__gh .icon { width: 18px; height: 18px; }

.plist-empty {
  display: grid;
  justify-items: start;
  gap: 0.9rem;
  padding: 3rem 0;
  color: var(--ink-dim);
}

@media (max-width: 860px) {
  .prow { grid-template-columns: 96px minmax(0, 1fr) auto 3.25rem; }
  .prow__marks { display: none; }
  .prow__gh { display: none; }
}

@media (max-width: 600px) {
  .pg-head { padding: 2rem 0 1.5rem; }
  .prow {
    grid-template-columns: 80px minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.65rem 0.25rem;
  }
  .prow__team { display: none; }
  .plist-filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .plist-filters__search { max-width: none; grid-column: 1 / -1; }
  .plist-filters__select { min-width: 0; width: 100%; }
  .plist-filters__check { grid-column: 1 / -1; grid-row: 3; }
  .plist-filters__sort { margin-left: 0; }
  .pmap__callout { max-width: 13rem; }
  .pdetail__repo-path { display: none; }
}

/* ========================================
   CLOSE
   ======================================== */
.pg-close {
  display: grid;
  justify-items: start;
  gap: 1rem;
  max-width: 40rem;
  margin: 5rem 0 4.5rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}

.pg-close__h {
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
  line-height: 0.92;
  text-transform: uppercase;
  text-wrap: balance;
  color: var(--ink);
}

.pg-close__p {
  max-width: 52ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

@media (prefers-reduced-motion: reduce) {
  .tile__a,
  .pg-switch__opt,
  .pg-btn { transition: none; }
  .tile__a:hover,
  .tile__a:focus-visible { transform: none; }
}

/* ---- Plain-text stand-ins for links with nowhere to go (private members) ---- */
.is-inert { cursor: default; }
.pteam__m.is-inert:hover,
.pteam__m.is-private:hover { background: none; }
.pteam__m.is-inert:hover .pteam__name,
.pteam__m.is-private:hover .pteam__name { color: inherit; }
.pteam__m.is-private .pteam__name { color: var(--ink-dim); font-weight: 500; }

/* ---- Guests (0042): named teammates who aren't members. A dashed outline
   figure (never a bot: the grey bot is a private member), plain text, a
   "(guest)" label ---- */
.guestmark { display: block; color: var(--ink-faint); }
.pteam__av--guest svg,
.prow__av--guest svg,
.tguest__mark svg { width: 100%; height: 100%; }
.pteam__m--guest .pteam__name { font-weight: 500; }
.pteam__guest {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-faint);
}
.prow__av--guest { background: var(--bg-0); }



/* ---- Loading, error and empty states ---- */
.pg-status {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 1rem;
  min-height: 50vh;
  padding: 2.5rem 0;
}

.pg-status__msg {
  max-width: 52ch;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

/* While loading, the line breathes once a second; still under reduced motion */
.pg-status--busy .pg-status__msg { animation: pg-breathe 1.2s ease-in-out infinite alternate; }

@keyframes pg-breathe { from { opacity: 1; } to { opacity: 0.45; } }

@media (prefers-reduced-motion: reduce) {
  .pg-status--busy .pg-status__msg { animation: none; }
}

/* While the gallery loads (status showing without a retry, view switch
   still visible; js/projects-page.js), hold the space the loaded map takes
   so nothing jumps when it mounts: the stats line, and the map's minimum
   height (inline key + .pmap padding + .pmap__isles min-height). Error and
   empty states keep their own size. */
.page:has(.pg-switch:not([hidden])):has(.pg-status:not([hidden]) #pg-retry[hidden]) .pg-stats:empty {
  min-height: 1lh;
}

.page:has(.pg-switch:not([hidden])) .pg-status:not([hidden]):has(#pg-retry[hidden]) {
  min-height: calc(60vh + 4rem + 16px);
}

@media (min-width: 1080px) {
  .page:has(.pg-switch:not([hidden])) .pg-status:not([hidden]):has(#pg-retry[hidden]) {
    min-height: calc(60vh + 2.5rem);
  }
}

.pteam__none,
.prow__teamname {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
}

.prow__teamname {
  font-weight: 500;
  color: var(--ink-dim);
  white-space: nowrap;
}

/* ========================================
   MEMBER VIEWS: "Add your project" and "Your projects"
   ======================================== */
.pg--form .pg-body { grid-template-columns: minmax(0, 1fr); }

.pg-mine-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--teal);
  text-underline-offset: 3px;
}

.pg-btn--sm { min-height: 36px; padding: 0.4rem 0.9rem; font-size: 0.85rem; }
.pg-btn[disabled] { opacity: 0.6; cursor: progress; }

.pg-btn--danger {
  border-color: var(--danger-line);
  color: var(--danger);
}

.pg-btn--danger:hover { background: var(--danger-bg); border-color: var(--danger); }

/* A text button: actions inside rows */
.pg-linkbtn {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 0.15rem;
  border: 0;
  background: none;
  font: 600 0.85rem var(--font-body);
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  cursor: pointer;
  transition: text-decoration-color 150ms ease;
}

.pg-linkbtn:hover { text-decoration-color: currentColor; }
.pg-linkbtn--danger { color: var(--danger); }
.pg-linkbtn[disabled] { opacity: 0.55; cursor: progress; }

.pform {
  max-width: 40rem;
  padding: 0.5rem 0 3rem;
}

.pform--wide { max-width: 52rem; }

.pform__h {
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 0.95;
  text-transform: uppercase;
  color: var(--ink);
}

.pform__h:focus { outline: none; }

.pform__lede {
  max-width: 60ch;
  margin: 0.75rem 0 2rem;
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--ink-dim);
}

.pform__form { display: grid; gap: 1.5rem; }

.pform__guest {
  display: grid;
  justify-items: start;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
}

.pform__error {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--danger-line);
  border-radius: 6px;
  background: var(--danger-bg);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--danger);
}

.pform__error:focus { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

.pform__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.pform__done {
  display: grid;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--teal-line);
  color: var(--ink-dim);
  line-height: 1.6;
}

.pform__done-h {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--teal);
}

.pform__done-h:focus { outline: none; }

.pform__done-summary {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--ink);
}

.pform__done-note {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-faint);
}

/* ---- Fields ---- */
.pfield { display: grid; gap: 0.4rem; }

.pfield__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.pfield__label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.pfield__opt { font-weight: 500; color: var(--ink-faint); }

.pfield__count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  color: var(--ink-faint);
}

.pfield__count.is-over { color: var(--danger); }

.pfield__input,
.tpick__input {
  width: 100%;
  min-height: 44px;
  padding: 0.55em 0.8em;
  background: var(--bg-2);
  border: 1px solid var(--control-line);
  border-radius: 6px;
  font: 500 0.95rem var(--font-body);
  color: var(--ink);
  transition: border-color 150ms ease;
}

.pfield__input:hover,
.tpick__input:hover { border-color: var(--line-hover); }
.pfield__input::placeholder,
.tpick__input::placeholder { color: var(--ink-faint); }
.pfield__input[aria-invalid="true"] { border-color: var(--danger); }
select.pfield__input { cursor: pointer; }
.pfield__input[disabled] { opacity: 0.6; cursor: not-allowed; }

.pfield__hint {
  font-size: 0.8rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.pfield__err {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--danger);
}

.pfield__repo {
  min-height: 1.2em;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-faint);
}

.pfield__repo--ok { color: var(--teal); }
.pfield__repo--missing,
.pfield__repo--invalid { color: var(--danger); }
.pfield__repo--unknown { color: var(--isle-amber); }
.pfield__repo:empty { min-height: 0; }

/* ---- Teammate picker ---- */
.tpick { display: grid; gap: 0.6rem; }
.tpick__field { position: relative; }

.tpick__list {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 16rem;
  overflow-y: auto;
  list-style: none;
  padding: 0.3rem;
  background: var(--bg-1);
  border: 1px solid var(--line-hover);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
}

.tpick__opt {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

.tpick__opt[aria-selected="true"],
.tpick__opt:hover { background: var(--bg-2); }
.tpick__slug { margin-left: auto; font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-faint); }

.tpick__note {
  padding: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-dim);
}

.tpick__av { width: 24px; height: 24px; flex: none; }
.tpick__av svg { display: block; width: 100%; height: 100%; }

.tpick__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
}

.tpick__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.25rem 0.2rem 0.4rem;
  border: 1px solid var(--line-hover);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink);
}

.tpick__chip .tpick__av { width: 22px; height: 22px; }

.tpick__remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: none;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--ink-dim);
  cursor: pointer;
}

.tpick__remove:hover { background: var(--bg-2); color: var(--ink); }

/* Guest names (0042): input + Add, chips with the dashed guest marker */
.tguest { display: grid; gap: 0.6rem; }
.tguest__add { display: flex; gap: 0.5rem; align-items: center; }
.tguest__input { flex: 1; min-width: 0; }
.tguest__btn { flex: none; min-height: 44px; }
.tguest__chip { border-style: dashed; }
.tguest__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-faint);
}

/* ---- Your projects ---- */
.pmine__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.pmine { display: grid; gap: 2.25rem; }
.pmine__sec { display: grid; gap: 0.75rem; }

.pmine__h {
  font-family: "Darker Grotesque", var(--font-display);
  font-weight: 800;
  font-size: 1.35rem;
  line-height: 1;
  text-transform: uppercase;
  color: var(--ink);
}

.pmine__list { list-style: none; border-top: 1px solid var(--line); }

.pmine__item {
  display: grid;
  gap: 0.5rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.pmine__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.pmine__main { min-width: 0; display: grid; gap: 0.2rem; }

.pmine__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.pmine__meta,
.pmine__team {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--ink-dim);
  overflow-wrap: anywhere;
}

.pmine__meta a { color: var(--ink-dim); text-underline-offset: 3px; }
.pmine__meta a:hover { color: var(--teal); }
.pmine__team { color: var(--ink-faint); }

.pmine__note { font-size: 0.85rem; line-height: 1.5; color: var(--ink-faint); }

.pmine__reason {
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  background: var(--danger-bg);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ink);
}

.pmine__reason-k { font-weight: 600; color: var(--danger); }

.pmine__acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1rem;
}

.pmine__msg { font-size: 0.85rem; line-height: 1.5; color: var(--teal); }
.pmine__msg:empty { display: none; }
.pmine__msg.is-error { color: var(--danger); }
.pmine__invite { font-size: 0.95rem; line-height: 1.5; color: var(--ink-dim); }
.pmine__invite strong { color: var(--ink); }
.pmine__item--invite .pmine__acts { gap: 0.6rem; }

.pmine__empty {
  display: grid;
  justify-items: start;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
}

.pmine__panel {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-1);
}

/* Review status: the same three states everywhere */
.pstatus {
  flex: none;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--line-hover);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--ink-dim);
}

.pstatus--pending { border-style: dashed; color: var(--isle-amber); border-color: var(--isle-amber); }
.pstatus--approved { color: var(--teal); border-color: var(--teal-line); }
.pstatus--rejected { color: var(--danger); border-color: var(--danger-line); }

.pedit { display: grid; gap: 1.25rem; }
.pedit__form { display: grid; gap: 1rem; }

/* The team inside Edit: saved as it changes, so set apart from the form */
.pedit__team {
  display: grid;
  gap: 0.6rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}
.pedit__sec-h {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.pedit__sec-h:focus { outline: none; }
.pedit__team .pteam-edit { margin-top: 0.3rem; }
.pedit__warn { font-size: 0.875rem; line-height: 1.5; color: var(--isle-amber); }
.pedit__btns { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.pteam-edit { display: grid; gap: 0.9rem; }
.pteam-edit__list { list-style: none; display: grid; gap: 0.2rem; }

.pteam-edit__row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.6rem;
  min-height: 40px;
  font-size: 0.9rem;
  color: var(--ink);
}

.pteam-edit__av svg { display: block; width: 26px; height: 26px; }
.pteam-edit__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pteam-edit__state { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-faint); }
.pteam-edit__btns { display: flex; gap: 0.75rem; }
.pteam-edit__input { grid-column: span 2; min-height: 36px; padding-block: 0.3em; }
.pconfirm { display: grid; gap: 0.9rem; font-size: 0.9rem; line-height: 1.5; color: var(--ink); }

@media (max-width: 600px) {
  .pmine__row { flex-direction: column; gap: 0.5rem; }
  .pteam-edit__row { grid-template-columns: 26px minmax(0, 1fr) auto; }
  .pteam-edit__state { display: none; }
  .pteam-edit__input { grid-column: auto; }
}

/* ---- Project image field (0061) ---- */
.pimg { display: grid; gap: 0.6rem; }
.pimg__frame {
  width: min(100%, 360px);
  aspect-ratio: 2 / 1;           /* the gallery's frame, so the preview is what the map shows */
  overflow: hidden;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.pimg__img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pimg__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.9rem; }
.pimg__status { font-size: 0.8rem; color: var(--ink-faint); }

/* ---- Award claims (0061) ---- */
.paward { display: grid; gap: 0.6rem; justify-items: start; }
.paward__rows { list-style: none; display: grid; gap: 0.5rem; width: 100%; }
.paward__row { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: 0.5rem; align-items: center; }
@media (max-width: 520px) {
  .paward__row { grid-template-columns: minmax(0, 1fr) auto; }
  .paward__track { grid-column: 1 / 2; }
}

.pform__done-note--warn { color: var(--isle-amber); }

/* Wins and claims on Your projects */
.pmine__award { margin-top: 0.25rem; font-size: 0.85rem; color: var(--ink-dim); }
.pmine__award-k {
  margin-right: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--isle-amber);
}
.pmine__award--won .pmine__award-k { color: var(--teal); }
.pmine__award-note { color: var(--ink-faint); }

/* ---- Edit dialog (the detail's pencil; projects-mine.js openEditor) ----
   Top layer (showModal), so nothing on the page sits over it. */
.pedit-dialog {
  width: min(640px, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-1);
  color: var(--ink);
}
.pedit-dialog::backdrop { background: rgba(10, 11, 11, 0.72); }

.pedit-dialog__head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem 0.9rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}
.pedit-dialog__h {
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}
.pedit-dialog__x {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-faint);
  cursor: pointer;
}
.pedit-dialog__x:hover { color: var(--ink); border-color: var(--line); }
.pedit-dialog__body { padding: 1.1rem 1.25rem 1.25rem; }
.pmine__item--dialog { padding: 0; border-bottom: 0; }
.pmine__item--dialog .pmine__panel { padding: 0; border: 0; background: none; }

@media (max-width: 560px) {
  .pedit-dialog {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
  }
  .pedit-dialog__body { padding: 1rem; }
}
