/* WikiPons v9: the profile editor and the public profile. Owner: WP4. Scope: .pf-page, .pf-editor, .pf-*, .ed-*. */
/* The banner is the loudest surface of the page; everything under it stays neutral so the player's cosmetics carry
   the color (spec 7.3). Numbers use condensed 900 proportional figures (Mona Sans draws its tabular zero with a
   slash); labels are 13 to 14px sentence case. */

/* ══ the public profile ══════════════════════════════════════════════════════════════════════ */
.pf-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 1180px; min-width: 0; }
.pf-bio { margin: -10px 0 0; padding: 0 24px; max-width: 70ch; font-size: 16px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.pf-online { display: inline-flex; align-items: center; gap: 7px; color: var(--text); }
.pf-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.pf-guild { display: inline-flex; align-items: center; gap: 6px; }
.pf-guild svg { width: 16px; height: 16px; fill: currentColor; }
.pf-pro { display: inline-grid; place-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-pill); background: #0F0F12; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); color: #fff; font-style: italic; font-stretch: 75%; font-weight: 900; font-size: 14px; }
.pf-views { font-size: 14px; color: var(--text-2); margin-right: 6px; white-space: nowrap; }
.pf-views b { color: var(--text); font-weight: 800; }
.pf-note { font-size: 14px; color: var(--text-2); }
.pf-quiet { margin: 0; font-size: 14px; color: var(--text-2); }

/* sections: the condensed display type carries the hierarchy, no eyebrow */
.pf-sec { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.pf-sec-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.pf-sec-head h2 { margin: 0; font-stretch: 75%; font-weight: 900; text-transform: uppercase; font-size: 28px; line-height: 1; }
.pf-sec-sub { font-size: 14px; color: var(--text-2); font-variant-numeric: proportional-nums; }
.pf-sec-head .btn { margin-left: auto; align-self: center; }

/* "Make it yours": four first steps, 25 real ponnies each */
.pf-miy { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 16px 18px 16px 20px; border-radius: var(--r-tile); background: var(--panel); }
.pf-miy-head { display: grid; gap: 2px; }
.pf-miy-head b { font-stretch: 75%; font-weight: 900; font-style: italic; text-transform: uppercase; font-size: 22px; line-height: 1; }
.pf-miy-head span { font-size: 14px; color: var(--text-2); }
.pf-miy-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-miy-step { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px 0 6px; border: 0; border-radius: var(--r-pill); background: var(--panel-2); color: var(--text); font: inherit; font-size: 14px; font-weight: 650; text-decoration: none; cursor: pointer; transition: transform 160ms var(--p-ease-out), background-color 160ms ease; }
.pf-miy-step:active { transform: scale(.97); transition-duration: 100ms; }
@media (hover: hover) and (pointer: fine) { .pf-miy-step:not(.done):hover { background: var(--panel-3); } }
.pf-miy-step.done { color: var(--text-2); cursor: default; }
.pf-miy-coin { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 8px 0 4px; border-radius: var(--r-pill); background: rgba(255,255,255,.07); font-weight: 800; font-size: 13px; font-variant-numeric: proportional-nums; }
.pf-miy-coin img { width: 20px; height: 20px; border-radius: 50%; }
.pf-miy-check { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--signal); color: #0B0D04; }
.pf-miy-check svg { width: 15px; height: 15px; fill: currentColor; }
.pf-miy.compact { padding: 12px 14px 12px 18px; }

/* the numbers and the emblems */
.pf-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 18px 32px; padding: 20px 24px; border-radius: var(--r-tile); background: var(--panel); }
.pf-nums, .pf-ems { position: relative; display: flex; align-items: flex-start; gap: 36px; }
.pf-ems { gap: 18px; padding-left: 32px; box-shadow: inset 1px 0 0 var(--border); }
.pf-num { display: grid; gap: 4px; min-width: 0; }
.pf-num b { font-stretch: 75%; font-weight: 900; font-size: 40px; line-height: .95; font-variant-numeric: proportional-nums; }
.pf-num span { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.pf-em { display: grid; justify-items: center; gap: 8px; width: 80px; text-align: center; }
.pf-em span { font-size: 13px; line-height: 1.25; color: var(--text-2); }
/* your own free emblem slots: 44px discs on panel-2 with a plus, no ring; with none worn, the three and one line */
.pf-em-empty { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; text-decoration: none; }
.pf-em-empty > span:last-child { margin-left: 6px; }
.pf-em.add { text-decoration: none; }
.pf-em-slot { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--panel-2); box-shadow: none; color: var(--text-2); transition: background-color 160ms ease, color 160ms ease; }
.pf-em-slot svg { width: 18px; height: 18px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) { :is(.pf-em-empty, .pf-em.add):hover .pf-em-slot { background: var(--panel-3); color: var(--text); } .pf-em-empty:hover { color: var(--text); } }
.pf-pencil { align-self: center; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.06); color: var(--text-2); transition: background-color 160ms ease, color 160ms ease; }
.pf-pencil svg { width: 16px; height: 16px; fill: currentColor; }
@media (hover: hover) and (pointer: fine) { .pf-pencil:hover { background: rgba(255,255,255,.12); color: var(--text); } }
.pf-strip.compact { padding: 16px 20px; margin-top: 18px; }

/* the showcase: cards in the player's case; empty slots of your own show a faint rosette and "+ Add" */
.pf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 190px)); gap: 20px 16px; align-items: start; }
.pf-slot { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 5 / 7; border: 0; border-radius: var(--card-radius); background: var(--panel-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.pf-slot-rosette {
  position: absolute; left: 50%; top: 50%; width: 86%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; opacity: .08; z-index: -1;
  background: repeating-conic-gradient(from 0deg, #fff 0deg 1.4deg, transparent 1.4deg 4.5deg);
  -webkit-mask: radial-gradient(closest-side, transparent 48%, #000 50% 95%, transparent 97%); mask: radial-gradient(closest-side, transparent 48%, #000 50% 95%, transparent 97%);
}
.pf-slot-add { display: grid; justify-items: center; gap: 6px; font-weight: 700; font-size: 14px; text-align: center; padding: 0 12px; }
.pf-slot-add svg { width: 26px; height: 26px; fill: currentColor; }
.pf-slot.more { background: var(--panel-2); box-shadow: none; align-content: center; gap: 10px; }
.pf-slot.more .price { justify-self: center; }
@media (hover: hover) and (pointer: fine) { .pf-slot:hover { background: var(--panel-3); color: var(--text); } }

/* best pulls: a rail */
.pf-rail { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; padding: 4px 2px 10px; scrollbar-width: none; }
.pf-rail::-webkit-scrollbar { display: none; }
.pf-pull { flex: 0 0 168px; margin: 0; display: grid; gap: 8px; scroll-snap-align: start; }
.pf-pull figcaption { font-size: 13px; color: var(--text-2); }

/* Icon sets: the claimed ones printed in their foil with the medal */
.pf-sets { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.pf-set {
  display: flex; align-items: center; gap: 14px; min-width: 0; padding: 12px 14px 12px 12px; border-radius: 14px; color: var(--text); text-decoration: none;
  background: linear-gradient(120deg, color-mix(in oklab, var(--tb) 78%, var(--panel)) 0%, var(--panel) 72%);
  transition: transform 160ms var(--p-ease-out);
}
.pf-set:active { transform: scale(.985); transition-duration: 100ms; }
.pf-set.got { background: var(--glitter), linear-gradient(150deg, color-mix(in oklab, var(--ta) 42%, var(--tb)) 0%, var(--tb) 55%, color-mix(in oklab, var(--ta) 30%, var(--tb)) 100%); background-blend-mode: overlay, normal; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ta) 45%, transparent); }
.pf-set-ring { --p: 0; position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; }
.pf-set-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--ta) calc(var(--p) * 360deg), rgba(255,255,255,.1) 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px)); mask: radial-gradient(closest-side, transparent calc(100% - 4px), #000 calc(100% - 3.5px));
}
.pf-set.got .pf-set-ring::before { display: none; }
.pf-set-ring b { font-stretch: 75%; font-weight: 900; font-size: 18px; }
.pf-set-text { display: grid; gap: 2px; min-width: 0; }
.pf-set-text b { font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-set-text small { font-size: 13px; color: var(--text-2); font-variant-numeric: proportional-nums; }
.pf-set.got .pf-set-text small { color: rgba(245,245,247,.82); }
.pf-set-sk { height: 72px; border-radius: 14px; }

/* achievements: the ring and the last six */
.pf-ach { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 28px; padding: 22px 24px; border-radius: var(--r-tile); background: var(--panel); }
.pf-ach-ring { --p: 0; position: relative; width: 132px; aspect-ratio: 1; display: grid; place-content: center; justify-items: center; }
.pf-ach-ring::before {
  content: ''; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--text) calc(var(--p) * 360deg), rgba(255,255,255,.08) 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 7px), #000 calc(100% - 6.5px)); mask: radial-gradient(closest-side, transparent calc(100% - 7px), #000 calc(100% - 6.5px));
}
.pf-ach-ring b { font-stretch: 75%; font-weight: 900; font-size: 44px; line-height: .9; }
.pf-ach-ring span { font-size: 14px; color: var(--text-2); }
.pf-ach-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 20px; }
.pf-ach-list li { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pf-ach-list li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.pf-ach-list b { font-size: 15px; font-weight: 700; }
.pf-ach-list small { font-size: 13px; color: var(--text-2); }
.pf-ach-medal { --metal: var(--metal-0); flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--metal); box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 0 rgba(0,0,0,.3); color: #0B0B0D; }
.pf-ach-medal[data-r="1"] { --metal: var(--metal-1); } .pf-ach-medal[data-r="2"] { --metal: var(--metal-2); } .pf-ach-medal[data-r="3"] { --metal: var(--metal-3); }
.pf-ach-medal[data-r="4"] { --metal: var(--metal-4); } .pf-ach-medal[data-r="5"] { --metal: var(--metal-5); }
.pf-ach-medal svg { width: 19px; height: 19px; fill: currentColor; }

.pf-public { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: var(--r-tile); background: var(--panel); }
.pf-public > div { display: grid; gap: 3px; }
.pf-public b { font-size: 15px; font-weight: 700; }
.pf-public small { font-size: 14px; color: var(--text-2); }

/* modals of the profile (the showcase picker, the picture picker, the unsaved sheet) */
.pf-modal-sub { margin: 0 0 16px; font-size: 14px; color: var(--text-2); }
.pf-modal-sub b { color: var(--text); }
.pf-modal-foot { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }

/* skeletons: the final boxes */
.pf-sk .pf-sk-banner { height: 280px; border-radius: var(--r-banner); }
.pf-sk-id { display: flex; align-items: flex-end; gap: 22px; margin-top: -84px; padding: 0 24px; }
.pf-sk-av { width: 112px; height: 112px; border-radius: 50%; box-shadow: 0 0 0 6px var(--bg); }
.pf-sk-lines { display: grid; gap: 10px; padding-bottom: 8px; }
.pf-sk-strip { height: 104px; border-radius: var(--r-tile); }
/* /u/<unknown name>: the not-found card back of /u/<name>/cards (pages.css .pg-404); a long typed name wraps */
.pf-404 .head p { overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .pf-page { gap: 22px; }
  .pf-bio { padding: 0 4px; font-size: 15px; }
  .pf-sec-head h2 { font-size: 24px; }
  .pf-strip { padding: 16px; gap: 16px; }
  .pf-nums { gap: 20px; width: 100%; justify-content: space-between; }
  .pf-num b { font-size: 32px; }
  .pf-num span { font-size: 13px; white-space: normal; }
  .pf-ems { gap: 10px; padding-left: 0; box-shadow: none; }
  .pf-em { width: 72px; }
  .pf-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; }
  .pf-pull { flex-basis: 146px; }
  .pf-sets { grid-template-columns: 1fr 1fr; gap: 8px; }
  .pf-set { padding: 10px; gap: 10px; }
  .pf-set-ring { width: 40px; height: 40px; }
  .pf-ach { grid-template-columns: 1fr; justify-items: start; padding: 18px; gap: 18px; }
  .pf-ach-ring { width: 108px; }
  .pf-ach-ring b { font-size: 36px; }
  .pf-sk .pf-sk-banner { height: 180px; }
  .pf-sk-id { margin-top: -60px; padding: 0 4px; }
  .pf-sk-av { width: 84px; height: 84px; }
  .pf-miy { padding: 14px; }
  .pf-miy-steps { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .pf-miy-step { min-width: 0; font-size: 13px; padding: 6px 10px 6px 6px; }
  .pf-miy-step > span:last-child { min-width: 0; line-height: 1.2; text-align: left; text-wrap: balance; }
  .pf-miy-coin, .pf-miy-check { flex: none; }
}

/* ══ the editor ═══════════════════════════════════════════════════════════════════════════════ */
.pf-editor { container: ed / inline-size; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.ed-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ed-top .head { margin: 0; }
.ed-top > .btn { flex: none; margin-top: 4px; }
.ed-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@container ed (min-width: 1100px) {
  .ed-grid { grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); gap: 28px; }
  .ed-preview { position: sticky; top: calc(var(--topbar-h) + 24px); }
}

/* the live preview: a card on --panel, radius 22, the three modes crossfade */
.ed-preview { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.ed-modes { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: var(--panel); width: fit-content; max-width: 100%; }
.ed-modes button { border: 0; background: none; border-radius: var(--r-pill); padding: 8px 14px; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--text-2); white-space: nowrap; transition: background-color 160ms ease, color 160ms ease; }
.ed-modes button[aria-selected="true"] { color: var(--text); background: var(--panel-3); }
.ed-stage { --hero-bg: var(--panel); position: relative; min-height: 300px; padding: 16px; border-radius: 22px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--border); overflow: hidden; }
.ed-stage.pulse-1 { animation: ed-pulse-a 180ms var(--p-ease-out); }
.ed-stage.pulse-0 { animation: ed-pulse-b 180ms var(--p-ease-out); }
@keyframes ed-pulse-a { 50% { transform: scale(1.02); } }
@keyframes ed-pulse-b { 50% { transform: scale(1.02); } }
.ed-mode { animation: ed-fade 180ms ease-out both; }
@keyframes ed-fade { from { opacity: 0; } }
.ed-zoom { zoom: .62; }
.ed-zoom .pf-bio { margin: 18px 0 0; }
.ed-chip { position: absolute; top: 12px; right: 12px; z-index: 6; display: inline-grid; place-items: center; height: 26px; padding: 0 11px; border-radius: var(--r-pill); background: var(--commerce); color: #fff; font-size: 13px; font-weight: 750; }
.ed-hc { display: grid; place-items: center; padding: 8px 0; }
.ed-hc .hovercard-body { width: 320px; max-width: 100%; border-radius: 18px; overflow: hidden; background: var(--overlay); box-shadow: var(--shadow-pop), inset 0 0 0 1px var(--border-hi); }
.ed-board { display: grid; gap: 8px; padding-top: 4px; }
.ed-board-head { margin: 0 0 4px; font-size: 14px; color: var(--text-2); }
.ed-board .cx-lrow:not(.me) { background: var(--panel-2); --plate-end: var(--panel-2); }
.ed-mini { display: none; }

/* the tabs and the grids */
.ed-pane { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-content: start; }
.ed-tabs .tabs { margin: 0; }
/* mouse and trackpad: all ten categories show, on two lines when the pane is narrow (the row keeps fit-content) */
@media (hover: hover) and (pointer: fine) {
  .ed-tabs .tabs { flex-wrap: wrap; overflow: visible; border-radius: 20px; }
}
/* touch: the swipe row stays, and only the side that has more tabs fades (data-more, set by ProfileEdit) */
.ed-tabs[data-more="r"] .tabs { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent); }
.ed-tabs[data-more="l"] .tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px); mask-image: linear-gradient(90deg, transparent, #000 44px); }
.ed-tabs[data-more="l r"] .tabs { -webkit-mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 44px, #000 calc(100% - 44px), transparent); }
.ed-body { min-width: 0; animation: ed-fade 160ms ease-out both; }
.ed-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; min-width: 0; }
.ed-group { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.ed-group h3, .ed-part { margin: 0; font-size: 15px; font-weight: 700; }
.ed-group h3 .num { color: var(--text-2); font-weight: 600; }
.ed-part { margin-top: 8px; font-stretch: 75%; font-weight: 900; text-transform: uppercase; font-size: 22px; line-height: 1; }
.ed-group-sub { margin: -4px 0 2px; font-size: 13px; color: var(--text-2); }
.ed-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--panel); font-size: 14px; color: var(--text-2); }
.ed-line svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.ed-line a { color: var(--text); font-weight: 650; text-underline-offset: 3px; }
.ed-line.split { justify-content: space-between; background: none; padding: 0; }

/* item tiles: 112px squares, radius 16, the item's own material, a 3px rarity bar */
.ed-tiles { display: grid; grid-template-columns: repeat(auto-fill, 112px); gap: 16px 12px; }
.ed-tiles.wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.ed-tiles.tall { grid-template-columns: repeat(auto-fill, 128px); }
.ed-cell { display: grid; gap: 6px; align-content: start; min-width: 0; }
.ed-tile {
  position: relative; isolation: isolate; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 16px; cursor: pointer;
  background: var(--panel-2); color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform 220ms var(--p-ease-out), box-shadow 160ms ease;
}
.ed-tiles.wide .ed-tile { aspect-ratio: 16 / 9; }
.ed-tiles.tall .ed-tile { aspect-ratio: 4 / 5; }
.ed-tile > .cx-ground { border-radius: 16px; }
.ed-tile-stage { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; overflow: hidden; border-radius: 16px; }
.ed-tile > .cx-rbar { z-index: 2; height: 3px; border-radius: 0 0 16px 16px; }
.ed-tile.press:active { transform: scale(.97); transition-duration: 100ms; }
@media (hover: hover) and (pointer: fine) { .ed-tile:hover { transform: translateY(-2px); } }
.ed-tile.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #FFFFFF; }
.ed-tile.blocked { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--bad); }
.ed-cell.is-locked .ed-tile-stage { filter: saturate(.55) brightness(.72); }
.ed-price { position: absolute; left: 6px; top: 6px; z-index: 3; display: inline-flex; align-items: center; height: 24px; padding: 0 8px 0 4px; border-radius: var(--r-pill); background: rgba(10,10,14,.84); font-size: 13px; }
.ed-price .price { gap: 4px; }
.ed-price .price img { width: 16px; height: 16px; }
.ed-lock { position: absolute; right: 6px; top: 6px; z-index: 3; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(10,10,14,.84); }
.ed-lock svg { width: 13px; height: 13px; fill: var(--text-2); }
.ed-check { position: absolute; right: -6px; top: -6px; z-index: 4; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF; color: #0B0B0D; box-shadow: 0 0 0 2px var(--bg); animation: ed-pop 200ms var(--p-ease-out) both; }
.ed-check svg { width: 14px; height: 14px; fill: currentColor; }
@keyframes ed-pop { from { transform: scale(.6); opacity: 0; } }
.ed-cell-name { font-size: 13px; font-weight: 650; line-height: 1.25; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-cell-line { font-size: 13px; line-height: 1.3; color: var(--text-2); }
.ed-prog { --p: 0; position: relative; height: 3px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; }
.ed-prog::after { content: ''; position: absolute; inset: 0; background: var(--text-2); transform: scaleX(var(--p)); transform-origin: left; }
.ed-prog.inline { width: 64px; }
.ed-tile.plain { background: var(--panel-2); }
.ed-none { display: grid; justify-items: center; gap: 6px; color: var(--text-2); text-align: center; padding: 0 8px; }
.ed-none svg { width: 22px; height: 22px; fill: currentColor; }
.ed-none small { font-size: 13px; font-weight: 600; }
.ed-round { display: block; width: 64px; height: 64px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.6); }
.ed-round img, .ed-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ed-photo { position: absolute; inset: 0; }
.ed-av { position: relative; display: block; }
.ed-badge { position: absolute; right: 8px; bottom: 8px; z-index: 3; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(10,10,14,.84); color: #FFFFFF; }
.ed-badge svg { width: 13px; height: 13px; fill: currentColor; }
.ed-av > .ed-badge { right: -5px; bottom: -3px; background: #0F0F12; box-shadow: 0 0 0 2px var(--panel-2); }
.ed-tile.plain.x { background: #000000; }
.ed-x { display: grid; justify-items: center; gap: 8px; color: #FFFFFF; }
.ed-x svg { width: 28px; height: 28px; fill: currentColor; }
.ed-x small { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.72); }

/* the metal swatches */
.ed-swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.ed-swatch { display: grid; justify-items: center; gap: 7px; padding: 0; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13px; cursor: pointer; }
.ed-swatch span { width: 44px; height: 44px; border-radius: 50%; background: var(--acc-metal); box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), inset 0 -2px 0 rgba(0,0,0,.25); transition: box-shadow 160ms ease, transform 160ms var(--p-ease-out); }
.ed-swatch:active span { transform: scale(.94); }
.ed-swatch.on { color: var(--text); }
.ed-swatch.on span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #FFFFFF; }

/* the focal point of a picture */
.ed-focal-frame { position: relative; overflow: hidden; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--border-hi); }
.ed-focal-frame:active { cursor: grabbing; }
.ed-focal.round .ed-focal-frame { width: 200px; aspect-ratio: 1; border-radius: 50%; }
.ed-focal.wide .ed-focal-frame { width: 100%; aspect-ratio: 3.2 / 1; border-radius: 16px; }
.ed-focal-frame img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ed-focal-hint { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); display: flex; gap: 2px; padding: 4px 8px; border-radius: var(--r-pill); background: rgba(10,10,14,.7); }
.ed-focal-hint svg { width: 14px; height: 14px; fill: #fff; }

/* the picture picker */
.ed-search { display: block; margin-bottom: 14px; }
.ed-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px 10px; max-height: min(60vh, 560px); overflow: auto; padding: 6px 4px 8px; }
.ed-pick .card { width: 100%; }
.ed-pick.off { opacity: .32; filter: grayscale(1); }
.ed-pick.off .card { cursor: not-allowed; }

/* titles and emblems: lists */
.ed-tlist { display: grid; gap: 6px; }
.ed-trow, .ed-erow {
  position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 10px 14px; border: 0; border-radius: 12px;
  background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform 160ms var(--p-ease-out), background-color 160ms ease;
}
@media (hover: hover) and (pointer: fine) { .ed-trow:hover, .ed-erow:hover { background: var(--panel-2); } }
.ed-trow.on, .ed-erow.on { box-shadow: inset 0 0 0 2px #FFFFFF; }
.ed-trow.blocked, .ed-erow.blocked { box-shadow: inset 0 0 0 2px var(--bad); }
.ed-trow-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ed-trow-text b { font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-trow-text small { font-size: 13px; color: var(--text-2); }
.ed-trow.is-locked .ed-trow-text b, .ed-erow.is-locked .ed-trow-text b { color: var(--text-2); }
.ed-erow.is-locked .emblem { filter: saturate(.4) brightness(.7); }
.ed-trow-lock { width: 16px; height: 16px; fill: var(--text-3); flex: none; }
.ed-trow .ed-check, .ed-erow .ed-check { position: static; flex: none; }
.ed-clear { justify-self: start; }
.ed-eslots { display: flex; flex-wrap: wrap; gap: 18px; padding: 18px; border-radius: var(--r-tile); background: var(--panel); }
.ed-eslot { position: relative; display: grid; justify-items: center; gap: 8px; width: 92px; }
.ed-eslot small { font-size: 13px; color: var(--text-2); text-align: center; line-height: 1.25; }
.ed-eslot-btn { display: grid; place-items: center; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 50%; background: var(--panel-2); box-shadow: inset 0 0 0 1.5px var(--border-hi); cursor: pointer; transition: box-shadow 160ms ease, transform 160ms var(--p-ease-out); }
.ed-eslot-btn:active { transform: scale(.96); }
.ed-eslot.sel .ed-eslot-btn { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px #FFFFFF; }
.ed-eslot-empty svg { width: 22px; height: 22px; fill: var(--text-3); }
.ed-eslot-x { position: absolute; top: -4px; right: 4px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; background: var(--panel-3); color: var(--text-2); cursor: pointer; }
.ed-eslot-x svg { width: 13px; height: 13px; fill: currentColor; }
.ed-eslot[draggable="true"] { cursor: grab; }

/* about: the bio and the numbers */
.ed-bio { position: relative; display: block; }
.ed-bio textarea { width: 100%; min-height: 96px; resize: none; padding: 12px 14px 30px; line-height: 1.45; font: inherit; font-size: 15px; }
.ed-count { position: absolute; right: 12px; bottom: 9px; font-size: 13px; color: var(--text-2); pointer-events: none; }
.ed-count.warn { color: var(--text); }
.ed-err { margin: 0; font-size: 14px; font-weight: 600; color: var(--bad); }
.ed-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.ed-stat { position: relative; display: grid; gap: 2px; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--panel); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: transform 160ms var(--p-ease-out), background-color 160ms ease; }
.ed-stat b { font-stretch: 75%; font-weight: 900; font-size: 26px; line-height: 1; font-variant-numeric: proportional-nums; }
.ed-stat small { font-size: 13px; color: var(--text-2); }
.ed-stat.on { box-shadow: inset 0 0 0 2px #FFFFFF; }
.ed-stat:disabled { opacity: .45; cursor: not-allowed; }
.ed-stat-n { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #FFFFFF; color: #0B0B0D; font-size: 13px; font-weight: 800; animation: ed-pop 200ms var(--p-ease-out) both; }
@media (hover: hover) and (pointer: fine) { .ed-stat:not(:disabled):hover { background: var(--panel-2); } }

/* the footer: sticky, 72px, the summary and the actions */
.ed-foot {
  position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px;
  margin: 8px 0 0; padding: 12px 20px; border-radius: 16px 16px 0 0; background: var(--panel); box-shadow: 0 -1px 0 var(--border), 0 -18px 30px -18px rgba(0,0,0,.8);
}
.ed-sum { font-size: 14px; color: var(--text-2); font-variant-numeric: proportional-nums; }
.ed-actions, .ed-short { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.ed-actions .btn.hold { min-width: 230px; }

/* skeletons */
.ed-sk-preview { height: 360px; border-radius: 22px; }
.ed-sk-tabs { height: 42px; width: min(100%, 560px); border-radius: var(--r-pill); }
/* with a mouse the ten categories take two lines (the row above), so the skeleton does too */
@media (hover: hover) and (pointer: fine) { .ed-sk-tabs { height: 81px; border-radius: 20px; } }
/* from a 1502px editor (a 1920 screen) the pane holds all ten on one 826px line, so the skeleton keeps one line too;
   the skeleton page is short and has no scrollbar yet, so its editor is 15px wider than the loaded one */
@container ed (min-width: 1518px) { .ed-sk-tabs { height: 42px; width: min(100%, 826px); border-radius: var(--r-pill); } }
.ed-sk-tile { aspect-ratio: 1; border-radius: 16px; }

/* mobile: the preview on top at 40vh, collapsing to a 120px bar while the grid scrolls; the footer above the tab bar */
@media (max-width: 860px) {
  .pf-editor { gap: 14px; padding-bottom: 150px; }
  .ed-top > .btn { display: none; }
  .ed-top .head p { display: none; }
  .ed-stage { min-height: 0; max-height: 40vh; padding: 10px; }
  .ed-zoom { zoom: .52; }
  .ed-mode.m-row, .ed-mode.m-hover { max-height: calc(40vh - 20px); overflow: hidden; }
  .ed-modes { width: 100%; }
  .ed-modes button { flex: 1; padding: 8px 6px; }
  .ed-mini {
    display: flex; align-items: center; gap: 12px; position: fixed; left: 0; right: 0; top: var(--topbar-h); z-index: 30; height: 120px; padding: 0 16px;
    overflow: hidden; isolation: isolate; background: var(--panel); box-shadow: 0 1px 0 var(--border), 0 16px 30px -16px rgba(0,0,0,.9);
    opacity: 0; transform: translateY(-12px); pointer-events: none; transition: opacity 180ms ease-out, transform 220ms var(--p-ease-out);
  }
  .ed-mini.on { opacity: 1; transform: none; pointer-events: auto; }
  .ed-mini > .cx-banner { position: absolute; inset: 0; z-index: -1; border-radius: 0; }
  .ed-mini > .cx-banner::after { content: ''; position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(11,11,13,.82), rgba(11,11,13,.35)); }
  .ed-mini .ed-chip { top: 10px; right: 12px; }
  .ed-tiles, .ed-tiles.tall { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 10px; }
  .ed-tiles.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ed-foot {
    position: fixed; left: 10px; right: 10px; bottom: calc(84px + env(safe-area-inset-bottom) * .5); margin: 0; min-height: 0; padding: 10px 10px 10px 14px;
    border-radius: 16px; flex-wrap: wrap; gap: 8px;
    transition: transform 220ms var(--p-ease-out), opacity 160ms ease, visibility 0s linear 0s;
  }
  /* nothing changed: Reset and Save are both disabled, so the bar steps aside until the first change */
  .ed-foot:not(.dirty) {
    transform: translateY(calc(100% + 16px)); opacity: 0; visibility: hidden; pointer-events: none;
    transition: transform 220ms var(--p-ease-out), opacity 160ms ease, visibility 0s linear 220ms;
  }
  .ed-sum { flex: 1 1 100%; font-size: 13px; }
  .ed-actions { flex: 1; justify-content: stretch; }
  .ed-actions > .btn, .ed-actions > .ed-short, .ed-actions > .btn.hold { flex: 1; min-width: 0; }
  .ed-actions .btn.big { height: 46px; padding: 0 14px; font-size: 14px; }
  .ed-actions > .btn.ghost { flex: 0 0 auto; }
  .ed-eslots { gap: 10px; padding: 14px; justify-content: space-between; }
  .ed-eslot { width: 88px; }
  .ed-focal.round .ed-focal-frame { width: 170px; }
  .ed-stats { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ed-stage.pulse-0, .ed-stage.pulse-1, .ed-check, .ed-stat-n { animation: none; }
  .ed-mini { transition: opacity 120ms ease; transform: none; }
  .ed-foot, .ed-foot:not(.dirty) { transform: none; }
  .ed-foot { transition: opacity 120ms ease, visibility 0s linear 0s; }
  .ed-foot:not(.dirty) { transition: opacity 120ms ease, visibility 0s linear 120ms; }
}
