/* Profil: gemeinsame Bausteine (Knoepfe, Fortschritts-Rand, Reiter, Panel,
   Einzug) und die Reiter Erfolge, Freunde und Konto. Kopf und Schmiede stehen
   in profile.css, der Partien-Verlauf in profile-games.css. */

/* ── Knoepfe ── */
.pf-cta, .pf-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 18px;
  font-family: var(--mp-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.3px;
  text-transform: uppercase;
  cursor: var(--mp-cur-pointer);
  transition: transform .18s ease, box-shadow .18s ease, border-color .16s ease, background .16s ease, color .16s ease;
}
.pf-cta {
  color: #0c0e13;
  background: linear-gradient(180deg, #f3d88a 0%, #d8b15a 45%, #ad8230 100%);
  border: 1px solid #f0d27a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4);
}
.pf-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(216, 177, 90, .28), inset 0 1px 0 rgba(255, 255, 255, .5); }
.pf-cta:disabled { opacity: .5; transform: none; box-shadow: none; cursor: default; }
.pf-ghost { color: var(--mp-gold-1); background: transparent; border: 1px solid rgba(216, 177, 90, .3); }
.pf-ghost:hover, .pf-ghost:focus-visible { border-color: rgba(216, 177, 90, .65); background: rgba(216, 177, 90, .06); }
.pf-inline-err { margin: 6px 0 0; font-family: var(--mp-sans); font-size: 12.5px; color: #ef958a; }


/* Fortschritts-Rand (rhombus-rim.js): Spur und Fuellung, Start oben, im Uhrzeigersinn. */
.pf-rim { width: 100%; height: 100%; overflow: visible; }
.pf-rim polygon { fill: none; }
.pf-rim .rim-track { stroke: rgba(216, 177, 90, .22); stroke-width: 1.2; }
.pf-rim .rim-fill { stroke: var(--mp-teal-2); stroke-width: 2; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--p, 0) * 100); transition: stroke-dashoffset .6s cubic-bezier(.2, .7, .2, 1); }


/* ── Reiter ── */
.pf-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 26px;
  border-bottom: 1px solid rgba(216, 177, 90, .14);
}
.pf-tabs .profileTab {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  padding: 12px 18px 13px;
  font-family: var(--mp-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--mp-ink-dim);
  background: transparent;
  border: 0;
  white-space: nowrap;
  cursor: var(--mp-cur-pointer);
  transition: color .16s ease;
}
.pf-tabs .profileTab:hover { color: var(--mp-bone); }
.pf-tabs .profileTab.is-active { color: var(--mp-gold-1); }
.pf-tab-n { font-family: var(--mp-mono); font-size: 10px; letter-spacing: 0; color: var(--mp-ink-faint); }
.pf-tab-new { font-family: var(--mp-mono); font-size: 10px; letter-spacing: 0; color: var(--mp-gold-1); }
.pf-tab-new::before { content: "+"; }
.pf-tabs-glide {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--mp-gold-1) 18%, var(--mp-gold-1) 82%, transparent);
  transition: translate .42s cubic-bezier(.22, .8, .24, 1), width .42s cubic-bezier(.22, .8, .24, 1);
  pointer-events: none;
}


/* Bracketed Panel (Konto, Anmeldung, Katze). */
.pf-panel {
  position: relative;
  padding: 24px 26px;
  background: linear-gradient(180deg, rgba(13, 16, 22, .62), rgba(8, 9, 13, .86));
  border: 1px solid rgba(216, 177, 90, .16);
}
.pf-panel::before, .pf-panel::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border: 1px solid var(--mp-gold-2);
  pointer-events: none;
}
.pf-panel::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.pf-panel::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }


/* Einzug nur beim echten Oeffnen: Reihen und Kacheln steigen einmal auf. */
.pf-root.is-enter .pf-rise { animation: acIn .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(120ms + var(--i, 0) * 40ms); }


/* ── Erfolge ── */
.pf-achvs { display: flex; flex-direction: column; gap: 30px; }
.pf-achv-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--mp-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mp-gold-1);
}
.pf-achv-h i { flex: none; width: 7px; height: 7px; rotate: 45deg; background: var(--mp-gold-1); }
.pf-achv-h::after { content: ""; order: 1; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(216, 177, 90, .24), rgba(216, 177, 90, .04)); }
.pf-achv-h small { order: 2; font-family: var(--mp-mono); font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--mp-ink-dim); }
.pf-achv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pf-achv {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 14px 16px 13px 12px;
  background: linear-gradient(180deg, rgba(13, 16, 22, .6), rgba(8, 9, 13, .82));
  border: 1px solid rgba(216, 177, 90, .1);
}
.pf-achv.is-on { border-color: rgba(216, 177, 90, .24); }
.pf-achv.is-found { animation: pfFound 1.4s ease-out; }
@keyframes pfFound { from { border-color: var(--mp-gold-1); box-shadow: 0 0 0 1px var(--mp-gold-1); } }
.pf-achv-ic { position: relative; display: grid; place-items: center; width: 52px; height: 52px; color: var(--mp-ink-faint); }
.pf-achv-ic .pf-rim { position: absolute; inset: 0; }
.pf-achv-ic > svg:not(.pf-rim) { position: relative; }
.pf-achv.is-on .pf-achv-ic { color: var(--mp-gold-1); }
.pf-achv.is-on .rim-track { fill: rgba(216, 177, 90, .1); stroke: transparent; }
.pf-achv.is-on .rim-fill { stroke: var(--mp-gold-1); stroke-width: 1.6; }
.pf-achv-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pf-achv-name { font-family: var(--mp-sans); font-size: 14px; font-weight: 600; color: var(--mp-bone); }
.pf-achv.is-off .pf-achv-name { color: var(--mp-ink); }
.pf-achv-desc {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--mp-serif-body);
  font-size: 14px;
  line-height: 1.35;
  color: var(--mp-ink);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.pf-achv-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; }
.pf-achv-state { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mp-mono); font-size: 11px; color: var(--mp-ink-dim); }
.pf-achv-state.is-on { color: var(--mp-teal-1); }
.pf-achv-state svg { width: 11px; height: 11px; }
.pf-rew { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mp-mono); font-size: 11px; color: var(--mp-ink); }
.pf-rew .arIc { flex: none; }

/* Katze: sitzt auf der Kante ihres Panels, die Blase ist die linke Spalte. */
.pf-catbox {
  --cat-w: 72px;
  position: relative;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  margin-top: calc(var(--cat-w) * 94 / 120);
  padding: 18px;
  background: linear-gradient(180deg, rgba(13, 16, 22, .62), rgba(8, 9, 13, .86));
  border: 1px solid rgba(216, 177, 90, .16);
}
.pf-achvs .pf-catbox .am-cat { left: 60px; }
.pf-achvs .pf-catbox .am-bubble::before { left: 42px; }
.pf-achvs .pf-catbox .am-text { min-height: 0; font-size: 15px; }
.pf-catbox .pf-achv-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

/* ── Freunde ── */
.pf-friend-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; max-width: 520px; margin-bottom: 28px; }
.pf-friend-add .pf-inline-err { grid-column: 1 / -1; margin: 0; }
.pf-friend-add input, .pf-login-form input, .acct-edit input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  padding: 11px 13px;
  font-family: var(--mp-sans);
  font-size: 14px;
  color: var(--mp-bone);
  background: rgba(5, 6, 9, .6);
  border: 1px solid rgba(216, 177, 90, .2);
  border-radius: 0;
}
:is(.pf-friend-add, .pf-login-form, .acct-edit) input:focus { outline: none; border-color: rgba(216, 177, 90, .55); }
.pf-friends { display: flex; flex-direction: column; gap: 26px; }
.pf-fr-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.pf-fr-group.is-incoming .pf-fr-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); }
.pf-fr-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px 10px 10px 14px;
  background: linear-gradient(180deg, rgba(13, 16, 22, .6), rgba(8, 9, 13, .82));
  border: 1px solid rgba(216, 177, 90, .12);
  transition: border-color .16s ease, opacity .28s ease, translate .28s ease;
}
.pf-fr-card:hover, .pf-fr-card:focus-within { border-color: rgba(216, 177, 90, .32); }
.pf-fr-card.is-new { animation: acIn .42s cubic-bezier(.2, .7, .2, 1) both; }
.pf-fr-card.is-leaving { opacity: 0; translate: 0 -4px; }
.pf-fr-main { flex: 1; display: flex; align-items: center; gap: 14px; min-width: 0; padding: 0; color: inherit; text-align: left; background: none; border: 0; }
button.pf-fr-main { cursor: var(--mp-cur-pointer); }
.pf-fr-card .pf-fr-av { flex: none; width: 44px; height: 44px; font-size: 14px; font-weight: 700; }
.pf-fr-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pf-fr-name { overflow: hidden; font-family: var(--mp-sans); font-size: 15px; color: var(--mp-bone); text-overflow: ellipsis; white-space: nowrap; }
.pf-fr-rank { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mp-mono); font-size: 11px; color: var(--tier); white-space: nowrap; }
.pf-fr-rank i { width: 7px; height: 7px; rotate: 45deg; background: var(--tier); }
.pf-fr-actions { display: flex; gap: 6px; flex: none; }
.pf-fr-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-family: var(--mp-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--mp-ink);
  background: transparent;
  border: 1px solid rgba(216, 177, 90, .22);
  cursor: var(--mp-cur-pointer);
  transition: border-color .16s ease, color .16s ease, opacity .16s ease;
}
.pf-fr-btn svg { width: 13px; height: 13px; }
.pf-fr-btn:hover, .pf-fr-btn:focus-visible { color: var(--mp-bone); border-color: rgba(216, 177, 90, .55); }
.pf-fr-btn.is-accept { color: var(--mp-teal-1); border-color: rgba(77, 208, 196, .45); }
.pf-fr-btn.is-remove { padding: 8px; }
.pf-fr-btn.is-remove span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (hover: hover) {
  .pf-fr-card.is-friend .pf-fr-btn.is-remove { opacity: 0; }
  .pf-fr-card.is-friend:hover .pf-fr-btn.is-remove, .pf-fr-card.is-friend:focus-within .pf-fr-btn.is-remove { opacity: 1; }
}
/* Anfrage an mich: Goldrand am Bild und links. Gesendet: Bild noch blass. */
.pf-fr-card.is-incoming { border-left: 2px solid var(--mp-gold-1); }
.pf-fr-card.is-incoming .pf-fr-av { background: var(--mp-gold-1); }
.pf-fr-card.is-sent .pf-fr-av { filter: grayscale(.6); opacity: .7; }
.pf-fr-withdraw { padding: 7px 12px; font-size: 10px; letter-spacing: 1.8px; }
.pf-fr-empty { display: flex; gap: 16px; padding: 4px 2px; }
.pf-fr-empty span { position: relative; width: 44px; height: 44px; }
.pf-fr-empty span::before { content: ""; position: absolute; inset: 15%; rotate: 45deg; border: 1px dashed rgba(216, 177, 90, .3); }

/* ── Konto ── */
.acctSettings { max-width: 760px; }
.acct-rows { display: grid; }
.acct-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 14px;
  padding: 14px 2px;
  border-bottom: 1px solid rgba(216, 177, 90, .1);
}
.acct-row:last-child { border-bottom: 0; }
.acct-row[hidden] { display: none; }
.acct-row-icon { position: relative; display: grid; place-items: center; width: 34px; height: 34px; color: var(--mp-gold-1); }
.acct-row-icon::before { content: ""; position: absolute; inset: 16%; rotate: 45deg; border: 1px solid rgba(216, 177, 90, .35); }
.acct-row-icon svg { position: relative; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.acct-row-main { display: grid; gap: 3px; min-width: 0; }
.acct-row-label { font-family: var(--mp-sans); font-size: 9.5px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase; color: var(--mp-ink-dim); }
.acct-row-value { overflow: hidden; font-family: var(--mp-sans); font-size: 15px; color: var(--mp-bone); text-overflow: ellipsis; white-space: nowrap; }
.acct-row-value.mono { font-family: var(--mp-mono); font-size: 12.5px; color: var(--mp-ink); }
.acct-row.is-editing .acct-row-value { opacity: .45; }
/* Knopf, Haken und Kopieren teilen sich die rechte Spalte. */
.acct-edit-btn, .acct-row-ok, .acct-copy { grid-column: 3; grid-row: 1; justify-self: end; }
.acct-edit-btn {
  padding: 7px 14px;
  font-family: var(--mp-sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mp-gold-1);
  background: transparent;
  border: 1px solid rgba(216, 177, 90, .28);
  cursor: var(--mp-cur-pointer);
  transition: border-color .16s ease, background .16s ease;
}
.acct-edit-btn:hover, .acct-edit-btn:focus-visible { border-color: rgba(216, 177, 90, .62); background: rgba(216, 177, 90, .06); }
.acct-row.is-editing .acct-edit-btn, .acct-row.is-saved .acct-edit-btn { visibility: hidden; }
.acct-row-ok { display: none; color: var(--mp-teal-1); }
.acct-row-ok svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.acct-row.is-saved .acct-row-ok { display: grid; animation: dgStamp .55s cubic-bezier(.2, .9, .3, 1.25) both; }
.acct-edit { display: none; grid-column: 1 / -1; grid-row: 2; gap: 8px; margin-top: 12px; padding-left: 48px; }
.acct-row.is-editing .acct-edit { display: grid; }
.acct-hint { font-family: var(--mp-sans); font-size: 12px; line-height: 1.45; color: var(--mp-ink-dim); }
.acct-edit-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.acct-edit .pf-inline-err { margin: 0; }
.acct-copy { position: relative; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--mp-ink-dim); background: transparent; border: 1px solid rgba(216, 177, 90, .2); cursor: var(--mp-cur-pointer); transition: border-color .16s ease, color .16s ease; }
.acct-copy:hover, .acct-copy:focus-visible { color: var(--mp-gold-1); border-color: rgba(216, 177, 90, .5); }
.acct-copy svg { position: absolute; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: opacity .2s ease, scale .2s ease; }
.acct-copy-ok { opacity: 0; scale: .6; color: var(--mp-teal-1); stroke-width: 2.4; }
.acct-copy.is-copied { border-color: rgba(77, 208, 196, .5); }
.acct-copy.is-copied .acct-copy-ic { opacity: 0; scale: .6; }
.acct-copy.is-copied .acct-copy-ok { opacity: 1; scale: 1; }
.acctSettings .acct-dev { margin-top: 16px; padding: 14px 0 0; background: none; border: 0; border-top: 1px solid rgba(216, 177, 90, .1); border-radius: 0; box-shadow: none; }
.acct-dev summary { display: flex; align-items: center; gap: 9px; font-family: var(--mp-sans); font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--mp-ink-dim); list-style: none; cursor: var(--mp-cur-pointer); }
.acct-dev summary::-webkit-details-marker { display: none; }
.acct-dev summary::before { content: "+"; width: 10px; font-family: var(--mp-mono); font-size: 13px; color: var(--mp-gold-1); }
.acct-dev[open] summary::before { content: "\2212"; }
.acct-facts { display: grid; gap: 6px; margin: 12px 0 14px; }
.acct-facts div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; }
.acct-facts dt { font-family: var(--mp-mono); font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--mp-ink-dim); }
.acct-facts dd { margin: 0; font-family: var(--mp-mono); font-size: 12px; color: var(--mp-ink); overflow-wrap: anywhere; }
.acct-footer { display: flex; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(216, 177, 90, .1); }
.acct-danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px 16px; border: 1px solid rgba(194, 90, 74, .35); }
.acct-danger-zone-head { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.acct-danger-zone-title { font-family: var(--mp-sans); font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #ef958a; }
.acct-danger-zone-sub { font-family: var(--mp-sans); font-size: 12px; line-height: 1.45; color: var(--mp-ink-dim); }
.acct-danger-btn { flex: none; padding: 9px 16px; font-family: var(--mp-sans); font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #ef958a; background: transparent; border: 1px solid rgba(194, 90, 74, .45); cursor: var(--mp-cur-pointer); transition: background .16s ease; }
.acct-danger-btn:hover, .acct-danger-btn:focus-visible { background: rgba(194, 90, 74, .1); }
.acct-danger-btn:disabled { opacity: .5; cursor: default; }

/* Anmeldekarte (nur ohne Konto, nicht im Steam-Client). */
.pf-login { max-width: 520px; }
.pf-login h3 { margin: 0 0 16px; font-family: var(--mp-serif); font-size: 18px; font-weight: 700; letter-spacing: 1px; color: var(--mp-gold-1); }
.pf-login-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }

/* main-05.css faerbt jeden Knopf beim Hover Teal (button:hover:not(:disabled)).
   Auf der Profilseite behalten die Knoepfe ihre eigene Randfarbe. */
#profilePage :is(.pf-ghost, .pf-edit, .acct-edit-btn, .pf-fr-btn, .acct-copy):hover:not(:disabled) { border-color: rgba(216, 177, 90, .62); }
#profilePage .pf-cta:hover:not(:disabled) { border-color: #f0d27a; }
#profilePage .pf-seal:hover:not(:disabled) { border-color: rgba(216, 177, 90, .14); }
#profilePage .pf-filter button:hover:not(:disabled) { border-color: rgba(216, 177, 90, .12); }
#profilePage .pf-fr-btn.is-accept:hover:not(:disabled) { border-color: rgba(77, 208, 196, .7); }
#profilePage .acct-danger-btn:hover:not(:disabled) { border-color: rgba(194, 90, 74, .7); }

/* ── Schmal ── */
@container (max-width: 640px) {
  .pf-tabs { overflow-x: auto; scrollbar-width: none; }
  .pf-tabs::-webkit-scrollbar { display: none; }
  .pf-tabs .profileTab { padding: 12px 8px 13px; letter-spacing: 1.1px; }
  .pf-panel { padding: 18px 16px; }
  .pf-catbox { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 14px; }
  .pf-achvs .pf-catbox .am-cat { left: 52px; }
  .pf-achvs .pf-catbox .am-bubble::before { left: 38px; }
  .pf-achv-grid, .pf-catbox .pf-achv-grid, .pf-fr-list { grid-template-columns: minmax(0, 1fr); }
  .pf-fr-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pf-fr-btn { padding: 8px; }
  .pf-fr-card.is-friend .pf-fr-btn.is-remove { opacity: 1; }
  .acct-edit { padding-left: 0; }
  .acct-danger-zone { flex-direction: column; align-items: stretch; }
  .pf-login-form { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .pf-root.is-enter .pf-rise, .pf-achv.is-found, .pf-fr-card.is-new, .acct-row.is-saved .acct-row-ok { animation: none; }
  .pf-rim .rim-fill, .pf-tabs-glide, .pf-fr-card, .acct-copy svg { transition: none; }
}
