/* A player's profile. The banner is the player's own topographic sheet, tinted with their accent. */

.profile-page {
  --accent: #f0287f;
  --accent-2: #ffc35c;
  padding-top: 28px;
}

/* ------------------------------------------------------------ head */

.pf-banner {
  position: relative;
  height: clamp(170px, 22vw, 290px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(120% 140% at 88% -10%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
    linear-gradient(165deg, #241653, #150d31 72%);
}

.pf-banner svg,
.pf-banner-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-banner .c,
.banner-preview .c {
  fill: none;
  stroke: color-mix(in srgb, var(--accent) 55%, #c9b8ff);
  stroke-opacity: 0.2;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.pf-banner .c.i,
.banner-preview .c.i {
  stroke-opacity: 0.38;
  stroke-width: 1.3;
}

.pf-banner .track-casing,
.banner-preview .track-casing {
  fill: none;
  stroke: var(--ink);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.pf-banner .track,
.banner-preview .track {
  fill: none;
  stroke: var(--moon);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.8;
}

.pf-banner .train,
.banner-preview .train {
  stroke: var(--moon);
  stroke-width: 2;
}

.pf-id {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  margin-top: 18px;
  padding: 0 28px;
}

.pf-avatar {
  position: relative;
  width: 152px;
  height: 152px;
  margin-top: -96px;
  border: 6px solid var(--night);
  border-radius: 50%;
  background: var(--night-2);
  object-fit: cover;
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.8);
}

.pf-avatar.frame-gold {
  box-shadow: 0 0 0 3px var(--amber), 0 0 26px rgba(255, 195, 92, 0.45);
}

.pf-avatar.frame-signal {
  box-shadow: 0 0 0 3px var(--green), 0 0 0 6px var(--night), 0 0 0 9px var(--pink);
}

.pf-avatar.frame-steam {
  box-shadow: 0 0 0 3px var(--cyan), 0 0 30px rgba(69, 212, 240, 0.45);
}

.pf-who {
  min-width: 0;
  padding-bottom: 6px;
}

.pf-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.pf-name h1 {
  min-width: 0;
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  font-stretch: 82%;
  line-height: 0.95;
  letter-spacing: -0.008em;
  overflow-wrap: anywhere;
}

.pf-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 10px;
  color: var(--haze);
  font-size: 15px;
}

.pf-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pf-meta svg {
  width: 16px;
  height: 16px;
  color: var(--dim);
}

.pf-handle {
  color: var(--moon);
  font-weight: 600;
}

.pf-actions {
  display: flex;
  gap: 10px;
  padding-bottom: 10px;
}

.pf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 28px 0;
  padding: 0;
  list-style: none;
}

.pf-badges .chip svg {
  width: 13px;
  height: 13px;
}

.pf-bio {
  max-width: 68ch;
  margin: 18px 28px 0;
  font-size: 18px;
  line-height: 1.6;
  white-space: pre-line;
}

.pf-empty {
  color: var(--haze);
  font-size: 16.5px;
}

/* ------------------------------------------------------------ body */

.pf-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 44px;
  margin-top: 48px;
}

.pf-section {
  margin-bottom: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.pf-section > h2 {
  margin-bottom: 18px;
  font-size: 26px;
  font-weight: 750;
  font-stretch: 86%;
}

.pf-sub {
  margin: 20px 0 10px;
  color: var(--dim);
  font: 700 14.5px/1.2 var(--text);
}

.pf-note,
.pf-small {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--dim);
  font-size: 14.5px;
}

.pf-note {
  margin-top: 14px;
}

.pf-small {
  margin-bottom: 10px;
  color: var(--haze);
}

.pf-note svg,
.pf-small svg {
  width: 17px;
  height: 17px;
  flex: none;
}

.pf-empty-line {
  color: var(--haze);
}

.pf-empty-line a {
  color: var(--moon);
  text-underline-offset: 3px;
}

/* Career */
.pf-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.pf-stats div {
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.pf-stats dt {
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 600;
}

.pf-stats dd {
  margin: 4px 0 0;
  font: 800 38px/1 var(--display);
  font-stretch: 80%;
  font-variant-numeric: tabular-nums;
}

/* The last 12 weeks: miles and hours, a small column chart each */
.pf-weeks-block {
  margin-top: 22px;
}

.pf-weeks-title {
  color: var(--haze);
  font-size: 15px;
  font-weight: 650;
}

.pf-weeks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.pf-week-chart {
  min-width: 0;
  margin: 0;
  padding: 14px 16px 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.pf-week-chart figcaption {
  color: var(--dim);
  font-size: 13.5px;
  font-weight: 600;
}

.pf-week-frame {
  position: relative;
  margin-top: 6px;
}

.pf-week-plot {
  width: 100%;
  min-height: 150px;
  border-radius: 8px;
  cursor: default;
}

.pf-week-plot:focus-visible {
  outline: 2px solid var(--moon);
  outline-offset: 4px;
}

.pf-week-plot svg {
  display: block;
  overflow: visible;
}

.pf-week-grid {
  stroke: var(--line);
  stroke-width: 1;
}

.pf-week-bar {
  fill: #f0287f;
}

.pf-week-bar.is-on {
  fill: #ff5c9d;
}

.pf-week-axis {
  fill: var(--dim);
  font: 500 11.5px var(--text);
  font-variant-numeric: tabular-nums;
}

.pf-week-value {
  fill: var(--moon);
  font: 700 12px var(--text);
  font-variant-numeric: tabular-nums;
}

.pf-week-tip {
  position: absolute;
  z-index: 2;
  display: grid;
  gap: 1px;
  min-width: 110px;
  padding: 7px 10px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--night-2);
  box-shadow: 0 8px 22px rgba(8, 4, 24, 0.5);
  pointer-events: none;
  white-space: nowrap;
}

.pf-week-tip b {
  color: var(--moon);
  font-size: 14.5px;
  font-weight: 750;
}

.pf-week-tip span {
  color: var(--dim);
  font-size: 12.5px;
}

.pf-weeks-table {
  margin-top: 10px;
}

.pf-weeks-table summary {
  width: fit-content;
  color: var(--haze);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.pf-weeks-table summary:hover {
  color: var(--moon);
}

.pf-weeks-table table {
  width: 100%;
  max-width: 460px;
  margin-top: 10px;
  border-collapse: collapse;
  font-size: 14px;
}

.pf-weeks-table th,
.pf-weeks-table td {
  padding: 6px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.pf-weeks-table thead th {
  color: var(--dim);
  font-size: 12.5px;
  font-weight: 650;
}

.pf-weeks-table tbody th {
  color: var(--haze);
  font-weight: 500;
}

.pf-weeks-table td {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.pf-weeks-table thead th:not(:first-child) {
  text-align: right;
}

.pf-weeks-none {
  margin-top: 14px;
}

/* Work */
.jobs {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.job {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 8, 34, 0.35);
}

.job-past {
  background: none;
  border-style: dashed;
}

.job-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
}

.job-initial {
  color: var(--moon);
  font: 800 18px/1 var(--display);
}

.job-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.job-text b {
  font-size: 17px;
}

.job-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--haze);
  font-size: 15px;
}

.job-text small {
  color: var(--dim);
  font-size: 13.5px;
}

/* Achievements */
.achs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ach {
  --tier: var(--haze);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.tier-bronze {
  --tier: #e7a872;
}

.tier-silver {
  --tier: #d3cdea;
}

.tier-gold {
  --tier: var(--amber);
}

.tier-legend {
  --tier: var(--pink);
}

.ach-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--tier);
  border-radius: 50%;
  background: color-mix(in srgb, var(--tier) 14%, transparent);
  color: var(--tier);
}

.ach-icon svg {
  width: 22px;
  height: 22px;
}

.ach-text {
  display: grid;
  min-width: 0;
}

.ach-text b {
  font-size: 15.5px;
}

.ach-text small {
  color: var(--haze);
  font-size: 13.5px;
  line-height: 1.35;
}

.ach-text .ach-when {
  margin-top: 3px;
  color: var(--dim);
  font-size: 12.5px;
}

.ach-locked {
  background: none;
  border-style: dashed;
}

.ach-locked .ach-icon {
  border-style: dashed;
  background: none;
  color: var(--dim);
  border-color: var(--line-strong);
}

.ach-locked b {
  color: var(--haze);
}

.achs-more {
  margin-top: 16px;
}

.achs-more summary {
  width: fit-content;
  margin-bottom: 12px;
  color: var(--haze);
  font-weight: 650;
  cursor: pointer;
}

.achs-more summary:hover {
  color: var(--moon);
}

/* Side */
.pf-side {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  display: grid;
  gap: 14px;
}

.pf-card {
  padding: 20px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--panel);
}

.pf-card h2 {
  margin-bottom: 14px;
  font-size: 19px;
  font-weight: 750;
  font-stretch: 88%;
}

.follow-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.follow-count {
  display: grid;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(13, 8, 34, 0.45);
  color: var(--moon);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.follow-count:hover {
  border-color: var(--line-strong);
}

.follow-count b {
  font: 800 28px/1 var(--display);
  font-stretch: 82%;
}

.follow-count span {
  color: var(--haze);
  font-size: 13.5px;
}

.conns {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.conns li {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.conns li > span:last-child {
  display: grid;
  min-width: 0;
}

.conn-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(246, 241, 255, 0.06);
  color: var(--haze);
}

.conn-icon svg {
  width: 19px;
  height: 19px;
}

.conns small {
  color: var(--dim);
  font-size: 12.5px;
  font-weight: 600;
}

.conns b,
.conns a {
  overflow: hidden;
  font-size: 15px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conns a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-underline-offset: 3px;
}

.inline-icon {
  width: 14px;
  height: 14px;
  color: var(--dim);
}

.conn-add a {
  color: var(--amber);
}

.conn-note {
  color: var(--dim);
  font-size: 13px;
}

.conn-off {
  color: var(--haze);
  font-size: 13px;
}

/* Missing or private */
.pf-missing {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 90px 0 40px;
  text-align: center;
}

.pf-missing h1 {
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  font-stretch: 82%;
}

.pf-missing p {
  max-width: 46ch;
  color: var(--haze);
}

.pf-missing .pf-avatar {
  margin-top: 0;
}

.pf-missing .button {
  margin-top: 10px;
}

.pf-missing-mark {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  color: var(--dim);
}

.pf-missing-mark svg {
  width: 40px;
  height: 40px;
}

/* ------------------------------------------------------------ editor */

.avatar-edit {
  display: flex;
  align-items: center;
  gap: 18px;
}

.avatar-edit img {
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
  background: var(--night-2);
}

.avatar-edit-actions {
  display: grid;
  justify-items: start;
  gap: 8px;
}

.avatar-edit-actions label {
  position: relative; /* its hidden file box stays inside the scrolling part */
  cursor: pointer;
}

.avatar-edit-actions label:focus-within {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.avatar-edit-actions label[data-busy="true"] {
  cursor: progress;
  opacity: 0.6;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.privacy-set {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}

.privacy-set legend {
  margin-bottom: 14px;
  padding: 0;
  font: 750 21px/1.2 var(--display);
  font-stretch: 88%;
  scroll-margin-top: 20px;
}

.privacy-set .field {
  margin-bottom: 10px;
}

.plus-teaser {
  padding: 18px;
  border: 1px solid rgba(255, 195, 92, 0.35);
  border-radius: 18px;
  background: linear-gradient(120deg, rgba(255, 195, 92, 0.1), rgba(240, 40, 127, 0.08));
}

.plus-teaser h3 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffe0a6;
  font: 750 19px/1.2 var(--display);
  font-stretch: 88%;
}

.plus-teaser h3 svg {
  width: 16px;
  height: 16px;
}

.plus-teaser p {
  margin-top: 6px;
  color: var(--haze);
  font-size: 14.5px;
}

/* ------------------------------------------------------------ Hub Plus in the editor */

.plus-set {
  display: grid;
  gap: 18px;
  margin: 0;
  padding: 20px 18px 22px;
  border: 1px solid rgba(255, 195, 92, 0.35);
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(255, 195, 92, 0.08), rgba(240, 40, 127, 0.05) 60%, transparent);
}

.plus-set > legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  color: #ffe0a6;
  font: 750 21px/1.2 var(--display);
  font-stretch: 88%;
  scroll-margin-top: 20px;
}

.plus-set > legend svg {
  width: 17px;
  height: 17px;
}

.plus-status {
  margin-top: -6px;
  color: var(--haze);
  font-size: 14.5px;
}

.banner-edit {
  display: grid;
  gap: 10px;
}

.banner-preview {
  position: relative;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background:
    radial-gradient(120% 140% at 88% -10%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 62%),
    linear-gradient(165deg, #241653, #150d31 72%);
}

.banner-preview svg,
.banner-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.banner-actions label {
  position: relative;
  cursor: pointer;
}

.banner-actions label:focus-within {
  outline: 3px solid var(--amber);
  outline-offset: 3px;
}

.banner-actions label[data-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.color-pick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(13, 8, 34, 0.6);
}

.color-pick:focus-within {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 195, 92, 0.2);
}

.color-pick input {
  width: 38px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: none;
  cursor: pointer;
}

.color-pick input::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-pick input::-webkit-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.color-pick input::-moz-color-swatch {
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.color-pick output {
  color: var(--haze);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.color-reset {
  justify-self: start;
  margin-top: -8px;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.frame-set,
.showcase-set {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.frame-set legend,
.showcase-set legend {
  margin-bottom: 10px;
  padding: 0;
}

.showcase-set .field-help {
  margin-top: -6px;
}

.frame-picks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.frame-pick {
  position: relative; /* keeps its hidden radio button inside the scrolling part */
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 14px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--haze);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.frame-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.frame-pick:has(input:checked) {
  border-color: var(--amber);
  background: rgba(255, 195, 92, 0.08);
  color: var(--moon);
}

.frame-pick:has(input:focus-visible) {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.frame-swatch {
  width: 52px;
  height: 52px;
  border: 3px solid var(--night);
  border-radius: 50%;
  object-fit: cover;
  background: var(--night-2);
}

.frame-swatch.frame-gold {
  box-shadow: 0 0 0 2px var(--amber), 0 0 14px rgba(255, 195, 92, 0.45);
}

.frame-swatch.frame-signal {
  box-shadow: 0 0 0 2px var(--green), 0 0 0 4px var(--night), 0 0 0 6px var(--pink);
}

.frame-swatch.frame-steam {
  box-shadow: 0 0 0 2px var(--cyan), 0 0 16px rgba(69, 212, 240, 0.45);
}

.showcase-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.showcase-pick {
  --tier: var(--haze);
  position: relative; /* keeps its hidden checkbox inside the scrolling part */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 12px 4px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--haze);
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.showcase-pick input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.showcase-pick:has(input:checked) {
  border-color: var(--tier);
  background: color-mix(in srgb, var(--tier) 14%, transparent);
  color: var(--moon);
}

.showcase-pick:has(input:disabled) {
  opacity: 0.45;
  cursor: not-allowed;
}

.showcase-pick:has(input:focus-visible) {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.showcase-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--tier) 16%, transparent);
  color: var(--tier);
}

.showcase-icon svg {
  width: 15px;
  height: 15px;
}

/* A pinned achievement leads the list, lit in its own color. */
.ach.ach-pinned {
  border-color: color-mix(in srgb, var(--tier) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--tier) 12%, transparent), var(--panel) 70%);
}

.follows-body {
  max-height: min(60vh, 520px);
  padding: 8px 14px 18px;
  overflow-y: auto;
}

.people {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.people a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: 12px;
  text-decoration: none;
}

.people a:hover {
  background: rgba(246, 241, 255, 0.06);
}

.people img {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  object-fit: cover;
}

.people span {
  display: grid;
}

.people small {
  color: var(--dim);
}

/* ------------------------------------------------------------ smaller screens */

@media (max-width: 980px) {
  .pf-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .pf-side {
    position: static;
    grid-row: 1;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-bottom: 36px;
  }
}

@media (max-width: 760px) {
  .pf-weeks {
    grid-template-columns: 1fr;
  }

  .profile-page {
    padding-top: 16px;
  }

  .pf-banner {
    border-radius: 20px;
  }

  .pf-id {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
    margin-top: 0;
    padding: 0 12px;
  }

  .pf-avatar {
    width: 116px;
    height: 116px;
    margin-top: -62px;
    border-width: 5px;
  }

  .pf-actions {
    padding-bottom: 0;
  }

  .pf-actions .button {
    flex: 1;
  }

  .pf-badges,
  .pf-bio {
    margin-inline: 12px;
  }

  .pf-bio {
    font-size: 17px;
  }

  .pf-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pf-stats dd {
    font-size: 32px;
  }

  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Reporting someone, quietly, at the foot of the side column. */
.pf-report {
  display: flex;
  justify-content: flex-end;
}

.pf-report .text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--dim);
  font-size: 14px;
}

.pf-report svg {
  width: 15px;
  height: 15px;
}

/* ------------------------------------------------------------ deleting the account */

.danger-zone {
  display: grid;
  justify-items: start;
  gap: 6px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.danger-zone h3 {
  font-size: 17px;
}

.danger-zone p {
  color: var(--haze);
  font-size: 14.5px;
}

.danger-zone .button {
  margin-top: 6px;
}

.delete-dialog {
  width: min(520px, calc(100% - 32px));
}

.delete-body {
  display: grid;
  gap: 16px;
  padding: 20px 24px;
}

.delete-body > p,
.delete-list p {
  color: var(--haze);
  font-size: 15px;
}

.delete-list b,
.delete-body label b {
  color: var(--moon);
}

.delete-list ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.delete-list a {
  color: var(--moon);
  text-underline-offset: 3px;
}

/* ---------------------------------------------------------------- media they share (1.0.53) */

.media-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.media-head h2 {
  font-size: 26px;
  font-weight: 750;
  font-stretch: 86%;
}

/* The tiles themselves (.media-grid, .media-tile and what's on them) are in site.css: Favorites has them too. */

.media-more {
  margin-top: 14px;
}

/* Sharing one. */
.media-share {
  width: min(560px, calc(100% - 32px));
  max-height: calc(100% - 32px);
}

.media-share form {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 34px);
}

.media-share-body {
  display: grid;
  gap: 16px;
  padding: 4px 24px 8px;
  overflow: auto;
}

/* What may be shared: Railroader, or a railroad's logo. */
.media-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid rgba(255, 195, 92, 0.28);
  border-radius: 12px;
  background: rgba(255, 195, 92, 0.07);
  color: var(--haze);
  font-size: 14px;
  line-height: 1.45;
}

.media-rule svg {
  flex: none;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  color: var(--amber);
}

.media-rule b {
  color: var(--moon);
}

.media-rule a {
  color: var(--amber);
  white-space: nowrap;
}

.media-kinds {
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.media-kinds input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.media-kinds span {
  display: block;
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--haze);
  font-weight: 650;
  font-size: 15px;
  cursor: pointer;
}

.media-kinds input:checked + span {
  background: var(--pink);
  color: #fff;
}

.media-kinds input:focus-visible + span {
  outline: 2px solid var(--moon);
  outline-offset: 2px;
}

.media-drop {
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  text-align: center;
  cursor: pointer;
}

.media-drop:hover,
.media-drop-over,
.media-drop:focus-within {
  border-color: rgba(240, 40, 127, 0.6);
  background: rgba(240, 40, 127, 0.06);
}

.media-drop img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 10px;
}

.media-drop-words {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.media-drop-words svg {
  width: 26px;
  height: 26px;
  margin-bottom: 4px;
  color: var(--pink);
}

.media-drop-words small {
  color: var(--dim);
  font-size: 14px;
}

.media-share-note {
  margin: 0;
}

/* Looking at one. */
.media-view {
  width: min(1100px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  background: #120b2e;
}

.media-view[open] {
  display: flex;
  flex-direction: column;
}

.media-view-by {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 10px;
  min-width: 0;
  margin: 0;
}

.media-view-by img {
  flex: none;
  border-radius: 50%;
}

.media-view-by b {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* The date stays whole; on a narrow screen it goes under the name. */
.media-view-by time {
  color: var(--dim);
  font-size: 14px;
  white-space: nowrap;
}

.media-view-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  min-height: 200px;
  max-height: 70vh;
  overflow: hidden;
  background: #0b0620;
}

.media-view-picture {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.media-view-video {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  width: 100%;
  color: var(--moon);
  text-decoration: none;
}

.media-view-site {
  display: grid;
  place-items: end center;
  width: 100%;
  min-height: 320px;
  padding-bottom: 34px;
  background: linear-gradient(135deg, var(--night-3), var(--night-2));
  color: var(--haze);
  font-weight: 750;
  font-size: 18px;
}

.media-step {
  position: absolute;
  top: 50%;
  margin-top: -20px;
  background: rgba(13, 8, 34, 0.72);
}

.media-prev {
  left: 12px;
}

.media-next {
  right: 12px;
}

.media-view-foot {
  display: grid;
  gap: 12px;
  padding: 16px 24px 22px;
}

.media-view-caption {
  margin: 0;
  font-size: 17px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.media-view-ask {
  margin: 0;
  color: var(--haze);
}

.media-view-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.media-view-actions .text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.media-view-actions .text-button svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.media-team {
  color: var(--red);
}

/* Upvote and Favorite (1.0.56): pills that light up once pressed, pink for an upvote and amber for a favorite. */
.media-react {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--moon);
  font: inherit;
  font-weight: 650;
  font-size: 14.5px;
  cursor: pointer;
}

.media-react svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.media-react:hover {
  border-color: var(--haze);
}

.media-react:disabled {
  opacity: 0.6;
  cursor: progress;
}

.media-react-n {
  color: var(--haze);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.media-vote[aria-pressed="true"] {
  border-color: rgba(240, 40, 127, 0.6);
  background: rgba(240, 40, 127, 0.14);
  color: #ff8fbd;
}

.media-fav[aria-pressed="true"] {
  border-color: rgba(255, 195, 92, 0.55);
  background: rgba(255, 195, 92, 0.12);
  color: var(--amber);
}

.media-vote[aria-pressed="true"] svg,
.media-fav[aria-pressed="true"] svg {
  fill: currentColor;
}

.media-vote[aria-pressed="true"] .media-react-n {
  color: inherit;
}

/* Your own: how many upvotes it has, nothing to press. */
.media-react-own,
.media-react-own:hover {
  border-color: var(--line);
  color: var(--haze);
  cursor: default;
}

@media (max-width: 560px) {
  .media-share-body,
  .media-view-foot {
    padding-left: 18px;
    padding-right: 18px;
  }
}
