/* DEWIFY local browser profile — no login required */
.dewify-local-profile-nav {
  justify-self: end;
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(10,10,10,.86);
  color:var(--text);
  padding:6px 7px 6px 10px;
  cursor:pointer;
  text-align:left;
}
.dewify-local-profile-nav:hover,
.dewify-local-profile-nav:focus-visible {
  border-color:var(--line-strong);
  outline:none;
  background:#101010;
}
.dewify-profile-nav-copy {
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
}
.dewify-profile-nav-copy small {
  color:var(--dim);
  font:8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.dewify-profile-nav-copy strong {
  color:var(--text);
  font:700 10px/1.1 system-ui,-apple-system,"Segoe UI",sans-serif;
  white-space:nowrap;
}
.dewify-profile-avatar {
  position:relative;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:32px;
  height:32px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.16);
  border-radius:50%;
  background:linear-gradient(145deg,#242424,#0d0d0d);
  color:#f4f2ec;
  font:700 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.05em;
}
.dewify-profile-avatar img {
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.dewify-profile-avatar.is-large {
  width:76px;
  height:76px;
  font-size:17px;
}
#dewify-local-profile-backdrop {
  position:fixed;
  inset:0;
  z-index:1190;
  background:rgba(0,0,0,.68);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}
#dewify-local-profile-backdrop.is-open {
  opacity:1;
  pointer-events:auto;
}
#dewify-local-profile-panel {
  position:fixed;
  top:74px;
  right:18px;
  z-index:1201;
  width:min(430px,calc(100vw - 36px));
  max-height:calc(100vh - 92px);
  overflow:auto;
  border:1px solid rgba(255,255,255,.14);
  background:#090909;
  color:#f2f2f2;
  box-shadow:0 24px 70px rgba(0,0,0,.55);
  transform:translateY(-8px) scale(.985);
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease,transform .18s ease;
}
#dewify-local-profile-panel.is-open {
  opacity:1;
  transform:translateY(0) scale(1);
  pointer-events:auto;
}
.dewify-local-profile-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 18px 14px;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.dewify-local-profile-kicker {
  margin:0 0 5px;
  color:#8d8d8d;
  font:10px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.dewify-local-profile-title {
  margin:0;
  font-size:22px;
  letter-spacing:-.04em;
}
.dewify-local-profile-close {
  border:0;
  background:transparent;
  color:#a9a9a9;
  width:32px;
  height:32px;
  cursor:pointer;
  font-size:20px;
}
.dewify-local-profile-close:hover,
.dewify-local-profile-close:focus-visible {
  color:#fff;
  outline:none;
}
.dewify-local-profile-body {
  padding:18px;
}
.dewify-profile-hero,
.dewify-profile-edit-hero {
  display:flex;
  align-items:center;
  gap:14px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.1);
}
.dewify-profile-hero h3 {
  margin:6px 0 4px;
  font-size:21px;
  letter-spacing:-.04em;
}
.dewify-profile-hero [data-profile-subtitle],
.dewify-profile-edit-hero strong {
  margin:0;
  color:#8d8d8d;
  font-size:11px;
  line-height:1.5;
}
.dewify-profile-active {
  display:flex;
  align-items:center;
  gap:7px;
  margin:0;
  color:#a7c989;
  font:8px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.09em;
}
.dewify-profile-active i {
  width:6px;
  height:6px;
  border-radius:50%;
  background:#a7c989;
  box-shadow:0 0 0 4px rgba(167,201,137,.09);
}
.dewify-profile-details {
  margin-top:18px;
  border-top:1px solid rgba(255,255,255,.08);
  border-left:1px solid rgba(255,255,255,.08);
}
.dewify-profile-details>div {
  display:grid;
  grid-template-columns:130px minmax(0,1fr);
  gap:12px;
  padding:12px;
  border-right:1px solid rgba(255,255,255,.08);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.dewify-profile-details span {
  color:#64645e;
  font:8px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.1em;
}
.dewify-profile-details strong {
  min-width:0;
  color:#e9e7e1;
  font-size:11px;
  line-height:1.45;
  overflow-wrap:anywhere;
}
.dewify-local-profile-view-actions {
  display:flex;
  align-items:center;
  gap:12px;
  margin-top:16px;
}
.dewify-local-profile-edit,
.dewify-local-profile-save {
  border:1px solid rgba(255,255,255,.2);
  background:#f2f2f2;
  color:#090909;
  padding:11px 13px;
  font:700 10px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.07em;
  text-transform:uppercase;
  cursor:pointer;
}
.dewify-local-profile-clear,
.dewify-local-profile-cancel,
.dewify-avatar-remove {
  border:0;
  background:transparent;
  color:#8d8d8d;
  padding:9px 0;
  font:10px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  text-transform:uppercase;
  letter-spacing:.07em;
  cursor:pointer;
}
.dewify-local-profile-clear:hover,
.dewify-local-profile-cancel:hover,
.dewify-avatar-remove:hover,
.dewify-local-profile-clear:focus-visible,
.dewify-local-profile-cancel:focus-visible,
.dewify-avatar-remove:focus-visible {
  color:#fff;
  outline:none;
}
.dewify-local-profile-note {
  margin:14px 0 0;
  color:#8d8d8d;
  font-size:10px;
  line-height:1.65;
}
.dewify-local-profile-warning {
  margin:12px 0 0;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
  color:#62625d;
  font-size:9px;
  line-height:1.55;
}
.dewify-local-profile-form {
  display:grid;
  gap:12px;
}
.dewify-local-profile-form[hidden] {
  display:none;
}
.dewify-avatar-picker {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:12px;
  border:1px dashed rgba(255,255,255,.16);
  background:#0d0d0d;
  color:#a7a7a2;
  cursor:pointer;
}
.dewify-avatar-picker span {
  color:#d7d5ce;
  font:9px ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.dewify-avatar-picker em {
  color:#8c8c86;
  font-size:10px;
  font-style:normal;
}
.dewify-avatar-picker input {
  position:absolute;
  inset:0;
  opacity:0;
  cursor:pointer;
}
.dewify-avatar-remove {
  justify-self:start;
  margin-top:-3px;
}
.dewify-local-profile-field {
  display:grid;
  gap:7px;
}
.dewify-local-profile-field label {
  color:#8d8d8d;
  font:9px/1.2 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.09em;
  text-transform:uppercase;
}
.dewify-local-profile-field input {
  width:100%;
  box-sizing:border-box;
  border:1px solid rgba(255,255,255,.12);
  background:#0f0f0f;
  color:#f2f2f2;
  padding:12px 13px;
  outline:none;
}
.dewify-local-profile-field input:focus {
  border-color:rgba(255,255,255,.35);
}
.dewify-local-profile-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:3px;
}
.dewify-local-profile-status {
  min-height:15px;
  margin:2px 0 0;
  color:#8d8d8d;
  font:10px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;
}
@media(max-width:760px) {
  .dewify-profile-nav-copy {
    display:none;
  }
  .dewify-local-profile-nav {
    padding:5px;
  }
  #dewify-local-profile-panel {
    top:66px;
    right:12px;
    width:calc(100vw - 24px);
    max-height:calc(100vh - 82px);
  }
}
@media(prefers-reduced-motion:reduce) {
  #dewify-local-profile-panel,
  #dewify-local-profile-backdrop { transition:none; }
}

/* Friendlier profile dropdown and larger avatar picker */
.dewify-local-profile-nav {
  position: relative;
  padding: 7px 8px 7px 11px;
}
.dewify-profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(310px, calc(100vw - 28px));
  padding: 10px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background: rgba(9,9,9,.98);
  box-shadow: 0 20px 55px rgba(0,0,0,.55);
  opacity: 0;
  transform: translateY(-5px) scale(.98);
  transform-origin: top right;
  pointer-events: none;
  visibility: hidden;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.dewify-profile-dropdown.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  visibility: visible;
}
.dewify-profile-dropdown-summary {
  display:flex;
  align-items:center;
  gap:11px;
  padding:8px 8px 12px;
  border-bottom:1px solid rgba(255,255,255,.09);
}
.dewify-profile-avatar-dropdown {
  width:40px;
  height:40px;
}
.dewify-profile-dropdown-summary > div:last-child {
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.dewify-profile-dropdown-summary strong {
  font-size:12px;
  color:#f1f0eb;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.dewify-profile-dropdown-summary span {
  color:#777770;
  font:9px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.05em;
  text-transform:uppercase;
}
.dewify-profile-dropdown-menu {
  display:grid;
  gap:4px;
  padding:8px 0;
}
.dewify-profile-dropdown-menu button {
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
  border:0;
  border-radius:9px;
  background:transparent;
  color:#f3f2ed;
  padding:11px 10px;
  text-align:left;
  cursor:pointer;
}
.dewify-profile-dropdown-menu button:hover,
.dewify-profile-dropdown-menu button:focus-visible {
  background:rgba(255,255,255,.055);
  outline:none;
}
.dewify-profile-dropdown-menu button span {
  font:700 11px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
}
.dewify-profile-dropdown-menu button small {
  color:#777770;
  font:9px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;
}
.dewify-profile-dropdown-note {
  margin:0;
  padding:8px 9px 4px;
  color:#5f5f59;
  font:8px/1.5 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.02em;
}
.dewify-avatar-picker {
  min-height:86px;
  padding:16px 17px;
  border-radius:12px;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:5px;
  border-style:solid;
  border-color:rgba(255,255,255,.16);
  background:linear-gradient(145deg,#111,#0b0b0b);
  transition:border-color .16s ease, background .16s ease, transform .16s ease;
}
.dewify-avatar-picker:hover {
  border-color:rgba(255,255,255,.32);
  background:linear-gradient(145deg,#151515,#0c0c0c);
  transform:translateY(-1px);
}
.dewify-avatar-picker::after {
  content:"Choose an image from this device";
  color:#66665f;
  font:9px/1.4 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.04em;
}
.dewify-avatar-picker span {
  font-size:10px;
}
.dewify-avatar-picker em {
  padding:7px 10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:7px;
  color:#dddcd6;
  background:rgba(255,255,255,.045);
  font:700 9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.dewify-avatar-remove {
  min-height:28px;
}
@media(max-width:760px) {
  .dewify-profile-dropdown {
    right:-5px;
    width:min(300px,calc(100vw - 24px));
  }
}
@media(prefers-reduced-motion:reduce) {
  .dewify-profile-dropdown,
  .dewify-avatar-picker { transition:none; }
}

/* Avatar adjustment controls */
.dewify-avatar-adjuster {
  display:grid;
  gap:14px;
  padding:14px;
  border:1px solid rgba(255,255,255,.1);
  border-radius:12px;
  background:#0c0c0c;
}
.dewify-avatar-adjuster[hidden] {
  display:none;
}
.dewify-avatar-adjuster-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}
.dewify-avatar-adjuster-head p {
  margin:0 0 4px;
  color:#e4e3de;
  font-size:11px;
  font-weight:700;
}
.dewify-avatar-adjuster-head span {
  color:#70706a;
  font:9px/1.45 ui-monospace,SFMono-Regular,Menlo,monospace;
}
.dewify-avatar-reset {
  flex:0 0 auto;
  border:1px solid rgba(255,255,255,.12);
  border-radius:7px;
  background:transparent;
  color:#aaa9a3;
  padding:7px 9px;
  font:8px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.08em;
  text-transform:uppercase;
  cursor:pointer;
}
.dewify-avatar-reset:hover,
.dewify-avatar-reset:focus-visible {
  color:#fff;
  border-color:rgba(255,255,255,.3);
  outline:none;
}
.dewify-avatar-adjust-preview {
  position:relative;
  display:grid;
  place-items:center;
  width:100%;
  min-height:228px;
  padding:10px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
  border-radius:10px;
  background:
    radial-gradient(circle at 50% 50%,rgba(255,255,255,.045),transparent 50%),
    repeating-conic-gradient(from 45deg,#101010 0deg 25deg,#0c0c0c 25deg 50deg);
}
.dewify-profile-avatar-adjust {
  width:212px;
  height:212px;
  border:2px solid rgba(255,255,255,.28);
  position:relative;
  overflow:hidden;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
}
.dewify-avatar-range {
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
  gap:7px 12px;
}
.dewify-avatar-range span {
  color:#b7b6b0;
  font:9px/1.3 ui-monospace,SFMono-Regular,Menlo,monospace;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.dewify-avatar-range output {
  color:#777770;
  font:9px/1 ui-monospace,SFMono-Regular,Menlo,monospace;
}
.dewify-avatar-range input {
  grid-column:1 / -1;
  width:100%;
  margin:0;
  accent-color:#f2f2f2;
  cursor:pointer;
}
.dewify-avatar-range input::-webkit-slider-runnable-track {
  height:4px;
  border-radius:999px;
  background:#272727;
}
.dewify-avatar-range input::-webkit-slider-thumb {
  appearance:none;
  width:16px;
  height:16px;
  margin-top:-6px;
  border:2px solid #0a0a0a;
  border-radius:50%;
  background:#f2f2f2;
}
.dewify-avatar-range input::-moz-range-track {
  height:4px;
  border-radius:999px;
  background:#272727;
}
.dewify-avatar-range input::-moz-range-thumb {
  width:13px;
  height:13px;
  border:2px solid #0a0a0a;
  border-radius:50%;
  background:#f2f2f2;
}
@media(max-width:620px) {
  .dewify-profile-avatar-adjust {
    width:198px;
    height:198px;
  }
  .dewify-avatar-adjust-preview {
    min-height:208px;
    padding:8px;
  }
}

/* Final avatar sizing/rendering overrides */
.dewify-profile-hero .dewify-profile-avatar.is-large,
.dewify-profile-edit-hero .dewify-profile-avatar.is-large {
  width:92px;
  height:92px;
  box-sizing:border-box;
}
.dewify-profile-hero .dewify-profile-avatar.is-large img,
.dewify-profile-edit-hero .dewify-profile-avatar.is-large img {
  width:100% !important;
  height:100% !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:cover !important;
  object-position:50% 50% !important;
  transform:none !important;
  left:50% !important;
  top:50% !important;
}
.dewify-profile-avatar.dewify-profile-avatar-adjust {
  width:200px;
  height:200px;
  box-sizing:border-box;
}
@media(max-width:620px) {
  .dewify-profile-avatar.dewify-profile-avatar-adjust {
    width:190px;
    height:190px;
  }
}


.dewify-profile-avatar-adjust img {
  position:absolute;
  left:50%;
  top:50%;
  width:100%;
  height:100%;
  max-width:none;
  max-height:none;
  object-fit:cover;
  object-position:50% 50%;
  will-change: transform;
  pointer-events:none;
}
