/* The same gradient surrounds the portrait in navigation, profile and preview. */
.av, .pf-avatar, .pf-preview-picture, .bgswatch {
  background: linear-gradient(145deg, var(--a1, #ffd43b), var(--a2, #ff8a3d));
  border-radius: 50%;
}
.av { display: block; width: 42px; height: 42px; flex: none; padding: 3px; }
.who .av { background: linear-gradient(145deg,var(--a1),var(--a2)); }
.who .av img, .pf-avatar img, .pf-preview-picture img {
  display: block; width: 100%; height: 100%; object-fit: contain;
  border-radius: 50%; background: transparent;
}
.pf-hero { grid-template-columns: 1fr; animation: none; }
.pf-head { flex-direction: row; align-items: center; }
.pf-name { min-width: 0; overflow-wrap: anywhere; }
.pf-avatar {
  position: relative; display: block; width: 92px; height: 92px;
  flex: none; padding: 5px; box-shadow: 0 8px 16px #24061540;
}
.pf-avatar::after { display: none; }
.pf-edit {
  display: grid; place-items: center; position: absolute; bottom: 1px; right: -2px;
  width: 28px; height: 28px; border-radius: 50%; background: #fff5e6; color: #67182c;
  box-shadow: 0 0 0 2px #67182c;
}
.pf-edit .i { width: 15px; height: 15px; }
.pf-hero :focus-visible { outline-color: #ffe08c; }
.profile-page .main { min-width: 0; container-type: inline-size; overflow-wrap: anywhere; }
.profile-page .main :is(button, a, summary, input, select):focus-visible {
  outline: 3px solid var(--accent-text); outline-offset: 3px;
}
.profile-page .main .pf-hero :focus-visible { outline-color: #ffe08c; }
.pf-access, .pf-row, .pf-group {
  background: var(--white); border: 1px solid var(--line); border-radius: 18px;
}
.pf-access {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 13px 18px;
  align-items: center; padding: clamp(17px, 3cqi, 26px);
  border-inline-start: 4px solid var(--accent-text);
}
.pf-tile, .ps-ico, .ach-ico {
  display: grid; place-items: center; flex: none; border-radius: 13px;
  background: var(--rose); color: var(--accent-text); width: 44px; height: 44px;
}
.pf-tile .i, .ps-ico .i, .ach-ico .i { width: 23px; height: 23px; margin: 0; }
.pf-access h2 { margin: 3px 0; font-size: clamp(19px, 2.6cqi, 25px); }
.pf-label { font-size: 14px; color: var(--muted); font-weight: 800; }
.pf-sub { color: var(--muted); font-size: 15px; line-height: 1.45; }
.pf-action {
  min-height: 44px; padding: 8px 12px; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px;
  font-size: 14px; font-weight: 850; text-decoration: none;
  border: 1px solid var(--line); border-radius: 11px;
}
.pf-action:hover { border-color: var(--accent-text); }
.pf-progress, .pf-settings { margin: clamp(22px, 3cqi, 34px) 0 0; }
.pf-progress h2, .pf-settings h2 { margin: 0 0 13px; font-size: clamp(18px, 2.5cqi, 24px); }
.pstats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; margin-bottom: 12px; }
.ps { display: flex; gap: 10px; align-items: center; background: var(--white); border: 1px solid var(--line); border-radius: 15px; padding: 13px 10px; }
.ps-ico { width: 32px; height: 32px; border-radius: 10px; }
.ps-ico .i { height: 17px; width: 17px; }
.ps b { display: block; font-family: var(--display); font-size: clamp(19px, 2.8cqi, 28px); line-height: 1.1; }
.ps small { display: block; color: var(--muted); font-size: 13px; font-weight: 750; margin-bottom: 3px; }
.pf-group { overflow: clip; }
.pf-group > .pf-row { border: 0; border-radius: 0; background: transparent; }
.pf-group > .pf-row + .pf-row { border-top: 1px solid var(--line); }
.pf-row { min-width: 0; scroll-margin-top: 16px; }
.pf-row > summary {
  display: flex; gap: 12px; align-items: center; list-style: none;
  padding: 13px clamp(14px, 2.2cqi, 20px); min-height: 56px;
  cursor: pointer; font-size: 16px; border-radius: 14px;
}
.pf-row > summary::-webkit-details-marker { display: none; }
.pf-row > summary > .i { width: 20px; height: 20px; flex: none; color: var(--accent-text); }
.pf-row > summary b { margin-inline-end: auto; }
.pf-row > summary:hover b { color: var(--accent-text); }
.pf-row > summary:focus-visible { outline-offset: -4px !important; }
.pf-chevron {
  width: 8px; height: 8px; margin: 0 3px 3px 1px; border: solid var(--muted);
  border-width: 0 2px 2px 0; transform: rotate(45deg); flex: none;
}
.pf-row[open] > summary .pf-chevron { transform: rotate(225deg); margin-bottom: -3px; }
.pf-count { color: var(--muted); font-size: 14px; font-weight: 800; }
.pf-row-body { padding: 4px clamp(14px, 2.2cqi, 20px) 20px; }
.pf-settings-form { max-width: 570px; }
.pf-settings-form .btn, .avform .btn { align-self: flex-start; min-height: 44px; }
.pf-hint { font-size: 14px; color: var(--muted); line-height: 1.45; }
.pf-hint a { text-underline-offset: 3px; }
.achgrid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 9px; }
.ach { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 13px; border: 1px solid var(--line); background: var(--cream); }
.ach > div { flex: 1; min-width: 0; }
.ach-ico { width: 32px; height: 32px; background: var(--line); color: var(--muted); }
.ach-ico .i { width: 17px; height: 17px; }
.ach.got .ach-ico { background: #ffda7b; color: #5a331c; }
.ach b, .ach small, .ach em { display: block; }
.ach b { font-size: 15px; }
.ach small, .ach em { font-size: 13px; font-style: normal; color: var(--muted); }
.ach em { font-weight: 800; }
.ach progress { display: block; width: 100%; height: 6px; margin: 7px 0 2px; accent-color: var(--accent-text); }
.avform { display: grid; gap: 17px; }
.avform fieldset { margin: 0; padding: 0; min-width: 0; border: 0; }
.avform legend { padding: 0; margin: 0 0 8px; font-size: 15px; font-weight: 850; }
.avform .btn { justify-self: start; }
.pf-preview { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pf-preview-picture { width: 62px; height: 62px; padding: 4px; }
.pf-preview b, .pf-preview small { display: block; }
.pf-preview small { color: var(--muted); font-size: 14px; }
.avpick, .bgpick { display: flex; gap: 6px; flex-wrap: wrap; }
.avopt, .bgopt {
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px;
  min-height: 44px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--cream); font-size: 14px; font-weight: 750; cursor: pointer;
}
.avopt input, .bgopt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.avcard, .bgswatch {
  position: relative; display: grid; place-items: center; border-radius: 50%;
  flex: none; width: 30px; height: 30px;
}
.avcard { background: var(--rose); }
.avcard img { width: 100%; height: 100%; object-fit: contain; }
.bgswatch { width: 22px; height: 22px; }
.avopt:has(input:checked), .bgopt:has(input:checked) { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.avopt input:checked + .avcard::after, .bgopt input:checked + .bgswatch::after {
  position: absolute; display: grid; place-items: center; right: -2px; bottom: -1px;
  content: "✓"; width: 14px; height: 14px; border-radius: 50%; background: #2e182b; color: #fff; font: 800 10px/1 system-ui;
}
.avopt:focus-within, .bgopt:focus-within { outline: 3px solid var(--accent-text); outline-offset: 2px; }
.pf-export { margin-top: 8px; }
.pf-delete { margin-top: 16px; border-top: 1px solid var(--line); }
.pf-delete > summary { min-height: 44px; padding-block: 12px; font-size: 14px; font-weight: 800; cursor: pointer; }
@media (prefers-reduced-motion: no-preference) {
  .pf-chevron { transition: transform .16s ease-out; }
  @keyframes pf-open { from { opacity: .8; transform: translateY(-3px); } }
  .pf-row[open] > .pf-row-body { animation: pf-open .18s ease-out; }
}
@container (max-width: 740px) {
  .pstats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@container (max-width: 485px) {
  .pf-head { gap: 15px; }
  .pf-avatar { width: 58px; height: 58px; padding: 3px; }
  .pf-edit { width: 22px; height: 22px; }
  .pf-hero { padding: 18px 15px; }
  .pf-hero h1 { font-size: clamp(21px, 7cqi, 31px); }
  .pf-hero p { font-size: 14px; }
  .pf-hero .pg-chips { gap: 4px 7px; margin-top: 8px; }
  .pf-hero .pg-chip { font-size: 12px; padding: 3px 7px; }
  .pf-hero .pg-chip b { font-size: inherit; }
  .pf-access { grid-template-columns: auto minmax(0,1fr); gap: 7px 12px; }
  .pf-access .pf-action { grid-column: 2; justify-self: start; }
  .pf-tile { width: 32px; height: 32px; }
  .pf-tile .i { width: 17px; height: 17px; }
  .ps { gap: 7px; padding: 10px; }
}
@container (max-width: 320px) {
  .pf-hero .pf-head { display: block; }
  .pf-avatar { float: right; margin-left: 7px; }
  .ps { align-items: start; }
  .ps-ico { width: 24px; height: 24px; border-radius: 8px; }
}

.pf-mobile-controls, .pf-mobile-exit { display: none; }
@media (max-width: 860px) {
  .pf-mobile-controls { display: block; border-top: 1px solid var(--line); }
  .pf-mobile-controls .theme-btn {
    justify-content: start; gap: 12px; padding: 12px clamp(14px, 2.2cqi, 20px); min-height: 56px;
    border: 0; background: transparent; color: var(--plum); font: 800 16px var(--body);
  }
  .pf-mobile-controls .theme-btn .i { display: block; width: 20px; height: 20px; color: var(--accent-text); }
  .pf-mobile-controls .theme-btn:focus-visible { outline-offset: -4px; }
  .pf-mobile-controls + .pf-row { border-top: 1px solid var(--line); }
  .pf-mobile-exit { display: block; margin-top: 12px; }
  .pf-mobile-exit button { background: var(--white); cursor: pointer; }
}
.pf-help {margin:14px 0;}.help-form {display:grid;gap:10px;padding:16px;max-width:540px;color:var(--plum);}
.help-form label {display:grid;gap:3px;font-weight:750;}.help-form textarea,.help-form select {font:inherit;padding:8px;border-radius:9px;border:1px solid var(--line);color:var(--plum);background:var(--white);min-width:0;width:100%;}
.help-form button,.help-email {justify-self:start;}.help-context,.help-email {font-size:.88rem;}.help-email {color:var(--accent-text);overflow-wrap:anywhere;}.help-form p:empty {display:none;}
.order-box {max-width:640px;margin:auto;padding:clamp(14px,4%,34px);display:grid;gap:16px;background:var(--white);border:1px solid var(--line);border-radius:20px;}.order-box h1{font-size:clamp(27px,4vw,38px);}.order-box h2{font-size:1.3rem;}.order-box>a,.order-box form button {justify-self:start;}.order-lines div,.order-total{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:7px 16px;border-bottom:1px solid var(--line);padding:8px 0;}.order-lines dt{color:var(--muted);}.order-lines dd{margin:0;font-weight:800;}.order-total strong{font-size:1.55rem;}.order-code{display:flex;gap:8px;flex-wrap:wrap;align-items:end;}.order-code label{display:grid;font-weight:750;}.order-code input{min-height:44px;max-width:100%;border-radius:9px;border:1px solid var(--line);padding:6px;background:var(--cream);color:var(--plum);font:inherit;}
.cab-back {display:inline-flex;align-items:center;min-height:44px;color:var(--accent-text);font-weight:800;text-underline-offset:4px;}
.paid-plans {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:12px;}
.paid-plan {display:grid;grid-template-rows:1fr auto auto auto;gap:8px;background:var(--white);border:1px solid var(--line);border-top:4px solid #8a2945;border-radius:17px;padding:clamp(14px,2vw,23px);}
.paid-plan h2,.offer-free h2 {font-size:1.22rem;line-height:1.25;margin:0;}.paid-plan h2{margin:4px 0 2px;}
.offer-scope,.offer-term,.offer-free p,.offer-note {color:var(--muted);margin:0;}.offer-scope{font-weight:800;font-size:.82rem;}.offer-price{font-size:clamp(23px,3vw,34px);font-family:var(--display);}.paid-plan a{margin-top:5px;min-height:44px;}
.offer-free {display:flex;justify-content:space-between;align-items:center;gap:10px 18px;flex-wrap:wrap;margin:16px 0;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--white);}
.offer-free a {display:inline-flex;align-items:center;min-height:44px;color:var(--accent-text);font-weight:800;}.offer-note{margin:12px 0;}

.cabinet-video {width:100%;height:auto;display:block;border-radius:16px;background:#211b24}
.cabinet-welcome {box-sizing:border-box;width:min(100%,760px);margin:0 auto;padding:clamp(20px,5vw,52px) 20px}
.cabinet-welcome h1 {font-size:clamp(1.65rem,5vw,2.6rem);line-height:1.15;overflow-wrap:anywhere}
.cabinet-welcome p {line-height:1.5;margin:12px 0 18px}
.cabinet-welcome form {margin-top:18px}
