.list-manager-profile-toggle {
  font-size: 0.65rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.home-pins-root {
  width: 100%;
  max-width: min(56rem, 96vw);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.home-pin-section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: min(56rem, 96vw);
  position: relative;
  margin-bottom: 1.25rem;
  gap: 0.35rem;
}

.home-pin-section-header .melvin-section-label {
  margin-bottom: 0.35rem;
}

.home-pin-section-header .melvin-section-description {
  margin-bottom: 1rem;
}

.home-section-list-edit {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

.home-pin-section {
  margin-bottom: 1.5rem;
}

.nav-inner--convert #btn-home-add-pin.btn-add-global {
  display: flex;
  width: 32px;
  height: 32px;
  min-width: 32px;
  max-width: 32px;
  margin-top: 0;
  padding: 0;
  flex-shrink: 0;
}

.nav-inner--convert #btn-home-add-pin.btn-add-global[hidden] {
  display: none !important;
}

.home-list-manager-section-label {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
  margin: 0.75rem 0 0.4rem;
}

.home-list-manager-section-label:first-of-type {
  margin-top: 0.5rem;
}

.home-list-manager-rows {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.list-manager-row--available {
  justify-content: space-between;
}

.home-profile-list-name {
  flex: 1;
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
}

.home-pin-editable {
  position: relative;
  cursor: default;
}

.home-pin-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 12px;
}

.home-pin-card-edit {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.melvin-projects-hint {
  font-size: 0.75rem;
  color: #fff;
  margin: 0 0 1rem;
}

.melvin-link-favicon {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  object-fit: contain;
}

.home-wallpaper-tile {
  position: relative;
  cursor: pointer;
}

.home-wallpaper-tile input[type="checkbox"] {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  z-index: 2;
}

.home-wallpaper-tile-label {
  display: block;
  font-size: 0.6rem;
  color: var(--muted);
  text-align: center;
  margin-top: 0.25rem;
}

@media (max-width: 900px) and (min-width: 521px) {
  .melvin-page .melvin-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}


.melvin-page {
  max-width: 960px;
  margin: 0 auto;
  padding: calc(16vh + 3.25rem) 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-logo--melvin {
  color: #fff;
}

.nav-logo--melvin span {
  color: var(--accent);
}

.melvin-edit-btn {
  font-size: 0.75rem;
  padding: 0.4rem 0.8rem;
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.15s ease, background 0.15s ease;
  transform-origin: center;
}

.melvin-edit-btn:hover {
  transform: scale(var(--action-hover-scale-text, 1.08));
}

.melvin-edit-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124, 106, 247, 0.1);
}

.melvin-nav-icons {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
}

.melvin-nav-icons .nav-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.melvin-nav-icons .nav-icon-link:hover {
  color: var(--accent2);
  background: rgba(255, 255, 255, 0.06);
}

.melvin-nav-icons .nav-icon-link svg {
  display: block;
  width: 18px;
  height: 18px;
}

/* Profile section — centered intro card */
.melvin-profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  width: 100%;
}

.melvin-glass-box {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 0.85rem 1.15rem;
  width: fit-content;
  max-width: 100%;
}

.melvin-profile-card {
  position: relative;
  width: max-content;
  max-width: min(34rem, 92vw);
  min-width: min(16rem, 100%);
  padding: 1.35rem 1.6rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

body.has-bing-bg .melvin-glass-box,
body.has-custom-bg .melvin-glass-box {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-color: rgba(255, 255, 255, 0.08);
}

.melvin-profile-edit-row {
  display: none;
  position: absolute;
  top: 0;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  gap: 0.35rem;
  justify-content: center;
  align-items: center;
  width: auto;
  max-width: calc(100% + 3rem);
  margin: 0;
  z-index: 25;
  pointer-events: auto;
  flex-wrap: nowrap;
}

.is-melvin-edit .melvin-profile-edit-row {
  display: flex;
}

.melvin-profile-edit-btn {
  padding: 0.3rem 0.65rem;
  font-size: 0.68rem;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.15s ease, background 0.15s ease;
  transform-origin: center;
}

.melvin-profile-edit-btn:hover {
  transform: scale(var(--action-hover-scale-text, 1.08));
}

.melvin-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

.melvin-eyebrow::before {
  content: '// ';
  color: var(--muted);
}

.melvin-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0;
  color: #fff;
}

.melvin-domain {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.melvin-bio {
  font-size: 0.9rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
  margin: 0.15rem 0 0;
  max-width: 38ch;
}

.melvin-hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: min(56rem, 96vw);
  margin-top: 0.5rem;
  margin-bottom: 2.75rem;
}

.melvin-hero-actions-center {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.melvin-hero-links-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

.melvin-hero-actions-center #btn-home-add-hero {
  position: absolute;
  left: 100%;
  margin-left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  white-space: nowrap;
}

.melvin-hero-actions #btn-home-add-hero {
  display: none;
  width: auto;
  max-width: none;
  margin: 0;
  flex: 0 0 auto;
}

.melvin-hero-actions .btn,
.melvin-hero-wrap > .btn {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.75rem 1.1rem;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

body.has-bing-bg .melvin-hero-actions .btn,
body.has-custom-bg .melvin-hero-actions .btn,
body.has-bing-bg .melvin-hero-wrap > .btn,
body.has-custom-bg .melvin-hero-wrap > .btn {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-color: rgba(255, 255, 255, 0.08);
}

.melvin-hero-actions .btn:hover,
.melvin-hero-wrap > .btn:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.melvin-hero-actions .btn span,
.melvin-hero-wrap > .btn span {
  transition: color 0.2s ease;
}

.melvin-hero-actions .btn:hover span,
.melvin-hero-wrap > .btn:hover span {
  color: var(--accent);
}

.melvin-hero-wrap > .btn.btn-primary {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.melvin-hero-wrap > .btn.btn-primary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

.melvin-hero-wrap > .btn.btn-outline {
  color: #fff;
}

.melvin-hero-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: top;
  transition: opacity 0.28s ease, transform 0.28s ease, margin 0.28s ease;
}

.melvin-hero-wrap .melvin-hero-admin-controls {
  position: absolute;
  top: 0;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  margin: 0;
  justify-content: center;
  gap: 0.25rem;
  pointer-events: auto;
  z-index: 25;
}

.melvin-hero-wrap .melvin-hero-admin-controls .melvin-btn-icon {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.melvin-hero-wrap.is-removing {
  animation: melvin-hero-pop-out 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  pointer-events: none;
}

@keyframes melvin-hero-pop-out {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.86) translateY(-8px);
  }
}

/* Links section */
.melvin-links-section {
  margin-bottom: 2rem;
  margin-top: 0.5rem;
  width: 100%;
  max-width: min(56rem, 96vw);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.melvin-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  margin: 0 0 0.35rem;
  text-align: center;
}

.melvin-section-label::before {
  content: '— ';
}

.melvin-section-description {
  font-size: 0.82rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1rem;
  width: 75%;
  max-width: 75%;
  text-align: center;
  overflow-wrap: break-word;
  word-break: normal;
  white-space: pre-wrap;
  hyphens: none;
}

.melvin-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  width: 100%;
  max-width: min(56rem, 96vw);
  margin: 0 auto;
}

.melvin-link-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.2rem;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  text-decoration: none;
  color: #fff;
  transition: all 0.2s ease;
  position: relative;
}

.melvin-link-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.05);
}

.melvin-link-card:hover .melvin-link-icon {
  color: var(--accent);
}

.melvin-link-card:hover .melvin-link-name {
  color: var(--accent);
}

.melvin-link-name {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.melvin-link-icon {
  flex-shrink: 0;
  color: var(--accent2);
  transition: color 0.2s;
}

.melvin-link-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.melvin-link-info {
  min-width: 0;
}

.melvin-link-handle {
  font-size: 0.72rem;
  color: var(--muted);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status dots */
.melvin-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  transition: background 0.5s ease;
}

.melvin-status-dot.online {
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: melvin-pulse-green 2s infinite;
}

.melvin-status-dot.offline {
  background: var(--red);
  box-shadow: 0 0 8px rgba(247, 90, 90, 0.5);
}

@keyframes melvin-pulse-green {
  0%, 100% { box-shadow: 0 0 6px var(--green); }
  50% { box-shadow: 0 0 14px var(--green), 0 0 24px rgba(61, 232, 122, 0.3); }
}

/* Admin controls */
.melvin-admin-controls {
  display: none;
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  gap: 0.35rem;
  z-index: 20;
}

.is-melvin-edit .melvin-admin-controls {
  display: flex;
}

body.is-melvin-edit.is-melvin-edit-animating .melvin-admin-controls .melvin-btn-icon,
body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-admin-controls .melvin-btn-icon,
body.is-melvin-edit.is-melvin-edit-animating .melvin-profile-edit-row .melvin-profile-edit-btn,
body.is-melvin-edit.is-melvin-edit-animating .home-pin-card-edit,
body.is-melvin-edit.is-melvin-edit-animating .home-pin-pick-edit {
  animation: edit-control-pop-in 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

body.is-melvin-edit.is-melvin-edit-animating .melvin-admin-controls .del-btn,
body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-admin-controls .del-btn,
body.is-melvin-edit.is-melvin-edit-animating .melvin-profile-edit-row .melvin-profile-edit-btn:nth-child(2) {
  animation-delay: 0.08s;
}

body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(1) .edit-btn { animation-delay: 0.02s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(1) .del-btn { animation-delay: 0.1s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(2) .edit-btn { animation-delay: 0.05s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(2) .del-btn { animation-delay: 0.13s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(3) .edit-btn { animation-delay: 0.08s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(4) .edit-btn { animation-delay: 0.11s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(5) .edit-btn { animation-delay: 0.14s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(6) .edit-btn { animation-delay: 0.17s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(3) .del-btn { animation-delay: 0.16s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(4) .del-btn { animation-delay: 0.19s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(5) .del-btn { animation-delay: 0.22s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(6) .del-btn { animation-delay: 0.25s; }

body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-links-group .melvin-hero-wrap:nth-child(1) .edit-btn { animation-delay: 0.02s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-links-group .melvin-hero-wrap:nth-child(1) .del-btn { animation-delay: 0.1s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-links-group .melvin-hero-wrap:nth-child(2) .edit-btn { animation-delay: 0.05s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-links-group .melvin-hero-wrap:nth-child(2) .del-btn { animation-delay: 0.13s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-links-group .melvin-hero-wrap:nth-child(3) .edit-btn { animation-delay: 0.08s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-links-group .melvin-hero-wrap:nth-child(3) .del-btn { animation-delay: 0.16s; }

body.is-melvin-edit.is-melvin-edit-animating #hero-actions > .melvin-hero-wrap:nth-child(1) .edit-btn { animation-delay: 0.02s; }
body.is-melvin-edit.is-melvin-edit-animating #hero-actions > .melvin-hero-wrap:nth-child(1) .del-btn { animation-delay: 0.1s; }
body.is-melvin-edit.is-melvin-edit-animating #hero-actions > .melvin-hero-wrap:nth-child(2) .edit-btn { animation-delay: 0.05s; }
body.is-melvin-edit.is-melvin-edit-animating #hero-actions > .melvin-hero-wrap:nth-child(2) .del-btn { animation-delay: 0.13s; }
body.is-melvin-edit.is-melvin-edit-animating #hero-actions > .melvin-hero-wrap:nth-child(3) .edit-btn { animation-delay: 0.08s; }
body.is-melvin-edit.is-melvin-edit-animating #hero-actions > .melvin-hero-wrap:nth-child(3) .del-btn { animation-delay: 0.16s; }

body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(1) .home-pin-card-edit { animation-delay: 0.02s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(2) .home-pin-card-edit { animation-delay: 0.05s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(3) .home-pin-card-edit { animation-delay: 0.08s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(4) .home-pin-card-edit { animation-delay: 0.11s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(5) .home-pin-card-edit { animation-delay: 0.14s; }
body.is-melvin-edit.is-melvin-edit-animating .melvin-link-grid .melvin-link-card:nth-child(6) .home-pin-card-edit { animation-delay: 0.17s; }

body.is-melvin-edit.is-melvin-edit-animating #btn-melvin-add-link,
body.is-melvin-edit.is-melvin-edit-animating #btn-melvin-add-hero,
body.is-melvin-edit.is-melvin-edit-animating #btn-home-add-hero {
  animation: edit-control-pop-in 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  body.is-melvin-edit.is-melvin-edit-animating .melvin-admin-controls .melvin-btn-icon,
  body.is-melvin-edit.is-melvin-edit-animating .melvin-hero-admin-controls .melvin-btn-icon,
  body.is-melvin-edit.is-melvin-edit-animating .melvin-profile-edit-row .melvin-profile-edit-btn,
  body.is-melvin-edit.is-melvin-edit-animating .home-pin-card-edit,
  body.is-melvin-edit.is-melvin-edit-animating .home-pin-pick-edit,
  body.is-melvin-edit.is-melvin-edit-animating #btn-melvin-add-link,
  body.is-melvin-edit.is-melvin-edit-animating #btn-melvin-add-hero,
  body.is-melvin-edit.is-melvin-edit-animating #btn-home-add-hero {
    animation: none;
  }
}

.melvin-btn-icon {
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 4px;
  padding: 0.25rem 0.35rem;
  cursor: pointer;
  font-size: 0.75rem;
  line-height: 1;
  transition: transform 0.18s cubic-bezier(0.34, 1.4, 0.64, 1), border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  transform-origin: center;
}

.melvin-btn-icon:hover {
  background: rgba(124, 106, 247, 0.28);
  border-color: rgba(124, 106, 247, 0.55);
  color: #fff;
  box-shadow: 0 0 10px rgba(124, 106, 247, 0.35);
  transform: scale(var(--action-hover-scale-icon, 1.14));
}

.melvin-btn-icon.del-btn:hover {
  background: rgba(247, 90, 90, 0.28);
  border-color: rgba(247, 90, 90, 0.55);
  box-shadow: 0 0 10px rgba(247, 90, 90, 0.35);
}

#btn-melvin-add-link,
#btn-melvin-add-hero,
#btn-home-add-hero {
  display: none;
  margin-top: 0;
  width: auto;
  max-width: none;
  flex: 0 0 auto;
}

.is-melvin-edit #btn-melvin-add-link,
.is-melvin-edit #btn-melvin-add-hero,
.is-melvin-edit #btn-home-add-hero,
.is-melvin-edit .melvin-hero-actions #btn-home-add-hero {
  display: inline-flex;
}

#home-edit-pins-section {
  display: none;
  width: 100%;
  max-width: min(56rem, 96vw);
  margin: 0 auto;
}

.is-melvin-edit #home-edit-pins-section {
  display: block;
}

.is-melvin-edit #home-projects-section {
  display: none;
}

.home-pin-pick {
  cursor: pointer;
  text-align: left;
  border: none;
  font: inherit;
  width: 100%;
}

.home-pin-pick-grid .melvin-link-card {
  padding: 1.1rem 1.2rem;
  cursor: default;
}

.home-pin-pick-grid .custom-check-label {
  width: 100%;
  margin: 0;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.home-pin-pick-grid .custom-check-label input[type="checkbox"] {
  flex-shrink: 0;
}

.home-pin-pick-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.home-pin-pick-edit {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
}

.home-edit-pins-toolbar {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  width: 100%;
}

.home-unclaimed-banner {
  pointer-events: auto;
}

.home-unclaimed-banner a {
  color: var(--accent2);
  text-decoration: underline;
}

.home-unclaimed-banner.active {
  opacity: 1;
  transform: translateX(0);
}

.home-page-notice {
  width: 100%;
  max-width: min(36rem, 92vw);
  margin: 0 0 1.25rem;
  box-sizing: border-box;
  text-align: center;
}

.home-page-notice-title {
  margin: 0;
}

.home-page-notice-sub {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.melvin-profile-section:has(.home-page-notice:not([hidden])) {
  gap: 1.25rem;
}

#home-not-found {
  width: 100%;
  max-width: min(36rem, 92vw);
  margin: 0 auto 1.25rem;
  box-sizing: border-box;
  text-align: center;
}

/* Footer */
.melvin-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  width: 100%;
  max-width: min(36rem, 92vw);
}

.melvin-footer-text {
  font-size: 0.72rem;
  color: var(--muted);
}

.melvin-footer-text span {
  color: var(--accent);
}

/* Melvin edit modals */
.melvin-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 12px;
  z-index: 1001;
  width: calc(100% - 2rem);
  max-width: 400px;
  max-height: 80dvh;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: auto;
  box-sizing: border-box;
  flex-direction: column;
  gap: 0.85rem;
}

.melvin-modal.active {
  display: flex !important;
  z-index: 10051;
}

#admin-profile-panel,
#admin-login-panel {
  z-index: 10051;
}

#admin-profile-panel.active,
#admin-login-panel.active {
  z-index: 10051;
}

.melvin-modal h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.melvin-modal input,
.melvin-modal textarea,
.melvin-modal select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.85rem;
}

.melvin-modal label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-size: 0.8rem;
  cursor: pointer;
}

.melvin-modal label input[type="checkbox"] {
  width: auto;
}

.melvin-modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.25rem;
}

.melvin-error-msg {
  color: var(--red);
  font-size: 0.8rem;
  display: none;
}

.melvin-page .btn-outline {
  color: #fff;
}

/* Home modals — scrollable body, fixed footer */
#home-pin-modal,
#home-profile-lists-panel {
  overflow: hidden;
  padding: 0;
  gap: 0;
}

#home-pin-modal .home-modal-scroll,
#home-profile-lists-panel .home-modal-scroll {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

#home-pin-modal .home-modal-scroll {
  padding: 1.25rem 1.25rem 0.75rem;
  gap: 0.6rem;
}

#home-profile-lists-panel .home-modal-scroll {
  padding: 2.5rem 2.5rem 1rem;
  gap: 1.2rem;
}

#home-pin-modal .home-modal-footer {
  flex-shrink: 0;
  margin-top: 0;
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

#home-profile-lists-panel .home-profile-lists-footer {
  flex-shrink: 0;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 1rem 2.5rem 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface);
}

#home-pin-modal .admin-categories-scroll {
  max-height: none;
  overflow: visible;
}

/* Mobile */
@media (max-width: 768px) {
  .melvin-page {
    padding-top: calc(12vh + 3rem);
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .melvin-nav-icons {
    display: none;
  }

  .nav-inner--convert .nav-spacer-right {
    gap: 0.4rem;
  }

  .melvin-edit-btn,
  .nav-inner--convert #admin-toggle-btn {
    padding: 0.35rem 0.6rem;
    font-size: 0.7rem;
  }

  .melvin-hero-actions {
    justify-content: center;
  }

  .melvin-hero-actions-center {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.75rem;
  }

  .melvin-hero-actions-center #btn-home-add-hero {
    position: static;
    transform: none;
    margin-left: 0;
  }

  .melvin-hero-links-group {
    justify-content: center;
  }

  .melvin-hero-actions .btn {
    justify-content: center;
  }

  .melvin-link-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .melvin-profile-edit-row {
    max-width: calc(100vw - 2rem);
    flex-wrap: wrap;
  }

  .melvin-profile-edit-btn {
    padding: 0.28rem 0.55rem;
    font-size: 0.65rem;
  }

  .melvin-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .convert-back-link span.back-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .melvin-name {
    font-size: clamp(1.75rem, 10vw, 2.5rem);
  }
}
