/* Shared user identity and private saved-list editor. Geometry is deliberate;
   colors, type, space, surfaces and interactions use the system tokens. */
.tst-user-avatar {position:relative;display:inline-grid;place-items:center;flex:none;width:64px;height:64px;border-radius:var(--tst-radius-round);overflow:hidden;background:var(--tst-accent-soft);color:var(--tst-accent);font-size:var(--tst-type-section);font-weight:700;line-height:var(--tst-leading-solid);border:var(--tst-border-brand) solid var(--tst-ink)}
.tst-user-avatar--nav {border-color:var(--tst-line);width:var(--tst-nav-avatar-size);height:var(--tst-nav-avatar-size);font-size:var(--tst-type-caption)}
.tst-user-avatar img {position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.tst-personal-identity {display:flex;align-items:center;gap:var(--tst-space-4);margin-bottom:var(--tst-space-6)}
.tst-profile-photo {display:inline-flex;flex:none;border-radius:var(--tst-radius-round)}
.tst-identity-copy {flex:1;min-width:0;overflow-wrap:anywhere}
.tst-personal-identity h1 {font-size:var(--tst-type-page);line-height:var(--tst-leading-heading);margin:var(--tst-space-1) 0 var(--tst-space-2)}
.tst-personal-identity p {margin:0;color:var(--tst-muted)}
.tst-personal-identity>.tst-inline-link {min-height:var(--tst-touch-min);display:inline-flex;align-items:center;gap:var(--tst-space-2)}
.woocommerce .tst-avatar-editor {min-width:0;width:100%}
.tst-avatar-editor-row {display:flex;flex-direction:column;align-items:stretch;gap:var(--tst-space-4)}
.tst-avatar-input {min-width:0;width:100%}
.tst-avatar-input input {width:100%;min-width:0;max-width:100%;font-size:var(--tst-type-body);min-height:var(--tst-touch-min)}
.tst-avatar-input p,.tst-list-help {color:var(--tst-muted);font-size:var(--tst-type-label)}
.tst-avatar-preview {flex:none;align-self:flex-start;display:grid;place-items:center start;width:96px;height:96px}
.tst-avatar-preview canvas {width:96px;height:96px;border-radius:var(--tst-radius-round);background:var(--tst-surface-subtle)}
.tst-avatar-crop {display:grid;gap:var(--tst-space-3);margin-top:var(--tst-space-4)}
.tst-avatar-crop input[type=range] {width:100%;height:var(--tst-touch-min);padding:0;accent-color:var(--tst-accent)}
.tst-avatar-remove {display:flex!important;align-items:center;gap:var(--tst-space-2);min-height:var(--tst-touch-min);margin-top:var(--tst-space-3)}
.tst-saved-lists {margin-bottom:var(--tst-space-5)}
.tst-list-toolbar {display:flex;align-items:center;justify-content:space-between;gap:var(--tst-space-3)}
.tst-list-toolbar h2 {font-size:var(--tst-type-subheading);margin:0;overflow-wrap:anywhere;min-width:0}
.tst-list-toolbar button {flex:none}
.tst-list-help {margin:var(--tst-space-2) 0 var(--tst-space-4)}
.tst-list-rail {display:flex;gap:var(--tst-space-3);overflow-x:auto;overscroll-behavior-x:contain;padding:var(--tst-space-1) var(--tst-space-1) var(--tst-space-4);margin-bottom:var(--tst-space-3)}
.tst-redesign .tstd-shell button.tst-list-tile {flex:0 0 164px;display:flex;flex-direction:column;align-items:stretch;gap:var(--tst-space-2);padding:var(--tst-space-2);background:var(--tst-surface);color:var(--tst-ink);border:1px solid var(--tst-line);border-radius:var(--tst-radius-card);text-align:left;white-space:normal}
.tst-redesign .tstd-shell button.tst-list-tile:hover {background:var(--tst-surface-subtle);color:var(--tst-ink)}
.tst-redesign .tstd-shell button.tst-list-tile[aria-pressed=true] {border-color:var(--tst-accent);background:var(--tst-accent-soft);box-shadow:inset 0 0 0 1px var(--tst-accent)}
.tst-list-tile strong {font-size:var(--tst-type-label);line-height:var(--tst-leading-title);overflow-wrap:anywhere}
.tst-list-tile small {color:var(--tst-muted);font-weight:400}
.tst-list-tile-media {aspect-ratio:var(--tst-media-collection);border-radius:var(--tst-radius-control);overflow:hidden;background:var(--tst-surface-subtle);display:grid;place-items:center;color:var(--tst-accent)}
.tst-list-tile-media>img {width:100%;height:100%;object-fit:cover}
.tst-redesign .tstd-shell button.tst-list-tile--all {flex-basis:132px}
.tst-list-tile--all .tst-list-tile-media {font-size:var(--tst-type-page);font-weight:700}
.tst-personal-dialog {width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--tst-line);border-radius:var(--tst-radius-card);color:var(--tst-ink);background:var(--tst-surface);box-shadow:var(--tst-shadow-float);overflow:hidden}
.tst-personal-dialog::backdrop {background:var(--tst-overlay)}
.tst-personal-dialog form {display:flex;flex-direction:column;max-height:calc(100dvh - 34px);margin:0}
.tst-personal-dialog header,.tst-personal-dialog footer {display:flex;align-items:center;justify-content:space-between;gap:var(--tst-space-3);padding:var(--tst-space-4) var(--tst-space-5);flex:none}
.tst-personal-dialog header {border-bottom:1px solid var(--tst-line)}
.tst-personal-dialog header h2 {font-size:var(--tst-type-subheading);margin:0}
.tst-personal-dialog footer {justify-content:flex-end;border-top:1px solid var(--tst-line)}
.tst-list-fields {overflow-y:auto;overscroll-behavior:contain;padding:var(--tst-space-5);display:flex;flex-direction:column;gap:var(--tst-space-3)}
.tst-list-fields label {font-weight:600}
.tst-list-fields input:not([type=checkbox]),.tst-list-fields select {width:100%;min-height:var(--tst-touch-min);margin:0}
.tst-list-fields [data-list-cover-preview] {width:100%;max-height:150px;object-fit:cover;border-radius:var(--tst-radius-control)}
.tst-list-fields fieldset {min-width:0;margin:var(--tst-space-3) 0 0;padding:0;border:0}
.tst-list-fields legend {font-weight:700}
.tst-list-fields fieldset p {color:var(--tst-muted);font-size:var(--tst-type-label)}
[data-list-selected] {list-style:none;margin:0 0 var(--tst-space-4);padding:0;display:grid;gap:var(--tst-space-2)}
.tst-list-order-row {display:flex;align-items:center;flex-wrap:wrap;gap:var(--tst-space-2);padding:var(--tst-space-2);background:var(--tst-surface-subtle);border-radius:var(--tst-radius-control)}
.tst-list-order-row>span {flex:1 1 160px;min-width:0;overflow-wrap:anywhere;font-size:var(--tst-type-label)}
.tst-list-order-actions {display:flex;gap:var(--tst-space-1)}
.tst-list-order-actions button {min-height:var(--tst-touch-min);padding:var(--tst-space-2);font-size:var(--tst-type-label)}
[data-list-choices] {max-height:240px;overflow:auto;margin-top:var(--tst-space-3)}
.tst-list-fields .tst-list-choice {display:flex;align-items:center;gap:var(--tst-space-3);min-height:var(--tst-touch-min);padding:var(--tst-space-2) 0;border-bottom:1px solid var(--tst-line);font-size:var(--tst-type-label);font-weight:400!important;overflow-wrap:anywhere}
.tst-list-choice input {flex:none;accent-color:var(--tst-accent)}
[data-list-error] {color:var(--tst-error);margin:0}
[data-list-status]:empty,[data-avatar-status]:empty {display:none}
.tst-personal-dialog [hidden],.tst-saved-lists [hidden],.tst-avatar-editor [hidden] {display:none!important}
@media(max-width:600px) {
 .tst-personal-identity {display:grid;grid-template-columns:64px minmax(0,1fr);gap:var(--tst-space-3);margin-bottom:var(--tst-space-5)}
 .tst-personal-identity>.tst-inline-link {grid-column:2;justify-self:start;margin:0}
 .tst-personal-identity p {font-size:var(--tst-type-label)}
 .tst-list-toolbar h2 {font-size:var(--tst-type-card-title)}
 .tst-list-toolbar .button {padding:var(--tst-space-2) var(--tst-space-3);font-size:var(--tst-type-label)}
 .tst-redesign .tstd-shell button.tst-list-tile {flex-basis:148px}
 .tst-personal-dialog header,.tst-personal-dialog footer,.tst-list-fields {padding:var(--tst-panel-padding)}
 .tst-avatar-preview,.tst-avatar-preview canvas {width:64px;height:64px}
}

.tstd-shortcuts[hidden] {display:none!important}
