#pfOv[data-profile-polish] > .box {
  block-size: min(660px, calc(100dvh - 32px));
  min-block-size: 0;
  padding: clamp(12px, 3vw, 18px);
  gap: 12px;
  background: var(--v5-panel);
}

@media (scripting: enabled) {
  #pfOv:not([data-profile-polish], [hidden]) > .box {
    visibility: hidden;
    animation: pf-show-fallback 0s .65s forwards;
  }
}
@keyframes pf-show-fallback { to { visibility: visible; } }

#pfOv[data-profile-polish] .pf-head { min-block-size: 88px; padding-inline-end: 62px; }
#pfOv[data-profile-polish] .pf-identity {grid-template-columns:minmax(0,1fr)}
#pfOv[data-profile-polish] #pfNick {overflow-wrap:anywhere;line-height:1.2}
#pfOv[data-profile-polish] #pfTitle {white-space:normal;overflow-wrap:anywhere}
#pfOv[data-profile-polish] #pfX {
  inset: clamp(12px, 3vw, 18px) clamp(12px, 3vw, 18px) auto auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: transparent;
}
#pfOv[data-profile-polish] #pfX::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 9px;
  background: var(--v5-soft);
}
#pfOv[data-profile-polish] #pfX svg { position: relative; width: 16px; height: 16px; }

#pfOv[data-profile-polish] .pf-tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
#pfOv[data-profile-polish] .pf-tabs button {
  display: grid;
  place-items: center;
  min-height: 46px;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}
#pfOv[data-profile-polish] .pf-tabs svg { display: block; width: 21px; height: 21px; }
#pfOv[data-profile-polish] .pf-tabs button[aria-selected="true"] {
  color: var(--v5-action);
  background: color-mix(in srgb, var(--v5-panel) 93%, var(--v5-action));
  box-shadow: none;
}
#pfOv[data-profile-polish] .pf-tabs button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--v5-ink) 70%, var(--v5-panel));
  outline-offset: -3px;
}
#pfOv[data-profile-polish] .pf-tabs button[aria-selected="false"]:hover {
  color: var(--v5-ink);
  background-color: color-mix(in srgb, var(--v5-panel) 65%, transparent);
}

#pfOv[data-profile-polish] .v5-modal-scroll {
  padding-block: 4px 2px;
  padding-inline-end: 8px;
}
#pfOv[data-profile-polish] > .box > .acts {
  justify-content: space-between;
  align-items: center;
  margin: 0;
}
#pfOv[data-profile-polish] .pf-school-summary {
  min-width: 0;
  padding: 8px 0;
  overflow-wrap: anywhere;
}
#pfOv[data-profile-polish] :is(#formulaSeg,#themeSeg,#gradeSeg) {
  display: grid;
  width: 100%;
  align-self: stretch !important;
  gap:3px;
  padding:4px;
  border:0;
  border-radius:14px;
  background:var(--v5-soft);
}
#pfOv[data-profile-polish] #formulaSeg { grid-template-columns: repeat(2,minmax(0,1fr)); }
#pfOv[data-profile-polish] :is(#themeSeg,#gradeSeg) { grid-template-columns: repeat(3,minmax(0,1fr)); }
#pfOv[data-profile-polish] #gradeSeg { width:min(100%,180px) }
#pfOv[data-profile-polish] :is(#formulaSeg,#themeSeg,#gradeSeg) button {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 4px;
  border:0;
  border-radius:10px;
  box-shadow:none;
  line-height: 1.2;
  text-align: center;
  transition: background-color 160ms ease, color 160ms ease;
}
#pfOv[data-profile-polish] :is(#formulaSeg,#themeSeg,#gradeSeg) button[aria-checked=true] {
  color:var(--v5-ink);
  background:var(--v5-panel);
}
#pfOv[data-profile-polish] :is(#formulaSeg,#themeSeg,#gradeSeg) button:focus-visible {
  outline:2px solid currentColor;
  outline-offset:-3px;
}
#pfOv[data-profile-polish] #themeSeg button{font-size:clamp(.76rem,3.8vw,.94rem)}
#pfOv[data-profile-polish] .pf-sound-switch { position: relative; min-height: 44px; cursor: pointer; }
#pfOv[data-profile-polish] .pf-sound-switch :is(#sndChk,#rankChk) {
  position: absolute; inset-inline-start:0;
  inline-size: 44px !important;
  block-size: 44px;
  opacity: 0;
  margin: 0;
}
.pf-sound-track {
  position: relative;
  display: block;
  flex: 0 0 40px;
  block-size: 24px;
  margin-inline: 2px;
  border: 1px solid var(--v5-muted);
  border-radius: 999px;
  background: var(--v5-soft);
  transition: background-color 160ms ease, border-color 160ms ease;
}
.pf-sound-track::after {
  content: "";
  position: absolute;
  inset: 3px auto auto 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--v5-muted);
  transition: translate 180ms ease, background-color 160ms ease;
}
#pfOv .pf-sound-switch input:checked + .pf-sound-track { background: var(--v5-action); border-color: var(--v5-action); }
#pfOv .pf-sound-switch input:checked + .pf-sound-track::after { translate: 16px; background: var(--v5-panel); }
#pfOv .pf-sound-switch input:focus-visible + .pf-sound-track { outline: 2px solid var(--v5-ink); outline-offset: -2px; }
#pfOv[data-profile-polish] select {
  appearance:none;
  min-height:44px;
  padding-inline:12px 37px;
  border:1px solid var(--v5-border);
  border-radius:10px;
  color:var(--v5-ink);
  background:var(--v5-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23768089' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 13px center / 14px no-repeat;
}
#pfOv[data-profile-polish] select:focus-visible {outline:2px solid var(--v5-ink);outline-offset:-3px}
#pfOv[data-profile-polish] .pf-disclosure {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:8px 12px;
  border-radius:10px;
  background:var(--v5-soft);
  list-style:none;
  min-height:44px;
}
#pfOv[data-profile-polish] .pf-disclosure::-webkit-details-marker{display:none}
#pfOv[data-profile-polish] .pf-disclosure::after {
  content:"";
  width:8px;height:8px;
  border:solid currentColor;
  border-width:0 2px 2px 0;
  rotate:45deg;
  transition:rotate 160ms ease;
}
#pfOv[data-profile-polish] details[open]>.pf-disclosure::after{rotate:225deg}
@supports (appearance:base-select) and selector(::picker(select)) {
  #pfOv[data-profile-polish] select,#pfOv[data-profile-polish] select::picker(select) {appearance:base-select}
  #pfOv[data-profile-polish] select {padding-inline-end:13px;background-image:none;align-items:center}
  #pfOv[data-profile-polish] select::picker-icon {color:var(--v5-muted);font-size:.92em;transition:rotate 160ms ease}
  #pfOv[data-profile-polish] select:open::picker-icon {rotate:180deg}
  #pfOv[data-profile-polish] select::picker(select) {
    border:1px solid var(--v5-border);
    border-radius:12px;
    padding:4px;
    margin-block:3px;
    background:var(--v5-panel);
    color:var(--v5-ink);
    box-shadow:0 6px 18px #131c2529;
  }
  #pfOv[data-profile-polish] select option {padding:8px 10px;min-height:40px;border-radius:8px}
  #pfOv[data-profile-polish] select option:is(:checked,:hover,:focus-visible){background:var(--v5-soft)}
  @media(prefers-reduced-motion:no-preference) {
    #pfOv[data-profile-polish] select::picker(select) {
      opacity:0;
      translate:0 -4px;
      transition:opacity 160ms ease,translate 160ms ease,display 160ms allow-discrete,overlay 160ms allow-discrete;
    }
    #pfOv[data-profile-polish] select:open::picker(select) {opacity:1;translate:0}
    @starting-style {#pfOv[data-profile-polish] select:open::picker(select){opacity:0;translate:0 -4px}}
  }
}

@media (prefers-reduced-motion: no-preference) {
  #pfOv[data-profile-polish]:not([hidden]) > .box { animation: pf-review-open 190ms ease both; }
  #pfOv[data-profile-polish] .pf-panel:not([hidden]) { animation: pf-review-content 190ms ease; }
}
@media (prefers-reduced-motion: reduce) {
  #pfOv[data-profile-polish] :is(.pf-tabs button,#formulaSeg button,#themeSeg button,#gradeSeg button,.pf-sound-track),
  #pfOv[data-profile-polish] .pf-disclosure::after,
  #pfOv[data-profile-polish] .pf-sound-track::after { transition: none; }
  #pfOv[data-profile-polish] select::picker-icon {transition:none}
}
@media (max-height: 480px) {
  #pfOv[data-profile-polish] .pf-head { min-block-size: 58px; padding-block: 4px; }
  #pfOv[data-profile-polish] > .box { gap: 7px; }
}
@media (max-width:380px) {
  #pfOv[data-profile-polish] .prvs {grid-template-columns:1fr}
}

@keyframes pf-review-open {
  from { opacity: 0; transform: translateY(8px) scale(.99); }
  to { opacity: 1; transform: none; }
}
@keyframes pf-review-content {
  from { opacity: .75; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
