:root {
  color-scheme: dark;
  --text: #f3efff;
  --muted: #c5bfd6;
  --line: rgba(210, 205, 235, 0.28);
  --line-strong: rgba(210, 205, 235, 0.42);
  --panel: rgba(33, 31, 49, 0.58);
  --panel-soft: rgba(255, 255, 255, 0.1);
  --panel-hover: rgba(86, 82, 111, 0.44);
  --accent: #8fa7ff;
  --accent-2: #72d7ff;
  --accent-warm: #f0ad8f;
  --shadow: rgba(10, 8, 34, 0.5);
  font-family:
    "Noto Serif SC", "Songti SC", "Microsoft YaHei", "PingFang SC", system-ui,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(90deg, rgba(7, 10, 35, 0.48) 0%, rgba(20, 15, 48, 0.22) 42%, rgba(8, 5, 24, 0.04) 100%),
    url("./background.png") center / cover fixed no-repeat;
  animation: background-drift 28s ease-in-out infinite alternate;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

select {
  font: inherit;
}

.page-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: clamp(14px, 3vw, 56px);
}

.nav-panel {
  position: relative;
  width: clamp(560px, 46vw, 740px);
  max-width: calc(100vw - clamp(28px, 6vw, 112px));
  max-height: calc(100svh - clamp(28px, 6vw, 112px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    radial-gradient(circle at 80% 46%, rgba(255, 190, 155, 0.2), transparent 34%),
    linear-gradient(135deg, rgba(39, 34, 70, 0.76), rgba(95, 58, 98, 0.48));
  box-shadow: 0 24px 80px var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
  animation: panel-enter 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.nav-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.14) 26%, transparent 42%);
  transform: translateX(-120%);
  opacity: 0;
}

.profile {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 26px);
  padding: clamp(22px, 4vh, 42px) clamp(24px, 3vw, 48px) clamp(16px, 2.6vh, 28px);
}

.avatar {
  width: clamp(68px, 9vh, 92px);
  aspect-ratio: 1;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 235, 220, 0.5);
  border-radius: 50%;
  background: url("./mine.png") center / cover no-repeat;
  box-shadow: 0 12px 28px rgba(10, 8, 34, 0.35);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.avatar:hover {
  transform: rotate(-3deg) scale(1.04);
  box-shadow: 0 14px 34px rgba(255, 194, 135, 0.22), 0 12px 28px rgba(10, 8, 34, 0.35);
}

.profile h1 {
  margin: 0;
  font-size: clamp(32px, min(4vw, 6vh), 54px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  text-shadow: 0 2px 22px rgba(255, 205, 170, 0.35);
}

.profile p {
  margin: clamp(6px, 1.4vh, 12px) 0 0;
  color: var(--muted);
  font-size: 17px;
}

.search-box {
  position: relative;
  display: grid;
  grid-template-columns: 28px 1fr 54px;
  align-items: center;
  gap: 16px;
  min-height: clamp(54px, 7vh, 66px);
  margin: 0 clamp(22px, 3vw, 38px) clamp(16px, 3vh, 30px);
  padding: 7px 14px 7px clamp(20px, 2.2vw, 28px);
  border: 1px solid rgba(255, 232, 218, 0.34);
  border-radius: 999px;
  background: rgba(32, 28, 58, 0.54);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.08), 0 10px 28px rgba(9, 7, 32, 0.18);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.search-box:focus-within {
  border-color: rgba(255, 213, 170, 0.74);
  box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.1), 0 0 0 4px rgba(255, 196, 139, 0.1), 0 12px 32px rgba(9, 7, 32, 0.22);
  transform: translateY(-1px);
}

.search-box.is-invalid {
  animation: shake 260ms ease;
}

.modal-card.is-invalid {
  animation: shake 260ms ease;
}

.search-box svg,
.category-icon svg,
.section-title svg,
.footer-button svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.search-box > svg {
  color: rgba(255, 255, 255, 0.86);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 17px;
}

.search-box input::placeholder {
  color: rgba(255, 239, 226, 0.48);
}

.search-box button {
  position: relative;
  overflow: hidden;
  width: 54px;
  height: clamp(40px, 5.4vh, 46px);
  border: 0;
  border-radius: 17px;
  color: #fffaf5;
  cursor: pointer;
  background: linear-gradient(135deg, #ffb978, #df8fc2);
  box-shadow: 0 0 22px rgba(255, 194, 135, 0.58);
  transition: transform 160ms ease, filter 160ms ease;
}

.search-box button:hover {
  filter: brightness(1.08);
  transform: translateX(1px);
}

.search-box button:active {
  transform: scale(0.96);
}

.search-box button svg {
  width: 28px;
  margin: auto;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.7vh, 18px);
  padding: 0 clamp(22px, 3vw, 38px);
}

.category-card,
.quick-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 232, 218, 0.32);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.07));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.05), 0 10px 26px rgba(10, 8, 34, 0.16);
  transition:
    transform 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.category-card::before,
.quick-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 18%, rgba(255, 255, 255, 0.16) 44%, transparent 70%);
  opacity: 0;
  transform: translateX(-80%);
  transition: opacity 220ms ease, transform 420ms ease;
}

.category-card:hover,
.quick-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 232, 218, 0.58);
  background: var(--panel-hover);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, 0.08), 0 14px 32px rgba(10, 8, 34, 0.24);
}

.category-card:hover::before,
.quick-card:hover::before {
  opacity: 1;
  transform: translateX(80%);
}

.category-card:active,
.quick-card:active {
  transform: translateY(0) scale(0.985);
}

.category-card {
  min-height: clamp(76px, 10vh, 94px);
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  align-items: center;
  gap: clamp(12px, 1.5vw, 18px);
  padding: clamp(13px, 2vh, 19px) clamp(14px, 1.8vw, 20px);
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.category-card.active {
  border-color: rgba(255, 224, 178, 0.78);
  background: linear-gradient(135deg, rgba(255, 202, 150, 0.2), rgba(239, 156, 207, 0.13));
  box-shadow: inset 0 0 24px rgba(255, 214, 177, 0.08), 0 12px 30px rgba(10, 8, 34, 0.2);
}

.category-card strong,
.quick-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}

.category-card small,
.quick-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.category-icon {
  width: 38px;
  height: 38px;
}

.category-icon.warm {
  color: #ffe1a4;
}

.category-icon.amber {
  color: #ffd19a;
}

.category-icon.plain {
  color: #fff5ed;
}

.category-icon.sky {
  color: #aee7ff;
}

.category-icon.paper {
  color: #ffe4c8;
}

.category-icon.pink {
  color: #f0a4ff;
}

.arrow {
  color: rgba(255, 239, 226, 0.62);
  font-size: 28px;
  line-height: 1;
  transition: transform 180ms ease, color 180ms ease;
}

.category-card:hover .arrow {
  color: rgba(255, 239, 226, 0.95);
  transform: translateX(4px);
}

.quick-section {
  margin: clamp(14px, 2.4vh, 24px) clamp(20px, 2.7vw, 34px) clamp(14px, 2.2vh, 22px);
  padding: clamp(14px, 2.3vh, 22px);
  border: 1px solid rgba(255, 232, 218, 0.32);
  border-radius: 18px;
  background: rgba(33, 29, 59, 0.36);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: clamp(10px, 1.9vh, 18px);
}

.section-title svg {
  width: 22px;
  height: 22px;
}

.section-title h2 {
  margin: 0;
  font-size: 18px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(8px, 1.4vh, 14px);
}

.quick-grid.is-switching {
  animation: content-switch 220ms ease both;
}

.quick-card {
  position: relative;
  min-height: clamp(78px, 10.5vh, 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
}

.link-card {
  padding: 0;
}

.link-open {
  width: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 8px;
}

button.quick-card {
  width: 100%;
  border-color: rgba(255, 232, 218, 0.32);
}

.delete-link {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 232, 218, 0.28);
  border-radius: 50%;
  color: rgba(255, 248, 238, 0.78);
  background: rgba(28, 24, 48, 0.58);
  cursor: pointer;
  opacity: 0;
  transition: opacity 160ms ease, background 160ms ease;
}

.link-card:hover .delete-link,
.delete-link:focus-visible {
  opacity: 1;
}

.delete-link:hover {
  background: rgba(218, 83, 112, 0.72);
}

.brand {
  width: clamp(30px, 4.4vh, 36px);
  height: clamp(30px, 4.4vh, 36px);
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: #fff;
  font-weight: 800;
  line-height: 1;
  transition: transform 220ms ease;
}

.quick-card:hover .brand {
  transform: translateY(-2px) scale(1.06);
}

.brand.github {
  border-radius: 50%;
  background: #242938;
  font-size: 13px;
}

.brand.notion {
  border: 2px solid #fff;
  background: rgba(255, 255, 255, 0.12);
  font-family: Georgia, serif;
  font-size: 24px;
}

.brand.vercel {
  width: 0;
  height: 0;
  border-right: 18px solid transparent;
  border-bottom: 31px solid #fff;
  border-left: 18px solid transparent;
  background: transparent;
}

.brand.google {
  border-radius: 50%;
  background: conic-gradient(#4285f4, #34a853, #fbbc05, #ea4335, #4285f4);
  font-size: 22px;
}

.brand.bilibili {
  color: #ff8fc4;
  font-size: 20px;
}

.brand.custom {
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 196, 139, 0.9), rgba(229, 144, 205, 0.9));
  font-size: 13px;
}

.brand.add {
  color: rgba(255, 239, 226, 0.9);
  font-size: 34px;
  font-weight: 300;
}

.panel-footer {
  min-height: clamp(50px, 7vh, 62px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(10px, 1.8vh, 14px) clamp(20px, 2.7vw, 34px);
  border-top: 1px solid rgba(255, 232, 218, 0.24);
  background: rgba(30, 26, 54, 0.25);
}

.footer-actions,
.time-row {
  display: flex;
  align-items: center;
  gap: 22px;
}

.footer-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 0;
  color: var(--text);
  cursor: pointer;
  background: transparent;
  font-size: 16px;
  transition: color 160ms ease, transform 160ms ease;
}

.footer-button:hover {
  color: #ffd7af;
  transform: translateY(-1px);
}

.footer-button:active {
  transform: translateY(0) scale(0.98);
}

.footer-button svg {
  width: 22px;
  height: 22px;
}

.divider {
  width: 1px;
  height: 20px;
  background: rgba(255, 232, 218, 0.3);
}

.time-row {
  color: rgba(255, 239, 226, 0.86);
  font-size: 16px;
}

body.soft-theme {
  --panel: rgba(72, 51, 83, 0.52);
  --muted: rgba(255, 246, 238, 0.76);
}

.modal {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid rgba(255, 232, 218, 0.42);
  border-radius: 18px;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(255, 188, 143, 0.18), transparent 40%),
    rgba(39, 34, 70, 0.88);
  box-shadow: 0 24px 80px rgba(7, 5, 24, 0.58);
  backdrop-filter: blur(22px);
}

.modal[open] {
  animation: modal-enter 180ms ease both;
}

.modal::backdrop {
  background: rgba(6, 5, 18, 0.42);
  backdrop-filter: blur(3px);
}

.modal-card {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal label {
  display: grid;
  gap: 8px;
  color: rgba(255, 248, 238, 0.84);
  font-size: 14px;
}

.modal input,
.modal select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(255, 232, 218, 0.3);
  border-radius: 10px;
  outline: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
    rgba(20, 18, 38, 0.46);
  padding: 0 12px;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.modal select {
  cursor: pointer;
  padding-right: 42px;
  background:
    linear-gradient(45deg, transparent 50%, rgba(255, 232, 218, 0.86) 50%) right 20px center / 7px 7px no-repeat,
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
    rgba(20, 18, 38, 0.46);
}

.modal select option {
  color: #221b32;
  background: #f8ecdf;
}

.custom-select {
  position: relative;
}

.custom-select-trigger {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(255, 232, 218, 0.3);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
    rgba(20, 18, 38, 0.46);
  padding: 0 13px;
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.04);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger {
  border-color: rgba(255, 210, 164, 0.78);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.06),
    0 0 0 4px rgba(255, 196, 139, 0.1);
}

.custom-select-arrow {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-right: 2px solid rgba(255, 232, 218, 0.86);
  border-bottom: 2px solid rgba(255, 232, 218, 0.86);
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.custom-select.is-open .custom-select-arrow {
  transform: rotate(225deg) translate(-2px, -1px);
}

.custom-select-menu {
  position: absolute;
  z-index: 5;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid rgba(255, 232, 218, 0.34);
  border-radius: 12px;
  background:
    radial-gradient(circle at top right, rgba(255, 196, 139, 0.12), transparent 40%),
    rgba(29, 25, 51, 0.96);
  box-shadow: 0 18px 48px rgba(6, 5, 20, 0.42);
  backdrop-filter: blur(18px);
  padding: 6px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top;
  transition: opacity 160ms ease, transform 160ms ease;
}

.custom-select.is-open .custom-select-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.custom-select-option {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 248, 238, 0.88);
  cursor: pointer;
  background: transparent;
  padding: 0 12px;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.custom-select-option:hover,
.custom-select-option.is-selected {
  color: #fffaf5;
  background: rgba(255, 205, 156, 0.16);
}

.custom-select-option:active {
  transform: scale(0.99);
}

.modal input:focus,
.modal select:focus {
  border-color: rgba(255, 210, 164, 0.78);
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, 0.06),
    0 0 0 4px rgba(255, 196, 139, 0.1);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.icon-button,
.primary-button,
.secondary-button,
.danger-button {
  border: 1px solid rgba(255, 232, 218, 0.28);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.08);
}

.icon-button {
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
}

.primary-button,
.secondary-button,
.danger-button {
  position: relative;
  overflow: hidden;
  min-height: 40px;
  padding: 0 15px;
  transition: transform 160ms ease, filter 160ms ease, border-color 160ms ease;
}

.primary-button:hover,
.secondary-button:hover,
.danger-button:hover,
.icon-button:hover {
  filter: brightness(1.08);
  border-color: rgba(255, 232, 218, 0.52);
}

.primary-button:active,
.secondary-button:active,
.danger-button:active,
.icon-button:active {
  transform: scale(0.97);
}

.primary-button {
  border-color: rgba(255, 196, 139, 0.6);
  background: linear-gradient(135deg, #ffb978, #df8fc2);
}

.danger-button {
  margin-right: auto;
  color: #ffe8e8;
  background: rgba(184, 58, 87, 0.42);
}

.ripple {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  pointer-events: none;
  background: rgba(255, 244, 235, 0.36);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple 520ms ease-out forwards;
}

.toast {
  position: fixed;
  right: clamp(16px, 3vw, 34px);
  bottom: clamp(16px, 3vw, 34px);
  z-index: 10;
  max-width: min(320px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 232, 218, 0.36);
  border-radius: 14px;
  color: var(--text);
  background: rgba(35, 30, 58, 0.78);
  box-shadow: 0 14px 42px rgba(5, 4, 18, 0.34);
  backdrop-filter: blur(18px);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes background-drift {
  from {
    background-position: center center;
  }
  to {
    background-position: 53% 49%;
  }
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-sheen {
  0%,
  56% {
    transform: translateX(-120%);
  }
  72%,
  100% {
    transform: translateX(120%);
  }
}

@keyframes content-switch {
  from {
    opacity: 0.58;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-6px);
  }
  70% {
    transform: translateX(6px);
  }
}

@keyframes ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(12);
  }
}

@keyframes title-gradient {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes title-letter-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes title-letter-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 1180px) {
  .nav-panel {
    width: min(720px, 100%);
    min-width: 0;
  }
}

@media (max-height: 760px) and (min-width: 761px) {
  .page-shell {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .nav-panel {
    max-height: calc(100svh - 36px);
  }

  .profile {
    padding-top: 22px;
    padding-bottom: 14px;
  }

  .avatar {
    width: 64px;
  }

  .profile h1 {
    font-size: 36px;
  }

  .profile p {
    margin-top: 6px;
    font-size: 14px;
  }

  .search-box {
    min-height: 52px;
    margin-bottom: 14px;
  }

  .search-box button {
    height: 38px;
  }

  .category-card {
    min-height: 70px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .category-card strong,
  .quick-card strong {
    font-size: 15px;
  }

  .category-card small,
  .quick-card small {
    margin-top: 4px;
    font-size: 12px;
  }

  .category-icon {
    width: 30px;
    height: 30px;
  }

  .quick-section {
    margin-top: 14px;
    margin-bottom: 12px;
    padding: 14px;
  }

  .section-title {
    margin-bottom: 10px;
  }

  .quick-card {
    min-height: 72px;
  }

  .brand {
    margin-bottom: 7px;
  }

  .panel-footer {
    min-height: 48px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
}

@media (max-width: 760px) {
  body {
    background-position: 67% center;
  }

  .page-shell {
    align-items: flex-start;
    padding: 16px;
  }

  .nav-panel {
    max-width: calc(100vw - 32px);
    max-height: none;
  }

  .nav-panel {
    border-radius: 22px;
  }

  .profile {
    gap: 16px;
    padding: 28px 24px 22px;
  }

  .avatar {
    width: 72px;
  }

  .profile h1 {
    font-size: 34px;
  }

  .profile p {
    font-size: 14px;
  }

  .search-box {
    grid-template-columns: 24px 1fr 48px;
    min-height: 58px;
    margin: 0 20px 22px;
    padding-left: 20px;
  }

  .search-box button {
    width: 48px;
    height: 42px;
  }

  .category-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 20px;
  }

  .category-card {
    min-height: 84px;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    padding: 15px;
  }

  .category-icon {
    width: 32px;
    height: 32px;
  }

  .arrow {
    display: none;
  }

  .quick-section {
    margin: 18px 20px;
    padding: 16px;
  }

  .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .quick-card {
    min-height: 94px;
  }

  .panel-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px 18px;
  }

  .footer-actions,
  .time-row {
    justify-content: space-between;
  }
}

/* Final title tone-down overrides. */
.center-title h2 {
  color: rgba(255, 248, 238, 0.94);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  filter: drop-shadow(0 10px 24px rgba(4, 3, 18, 0.34));
  animation: none;
}

.center-title h2 span {
  color: inherit;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  animation:
    title-letter-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both,
    title-letter-float 4.4s ease-in-out infinite;
  animation-delay:
    calc(var(--i) * 52ms + 220ms),
    calc(var(--i) * 180ms + 900ms);
}

.center-title h2:hover span {
  transform: translateY(-3px);
  filter: drop-shadow(0 8px 12px rgba(255, 239, 226, 0.14));
}

.center-title h2:hover span:nth-child(even) {
  transform: translateY(2px);
}
/* Final neutral UI overrides. Keep this block last. */
body::before {
  filter: saturate(0.78) brightness(0.82);
}

body::after {
  background:
    linear-gradient(90deg, rgba(3, 5, 12, 0.58), rgba(6, 8, 16, 0.18) 42%, rgba(6, 8, 16, 0.04) 72%),
    radial-gradient(circle at 70% 44%, rgba(7, 9, 18, 0.02), rgba(7, 9, 18, 0.34) 86%);
}

.nav-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 28, 0.42);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.nav-panel:hover,
.nav-panel:focus-within,
body.sidebar-open .nav-panel {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(20, 22, 28, 0.5);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-panel .avatar {
  width: 34px;
  border-color: rgba(255, 255, 255, 0.16);
  filter: saturate(0.55) brightness(0.86);
  opacity: 0.72;
  box-shadow: none;
}

.nav-panel:hover .avatar,
.nav-panel:focus-within .avatar,
body.sidebar-open .nav-panel .avatar {
  width: 46px;
  opacity: 0.84;
  transform: none;
}

.center-stage {
  width: min(860px, calc(100vw - 148px));
  gap: 26px;
}

.center-stage .search-box {
  min-height: clamp(72px, 9vh, 88px);
  grid-template-columns: 34px 1fr 64px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34), inset 0 0 24px rgba(255, 255, 255, 0.035);
  padding: 10px 16px 10px 32px;
}

.center-stage .search-box input {
  font-size: clamp(19px, 2.1vw, 23px);
}

.center-stage .search-box button {
  width: 64px;
  height: clamp(50px, 6.3vh, 58px);
  border-radius: 18px;
}

.search-box:focus-within,
.center-stage .search-box:hover {
  border-color: rgba(159, 179, 217, 0.45);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 30px 88px rgba(0, 0, 0, 0.4),
    0 0 0 4px rgba(159, 179, 217, 0.08),
    inset 0 0 24px rgba(255, 255, 255, 0.045);
}

.search-box button,
.primary-button {
  color: #f5f7fa;
  background: rgba(159, 179, 217, 0.34);
  box-shadow: none;
}

.category-card {
  min-height: 64px;
  grid-template-columns: 30px 1fr 18px;
  gap: 12px;
  padding: 13px 14px;
}

.category-card small {
  display: none;
}

.category-card strong,
.quick-card strong {
  font-size: 15px;
  font-weight: 600;
}

.category-icon,
.category-icon.warm,
.category-icon.amber,
.category-icon.plain,
.category-icon.sky,
.category-icon.paper,
.category-icon.pink {
  width: 24px;
  height: 24px;
  color: rgba(245, 247, 250, 0.8);
}

.category-card,
.quick-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.category-card:hover,
.quick-card:hover,
.category-card.active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.nav-panel .category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nav-panel .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-section {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.quick-card {
  min-height: 82px;
  padding: 12px 8px;
}

.brand,
.brand.github,
.brand.notion,
.brand.google,
.brand.bilibili,
.brand.custom,
.brand.vercel {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(245, 247, 250, 0.82);
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 12px;
}

.brand.add {
  color: rgba(245, 247, 250, 0.72);
  background: transparent;
  border-style: dashed;
  font-size: 24px;
}

.quick-card small {
  margin-top: 4px;
  color: #8e97a3;
  font-size: 12px;
}

.panel-footer {
  min-height: 46px;
  border-top-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  opacity: 0.72;
}

.footer-button {
  color: rgba(245, 247, 250, 0.68);
  font-size: 14px;
}

.footer-button svg {
  width: 18px;
  height: 18px;
}

.time-row {
  color: rgba(184, 192, 204, 0.72);
  font-size: 13px;
}

.modal,
.custom-select-menu,
.toast {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 28, 0.88);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.44);
}

.modal input,
.modal select,
.custom-select-trigger {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

/* Final sidebar sizing guard. Keep this at the physical end of the file. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.nav-panel {
  display: flex;
  flex-direction: column;
  width: 76px;
  max-width: calc(100vw - 20px);
  overflow: hidden;
}

.nav-panel:hover,
.nav-panel:focus-within,
body.sidebar-open .nav-panel {
  width: min(720px, calc(100vw - 32px));
}

.nav-panel .profile,
.nav-panel .category-grid,
.nav-panel .quick-section,
.nav-panel .panel-footer {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.nav-panel .profile {
  flex: 0 0 auto;
  min-width: 0;
  padding-inline: 24px;
}

.profile-copy,
.category-card > span,
.link-open {
  min-width: 0;
}

.profile-copy h1,
.profile-copy p,
.category-card strong,
.quick-card strong,
.quick-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-panel .category-grid {
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 0 24px 16px;
  overflow: hidden;
}

.category-card,
.quick-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.quick-section {
  flex: 1 1 auto;
  min-height: 0;
  width: auto;
  max-width: none;
  margin: 0 20px 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.quick-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.nav-panel .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.delete-link {
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 14px;
}

.panel-footer {
  flex: 0 0 56px;
  min-height: 56px;
  margin-top: 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  flex: 0 1 auto;
}

.footer-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
  min-width: 0;
}

.footer-button svg {
  flex: 0 0 auto;
}

.time-row {
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
}

@media (max-height: 760px) and (min-width: 761px) {
  .nav-panel .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-card {
    min-height: 70px;
  }
}

@media (max-width: 760px) {
  .nav-panel {
    max-width: calc(100vw - 16px);
  }

  .nav-panel:hover,
  .nav-panel:focus-within,
  body.sidebar-open .nav-panel {
    width: calc(100vw - 16px);
  }

  .nav-panel .category-grid,
  .nav-panel .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-footer {
    padding-inline: 18px;
  }
}

/* Final sidebar sizing guard. Keep after all visual theme overrides. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.nav-panel {
  display: flex;
  flex-direction: column;
  width: 76px;
  max-width: calc(100vw - 20px);
  overflow: hidden;
}

.nav-panel:hover,
.nav-panel:focus-within,
body.sidebar-open .nav-panel {
  width: min(720px, calc(100vw - 32px));
}

.nav-panel .profile,
.nav-panel .category-grid,
.nav-panel .quick-section,
.nav-panel .panel-footer {
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.nav-panel .profile {
  flex: 0 0 auto;
  min-width: 0;
  padding-inline: 24px;
}

.profile-copy {
  min-width: 0;
}

.profile-copy h1,
.profile-copy p,
.category-card strong,
.quick-card strong,
.quick-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-panel .category-grid {
  flex: 0 0 auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 0 24px 16px;
  overflow: hidden;
}

.category-card {
  width: 100%;
  min-width: 0;
}

.category-card > span {
  min-width: 0;
}

.quick-section {
  flex: 1 1 auto;
  min-height: 0;
  width: auto;
  max-width: none;
  margin: 0 20px 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.quick-grid {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.nav-panel .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.quick-card {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.link-open {
  min-width: 0;
  max-width: 100%;
}

.delete-link {
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  font-size: 14px;
}

.panel-footer {
  flex: 0 0 56px;
  min-height: 56px;
  margin-top: 0;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  min-width: 0;
  flex: 0 1 auto;
}

.footer-button {
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1;
  white-space: nowrap;
  min-width: 0;
}

.footer-button svg {
  flex: 0 0 auto;
}

.time-row {
  min-width: 0;
  flex: 0 1 auto;
  white-space: nowrap;
}

@media (max-height: 760px) and (min-width: 761px) {
  .nav-panel .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .quick-card {
    min-height: 70px;
  }
}

@media (max-width: 760px) {
  .nav-panel {
    max-width: calc(100vw - 16px);
  }

  .nav-panel:hover,
  .nav-panel:focus-within,
  body.sidebar-open .nav-panel {
    width: calc(100vw - 16px);
  }

  .nav-panel .category-grid,
  .nav-panel .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .panel-footer {
    padding-inline: 18px;
  }
}

/* Day mode: light glass over the same atmospheric background. */
body.light-theme {
  --text: #1f2430;
  --muted: #5a6273;
  --line: rgba(255, 255, 255, 0.32);
  --line-strong: rgba(255, 255, 255, 0.42);
  --panel: rgba(255, 255, 255, 0.18);
  --panel-hover: rgba(255, 255, 255, 0.36);
  --accent: #8fa4cc;
  --accent-2: #69748c;
  --accent-warm: #d3a18a;
  color: #1f2430;
}

body.light-theme::before {
  filter: saturate(0.88) brightness(1.04);
}

body.light-theme::after {
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(248, 250, 255, 0.62) 0%, rgba(248, 250, 255, 0.38) 31%, rgba(248, 250, 255, 0.12) 58%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 76% 45%, rgba(255, 255, 255, 0), rgba(230, 236, 248, 0.18) 78%);
}

body.light-theme.sidebar-open::before,
body.light-theme:has(.nav-panel:hover)::before,
body.light-theme:has(.nav-panel:focus-within)::before {
  filter: blur(6px) saturate(0.82) brightness(1.02);
}

body.light-theme .nav-panel {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 14px 40px rgba(20, 28, 50, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

body.light-theme .nav-panel:hover,
body.light-theme .nav-panel:focus-within,
body.light-theme.sidebar-open .nav-panel {
  border-color: rgba(255, 255, 255, 0.52);
  background: rgba(255, 255, 255, 0.24);
  box-shadow: 0 18px 52px rgba(20, 28, 50, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

body.light-theme .nav-panel .avatar {
  border-color: rgba(255, 255, 255, 0.72);
  filter: saturate(0.52) brightness(1.04);
  opacity: 0.66;
  box-shadow: 0 8px 22px rgba(20, 28, 50, 0.08);
}

body.light-theme .nav-panel:hover .avatar,
body.light-theme .nav-panel:focus-within .avatar,
body.light-theme.sidebar-open .nav-panel .avatar {
  opacity: 0.78;
}

body.light-theme .profile h1,
body.light-theme .center-title h2 {
  color: #1f2430;
  text-shadow: 0 8px 22px rgba(255, 255, 255, 0.34);
}

body.light-theme .profile p,
body.light-theme .center-title p,
body.light-theme .category-card small,
body.light-theme .quick-card small,
body.light-theme .time-row {
  color: #5a6273;
}

body.light-theme .center-stage .search-box,
body.light-theme .search-box {
  border-color: rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.22);
  box-shadow: 0 18px 54px rgba(20, 28, 50, 0.12), inset 0 0 22px rgba(255, 255, 255, 0.22);
}

body.light-theme .search-box:focus-within,
body.light-theme .center-stage .search-box:hover {
  border-color: rgba(143, 164, 204, 0.56);
  background: rgba(255, 255, 255, 0.3);
  box-shadow:
    0 22px 64px rgba(20, 28, 50, 0.15),
    0 0 0 4px rgba(143, 164, 204, 0.12),
    inset 0 0 22px rgba(255, 255, 255, 0.26);
}

body.light-theme .search-box input {
  color: #1f2430;
}

body.light-theme .search-box input::placeholder {
  color: rgba(92, 100, 117, 0.68);
}

body.light-theme .search-box > svg,
body.light-theme .center-stage .search-box:hover > svg {
  color: rgba(105, 116, 140, 0.92);
}

body.light-theme .search-box button,
body.light-theme .primary-button {
  color: #1f2430;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
}

body.light-theme .search-box button:hover,
body.light-theme .primary-button:hover {
  background: rgba(211, 161, 138, 0.34);
}

body.light-theme .category-card,
body.light-theme .quick-card {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.24);
  box-shadow: none;
}

body.light-theme .category-card:hover,
body.light-theme .quick-card:hover,
body.light-theme .category-card.active {
  border-color: rgba(255, 255, 255, 0.46);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: none;
}

body.light-theme .category-icon,
body.light-theme .category-icon.warm,
body.light-theme .category-icon.amber,
body.light-theme .category-icon.plain,
body.light-theme .category-icon.sky,
body.light-theme .category-icon.paper,
body.light-theme .category-icon.pink,
body.light-theme .section-title svg {
  color: #69748c;
}

body.light-theme .arrow,
body.light-theme .category-card:hover .arrow {
  color: rgba(105, 116, 140, 0.72);
}

body.light-theme .quick-section {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.14);
}

body.light-theme .brand,
body.light-theme .brand.github,
body.light-theme .brand.notion,
body.light-theme .brand.google,
body.light-theme .brand.bilibili,
body.light-theme .brand.custom,
body.light-theme .brand.vercel {
  border-color: rgba(255, 255, 255, 0.34);
  color: #5a6273;
  background: rgba(255, 255, 255, 0.26);
}

body.light-theme .brand.add {
  color: rgba(92, 100, 117, 0.72);
  background: transparent;
}

body.light-theme .quick-card small {
  color: #7a8395;
}

body.light-theme .delete-link {
  border-color: rgba(255, 255, 255, 0.38);
  color: rgba(31, 36, 48, 0.62);
  background: rgba(255, 255, 255, 0.38);
}

body.light-theme .panel-footer {
  border-top-color: rgba(255, 255, 255, 0.22);
  opacity: 0.68;
}

body.light-theme .footer-button {
  color: rgba(31, 36, 48, 0.62);
}

body.light-theme .footer-button:hover {
  color: #1f2430;
}

body.light-theme .divider {
  background: rgba(31, 36, 48, 0.14);
}

body.light-theme .modal,
body.light-theme .custom-select-menu,
body.light-theme .toast {
  border-color: rgba(255, 255, 255, 0.42);
  color: #1f2430;
  background: rgba(255, 255, 255, 0.34);
  box-shadow: 0 18px 54px rgba(20, 28, 50, 0.16);
}

body.light-theme .modal label {
  color: #5a6273;
}

body.light-theme .modal input,
body.light-theme .modal select,
body.light-theme .custom-select-trigger {
  border-color: rgba(255, 255, 255, 0.34);
  color: #1f2430;
  background: rgba(255, 255, 255, 0.26);
}

body.light-theme .modal input::placeholder {
  color: rgba(92, 100, 117, 0.56);
}

body.light-theme .modal input:focus,
body.light-theme .modal select:focus,
body.light-theme .custom-select-trigger:hover,
body.light-theme .custom-select.is-open .custom-select-trigger {
  border-color: rgba(143, 164, 204, 0.58);
  box-shadow: 0 0 0 4px rgba(143, 164, 204, 0.12);
}

body.light-theme .custom-select-arrow {
  border-color: rgba(105, 116, 140, 0.82);
}

body.light-theme .custom-select-option {
  color: #5a6273;
}

body.light-theme .custom-select-option:hover,
body.light-theme .custom-select-option.is-selected {
  color: #1f2430;
  background: rgba(255, 255, 255, 0.36);
}

body.light-theme .secondary-button,
body.light-theme .icon-button {
  color: #1f2430;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.24);
}

body.light-theme .danger-button {
  color: #703d35;
  background: rgba(211, 161, 138, 0.28);
}

body.light-theme .loader {
  color: #1f2430;
  background: rgba(248, 250, 255, 0.24);
}

body.light-theme .loader-ring {
  border-color: rgba(105, 116, 140, 0.2);
  border-top-color: rgba(143, 164, 204, 0.9);
}

/* Day mode clarity pass: milky acrylic instead of tinted night glass. */
body.light-theme {
  --text: #1e2430;
  --muted: #596275;
  --line: rgba(255, 255, 255, 0.62);
  --line-strong: rgba(255, 255, 255, 0.72);
  --panel: rgba(255, 255, 255, 0.52);
  --panel-hover: rgba(255, 255, 255, 0.86);
  --accent: #6d7890;
  color: #1e2430;
}

body.light-theme::before {
  filter: saturate(0.9) brightness(1.08);
}

body.light-theme::after {
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(248, 250, 255, 0.86) 0%, rgba(248, 250, 255, 0.78) 28%, rgba(248, 250, 255, 0.42) 48%, rgba(248, 250, 255, 0.08) 68%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 72% 46%, rgba(255, 255, 255, 0), rgba(236, 241, 250, 0.14) 74%);
}

body.light-theme.sidebar-open::before,
body.light-theme:has(.nav-panel:hover)::before,
body.light-theme:has(.nav-panel:focus-within)::before {
  filter: blur(5px) saturate(0.9) brightness(1.08);
  transform: scale(1.025);
}

body.light-theme.sidebar-open::after,
body.light-theme:has(.nav-panel:hover)::after,
body.light-theme:has(.nav-panel:focus-within)::after {
  opacity: 1;
  background:
    linear-gradient(90deg, rgba(248, 250, 255, 0.9) 0%, rgba(248, 250, 255, 0.82) 30%, rgba(248, 250, 255, 0.48) 52%, rgba(248, 250, 255, 0.12) 72%, rgba(255, 255, 255, 0) 100%),
    radial-gradient(circle at 72% 46%, rgba(255, 255, 255, 0), rgba(236, 241, 250, 0.12) 74%);
}

body.light-theme .nav-panel {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.52);
  backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 10px 30px rgba(20, 28, 50, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.32);
}

body.light-theme .nav-panel:hover,
body.light-theme .nav-panel:focus-within,
body.light-theme.sidebar-open .nav-panel {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 16px 42px rgba(20, 28, 50, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

body.light-theme .category-card,
body.light-theme .quick-card {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 20px rgba(20, 28, 50, 0.045);
}

body.light-theme .category-card:hover,
body.light-theme .quick-card:hover,
body.light-theme .category-card.active {
  border-color: rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(20, 28, 50, 0.065);
}

body.light-theme .quick-section {
  border-color: rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.34);
}

body.light-theme .profile h1,
body.light-theme .center-title h2,
body.light-theme .category-card strong,
body.light-theme .quick-card strong {
  color: #1e2430;
}

body.light-theme .profile p,
body.light-theme .center-title p,
body.light-theme .quick-card small,
body.light-theme .time-row {
  color: #596275;
}

body.light-theme .category-icon,
body.light-theme .category-icon.warm,
body.light-theme .category-icon.amber,
body.light-theme .category-icon.plain,
body.light-theme .category-icon.sky,
body.light-theme .category-icon.paper,
body.light-theme .category-icon.pink,
body.light-theme .section-title svg {
  color: #6d7890;
}

body.light-theme .arrow,
body.light-theme .category-card:hover .arrow {
  color: rgba(109, 120, 144, 0.82);
}

body.light-theme .brand,
body.light-theme .brand.github,
body.light-theme .brand.notion,
body.light-theme .brand.google,
body.light-theme .brand.bilibili,
body.light-theme .brand.custom,
body.light-theme .brand.vercel {
  border-color: rgba(255, 255, 255, 0.78);
  color: #596275;
  background: rgba(255, 255, 255, 0.72);
}

body.light-theme .center-stage .search-box,
body.light-theme .search-box {
  border-color: rgba(255, 255, 255, 0.62);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 16px 44px rgba(20, 28, 50, 0.12), inset 0 0 20px rgba(255, 255, 255, 0.34);
}

body.light-theme .search-box:focus-within,
body.light-theme .center-stage .search-box:hover {
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.5);
  box-shadow:
    0 20px 56px rgba(20, 28, 50, 0.15),
    0 0 0 4px rgba(143, 164, 204, 0.12),
    inset 0 0 20px rgba(255, 255, 255, 0.42);
}

body.light-theme .search-box button,
body.light-theme .primary-button {
  color: #1e2430;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

body.light-theme .search-box button:hover,
body.light-theme .primary-button:hover {
  background: rgba(255, 255, 255, 0.76);
}

body.light-theme .panel-footer {
  border-top-color: rgba(255, 255, 255, 0.42);
}

body.light-theme .modal,
body.light-theme .custom-select-menu,
body.light-theme .toast {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(18px) saturate(1.35);
  box-shadow: 0 16px 46px rgba(20, 28, 50, 0.16);
}

body.light-theme .modal input,
body.light-theme .modal select,
body.light-theme .custom-select-trigger {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.7);
}

body.light-theme .custom-select-option:hover,
body.light-theme .custom-select-option.is-selected {
  background: rgba(255, 255, 255, 0.82);
}

/* Final neutral UI overrides. Keep this block last. */
body::before {
  filter: saturate(0.78) brightness(0.82);
}

body::after {
  background:
    linear-gradient(90deg, rgba(3, 5, 12, 0.58), rgba(6, 8, 16, 0.18) 42%, rgba(6, 8, 16, 0.04) 72%),
    radial-gradient(circle at 70% 44%, rgba(7, 9, 18, 0.02), rgba(7, 9, 18, 0.34) 86%);
}

.nav-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 28, 0.42);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.nav-panel:hover,
.nav-panel:focus-within,
body.sidebar-open .nav-panel {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(20, 22, 28, 0.5);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-panel .avatar {
  width: 34px;
  border-color: rgba(255, 255, 255, 0.16);
  filter: saturate(0.55) brightness(0.86);
  opacity: 0.72;
  box-shadow: none;
}

.nav-panel:hover .avatar,
.nav-panel:focus-within .avatar,
body.sidebar-open .nav-panel .avatar {
  width: 46px;
  opacity: 0.84;
  transform: none;
}

.center-stage {
  width: min(860px, calc(100vw - 148px));
  gap: 26px;
}

.center-stage .search-box {
  min-height: clamp(72px, 9vh, 88px);
  grid-template-columns: 34px 1fr 64px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34), inset 0 0 24px rgba(255, 255, 255, 0.035);
  padding: 10px 16px 10px 32px;
}

.center-stage .search-box input {
  font-size: clamp(19px, 2.1vw, 23px);
}

.center-stage .search-box button {
  width: 64px;
  height: clamp(50px, 6.3vh, 58px);
  border-radius: 18px;
}

.search-box:focus-within,
.center-stage .search-box:hover {
  border-color: rgba(159, 179, 217, 0.45);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 30px 88px rgba(0, 0, 0, 0.4),
    0 0 0 4px rgba(159, 179, 217, 0.08),
    inset 0 0 24px rgba(255, 255, 255, 0.045);
}

.search-box button,
.primary-button {
  color: #f5f7fa;
  background: rgba(159, 179, 217, 0.34);
  box-shadow: none;
}

.category-card {
  min-height: 64px;
  grid-template-columns: 30px 1fr 18px;
  gap: 12px;
  padding: 13px 14px;
}

.category-card small {
  display: none;
}

.category-card strong,
.quick-card strong {
  font-size: 15px;
  font-weight: 600;
}

.category-icon,
.category-icon.warm,
.category-icon.amber,
.category-icon.plain,
.category-icon.sky,
.category-icon.paper,
.category-icon.pink {
  width: 24px;
  height: 24px;
  color: rgba(245, 247, 250, 0.8);
}

.category-card,
.quick-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.category-card:hover,
.quick-card:hover,
.category-card.active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.nav-panel .category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nav-panel .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-section {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.quick-card {
  min-height: 82px;
  padding: 12px 8px;
}

.brand,
.brand.github,
.brand.notion,
.brand.google,
.brand.bilibili,
.brand.custom,
.brand.vercel {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(245, 247, 250, 0.82);
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 12px;
}

.brand.add {
  color: rgba(245, 247, 250, 0.72);
  background: transparent;
  border-style: dashed;
  font-size: 24px;
}

.quick-card small {
  margin-top: 4px;
  color: #8e97a3;
  font-size: 12px;
}

.panel-footer {
  min-height: 46px;
  border-top-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  opacity: 0.72;
}

.footer-button {
  color: rgba(245, 247, 250, 0.68);
  font-size: 14px;
}

.footer-button svg {
  width: 18px;
  height: 18px;
}

.time-row {
  color: rgba(184, 192, 204, 0.72);
  font-size: 13px;
}

.modal,
.custom-select-menu,
.toast {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 28, 0.88);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.44);
}

.modal input,
.modal select,
.custom-select-trigger {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

/* Minimal neutral pass: let the background lead, keep UI quiet and consistent. */
:root {
  --text: #f5f7fa;
  --muted: #b8c0cc;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.16);
  --panel: rgba(20, 22, 28, 0.42);
  --panel-hover: rgba(255, 255, 255, 0.1);
  --accent: #9fb3d9;
  --accent-2: #b8c0cc;
  --accent-warm: #d3c7bb;
}

body::before {
  filter: saturate(0.78) brightness(0.82);
}

body::after {
  background:
    linear-gradient(90deg, rgba(3, 5, 12, 0.58), rgba(6, 8, 16, 0.18) 42%, rgba(6, 8, 16, 0.04) 72%),
    radial-gradient(circle at 70% 44%, rgba(7, 9, 18, 0.02), rgba(7, 9, 18, 0.34) 86%);
}

.nav-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 28, 0.42);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.nav-panel:hover,
.nav-panel:focus-within,
body.sidebar-open .nav-panel {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(20, 22, 28, 0.5);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-panel .avatar {
  width: 34px;
  border-color: rgba(255, 255, 255, 0.16);
  filter: saturate(0.55) brightness(0.86);
  opacity: 0.72;
  box-shadow: none;
}

.nav-panel:hover .avatar,
.nav-panel:focus-within .avatar,
body.sidebar-open .nav-panel .avatar {
  width: 46px;
  opacity: 0.84;
  transform: none;
}

.profile {
  gap: 14px;
}

.profile h1,
.center-title h2 {
  color: #f5f7fa;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

.profile p,
.center-title p,
.category-card small,
.quick-card small,
.time-row {
  color: #b8c0cc;
}

.center-stage {
  width: min(860px, calc(100vw - 148px));
  gap: 26px;
}

.center-stage .search-box {
  min-height: clamp(72px, 9vh, 88px);
  grid-template-columns: 34px 1fr 64px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34), inset 0 0 24px rgba(255, 255, 255, 0.035);
  padding: 10px 16px 10px 32px;
}

.center-stage .search-box input {
  font-size: clamp(19px, 2.1vw, 23px);
}

.center-stage .search-box button {
  width: 64px;
  height: clamp(50px, 6.3vh, 58px);
  border-radius: 18px;
}

.search-box,
.center-stage .search-box {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
}

.search-box:focus-within,
.center-stage .search-box:hover {
  border-color: rgba(159, 179, 217, 0.45);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 30px 88px rgba(0, 0, 0, 0.4),
    0 0 0 4px rgba(159, 179, 217, 0.08),
    inset 0 0 24px rgba(255, 255, 255, 0.045);
}

.search-box button,
.primary-button {
  color: #f5f7fa;
  background: rgba(159, 179, 217, 0.34);
  box-shadow: none;
}

.search-box button:hover,
.primary-button:hover {
  background: rgba(159, 179, 217, 0.46);
}

.category-grid {
  gap: 10px;
}

.nav-panel .category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.category-card {
  min-height: 64px;
  grid-template-columns: 30px 1fr 18px;
  gap: 12px;
  padding: 13px 14px;
}

.category-card small {
  display: none;
}

.category-card strong,
.quick-card strong {
  font-size: 15px;
  font-weight: 600;
}

.category-icon,
.category-icon.warm,
.category-icon.amber,
.category-icon.plain,
.category-icon.sky,
.category-icon.paper,
.category-icon.pink {
  width: 24px;
  height: 24px;
  color: rgba(245, 247, 250, 0.8);
}

.category-card,
.quick-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.category-card:hover,
.quick-card:hover,
.category-card.active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.arrow,
.category-card:hover .arrow {
  color: rgba(245, 247, 250, 0.55);
  font-size: 20px;
}

.quick-section {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.section-title {
  margin-bottom: 12px;
}

.section-title svg {
  color: rgba(245, 247, 250, 0.72);
}

.nav-panel .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-card {
  min-height: 82px;
  padding: 12px 8px;
}

.link-open {
  padding: 12px 8px;
}

.brand,
.brand.github,
.brand.notion,
.brand.google,
.brand.bilibili,
.brand.custom {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(245, 247, 250, 0.82);
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 12px;
}

.brand.vercel {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
}

.brand.vercel::before {
  content: "";
  width: 0;
  height: 0;
  border-right: 7px solid transparent;
  border-bottom: 12px solid rgba(245, 247, 250, 0.82);
  border-left: 7px solid transparent;
}

.brand.add {
  color: rgba(245, 247, 250, 0.72);
  background: transparent;
  border-style: dashed;
  font-size: 24px;
}

.quick-card small {
  margin-top: 4px;
  color: #8e97a3;
  font-size: 12px;
}

.delete-link {
  border-color: rgba(255, 255, 255, 0.12);
  color: rgba(245, 247, 250, 0.62);
  background: rgba(20, 22, 28, 0.62);
}

.panel-footer {
  min-height: 46px;
  border-top-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  opacity: 0.72;
}

.footer-button {
  color: rgba(245, 247, 250, 0.68);
  font-size: 14px;
}

.footer-button svg {
  width: 18px;
  height: 18px;
}

.footer-button:hover {
  color: rgba(245, 247, 250, 0.9);
}

.time-row {
  color: rgba(184, 192, 204, 0.72);
  font-size: 13px;
}

.divider {
  background: rgba(255, 255, 255, 0.1);
}

.modal,
.custom-select-menu,
.toast {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 28, 0.88);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.44);
}

.modal input,
.modal select,
.custom-select-trigger {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}

.modal input:focus,
.modal select:focus,
.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger {
  border-color: rgba(159, 179, 217, 0.42);
  box-shadow: 0 0 0 4px rgba(159, 179, 217, 0.08);
}

.custom-select-option:hover,
.custom-select-option.is-selected {
  background: rgba(255, 255, 255, 0.1);
}

/* Cool glass theme: align UI with the blue-black background. */
.nav-panel {
  border-color: var(--line-strong);
  background:
    radial-gradient(circle at 78% 24%, rgba(114, 215, 255, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(33, 31, 49, 0.72), rgba(49, 45, 69, 0.52));
  box-shadow: 0 26px 90px rgba(4, 6, 22, 0.52), inset 0 0 0 1px rgba(230, 232, 255, 0.04);
}

.nav-panel:hover,
.nav-panel:focus-within,
body.sidebar-open .nav-panel {
  border-color: rgba(210, 205, 235, 0.5);
  box-shadow: 0 28px 96px rgba(3, 5, 22, 0.62), inset 0 0 0 1px rgba(230, 232, 255, 0.05);
}

.profile h1,
.center-title h2 {
  color: #f3efff;
  text-shadow: 0 10px 28px rgba(6, 8, 30, 0.48);
}

.profile p,
.center-title p,
.category-card small,
.quick-card small,
.time-row {
  color: #c5bfd6;
}

.search-box,
.center-stage .search-box {
  border-color: rgba(210, 205, 235, 0.3);
  background: rgba(33, 31, 49, 0.5);
  box-shadow:
    inset 0 0 26px rgba(230, 232, 255, 0.06),
    0 22px 70px rgba(3, 5, 22, 0.42);
}

.search-box:focus-within,
.center-stage .search-box:hover {
  border-color: rgba(143, 167, 255, 0.62);
  box-shadow:
    inset 0 0 30px rgba(230, 232, 255, 0.08),
    0 0 0 5px rgba(143, 167, 255, 0.1),
    0 26px 86px rgba(3, 5, 22, 0.52);
}

.search-box > svg,
.center-stage .search-box:hover > svg {
  color: rgba(210, 222, 255, 0.92);
}

.search-box input::placeholder {
  color: rgba(197, 191, 214, 0.56);
}

.search-box button,
.primary-button {
  background: linear-gradient(135deg, #f0ad8f, #d89476);
  box-shadow: 0 0 22px rgba(240, 173, 143, 0.34);
}

.category-card,
.quick-card {
  border-color: rgba(210, 205, 235, 0.25);
  background: linear-gradient(135deg, rgba(66, 61, 86, 0.46), rgba(43, 40, 61, 0.38));
  box-shadow: inset 0 0 18px rgba(230, 232, 255, 0.04), 0 10px 28px rgba(3, 5, 22, 0.22);
}

.category-card:hover,
.quick-card:hover {
  border-color: rgba(143, 167, 255, 0.44);
  background: rgba(86, 82, 111, 0.44);
  box-shadow: inset 0 0 22px rgba(230, 232, 255, 0.07), 0 14px 34px rgba(3, 5, 22, 0.28);
}

.category-card.active {
  border-color: rgba(143, 167, 255, 0.62);
  background: linear-gradient(135deg, rgba(143, 167, 255, 0.16), rgba(114, 215, 255, 0.08));
  box-shadow: inset 0 0 24px rgba(143, 167, 255, 0.08), 0 12px 30px rgba(3, 5, 22, 0.24);
}

.category-icon.warm {
  color: #dbe4ff;
}

.category-icon.amber {
  color: #b7c6ff;
}

.category-icon.plain {
  color: #f3efff;
}

.category-icon.sky {
  color: #9ee8ff;
}

.category-icon.paper {
  color: #c8c1de;
}

.category-icon.pink {
  color: #b7c6ff;
}

.arrow,
.category-card:hover .arrow {
  color: rgba(210, 222, 255, 0.78);
}

.quick-section {
  border-color: rgba(210, 205, 235, 0.24);
  background: rgba(33, 31, 49, 0.34);
}

.section-title svg,
.footer-button:hover {
  color: #9ee8ff;
}

.brand.custom {
  background: linear-gradient(135deg, rgba(143, 167, 255, 0.9), rgba(114, 215, 255, 0.82));
}

.brand.add {
  color: rgba(210, 222, 255, 0.9);
}

.panel-footer {
  border-top-color: rgba(210, 205, 235, 0.18);
  background: rgba(25, 24, 39, 0.22);
}

.modal {
  border-color: rgba(210, 205, 235, 0.36);
  background:
    radial-gradient(circle at top right, rgba(114, 215, 255, 0.1), transparent 40%),
    rgba(33, 31, 49, 0.9);
  box-shadow: 0 24px 80px rgba(3, 5, 22, 0.6);
}

.modal input,
.modal select,
.custom-select-trigger {
  border-color: rgba(210, 205, 235, 0.28);
  background:
    linear-gradient(135deg, rgba(230, 232, 255, 0.08), rgba(230, 232, 255, 0.03)),
    rgba(25, 24, 39, 0.5);
}

.modal input:focus,
.modal select:focus,
.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger {
  border-color: rgba(143, 167, 255, 0.62);
  box-shadow:
    inset 0 0 18px rgba(230, 232, 255, 0.06),
    0 0 0 4px rgba(143, 167, 255, 0.1);
}

.custom-select-arrow {
  border-color: rgba(210, 222, 255, 0.86);
}

.custom-select-menu {
  border-color: rgba(210, 205, 235, 0.3);
  background:
    radial-gradient(circle at top right, rgba(114, 215, 255, 0.1), transparent 42%),
    rgba(25, 24, 39, 0.96);
  box-shadow: 0 18px 48px rgba(3, 5, 22, 0.48);
}

.custom-select-option {
  color: rgba(243, 239, 255, 0.88);
}

.custom-select-option:hover,
.custom-select-option.is-selected {
  color: #f3efff;
  background: rgba(143, 167, 255, 0.16);
}

.secondary-button,
.icon-button {
  border-color: rgba(210, 205, 235, 0.28);
  background: rgba(66, 61, 86, 0.34);
}

.danger-button {
  color: #ffe6df;
  background: rgba(161, 84, 84, 0.38);
}

.toast {
  border-color: rgba(210, 205, 235, 0.3);
  background: rgba(25, 24, 39, 0.8);
  box-shadow: 0 14px 42px rgba(3, 5, 22, 0.42);
}

.loader-ring {
  border-color: rgba(210, 205, 235, 0.22);
  border-top-color: rgba(114, 215, 255, 0.9);
}

body.loading {
  overflow: hidden;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  gap: 14px;
  align-content: center;
  color: rgba(255, 248, 238, 0.92);
  background: rgba(7, 6, 20, 0.28);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease, backdrop-filter 360ms ease;
}

body.loading .loader {
  opacity: 1;
  pointer-events: auto;
}

body.is-loaded .loader {
  opacity: 0;
  backdrop-filter: blur(0);
}

.loader-ring {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 232, 218, 0.22);
  border-top-color: rgba(255, 205, 156, 0.92);
  border-radius: 50%;
  animation: loader-spin 820ms linear infinite;
}

.loader-text {
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 239, 226, 0.72);
}

body.loading .page-shell {
  opacity: 0.36;
  filter: blur(14px);
  transform: scale(1.015);
}

.page-shell {
  transition: opacity 420ms ease, filter 420ms ease, transform 420ms ease;
}

body.is-loaded .nav-panel {
  animation: sidebar-rail-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

body.is-loaded .center-title {
  animation: layered-title-enter 620ms cubic-bezier(0.16, 1, 0.3, 1) 120ms both;
}

body.is-loaded .center-stage .search-box {
  animation: layered-search-enter 680ms cubic-bezier(0.16, 1, 0.3, 1) 240ms both;
}

.center-title h2 {
  color: rgba(255, 248, 238, 0.94);
  background: none;
  filter: drop-shadow(0 10px 24px rgba(4, 3, 18, 0.34));
  animation: none;
}

.center-title h2 span {
  color: inherit;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  animation:
    title-letter-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both,
    title-letter-float 4.4s ease-in-out infinite;
  animation-delay:
    calc(var(--i) * 52ms + 220ms),
    calc(var(--i) * 180ms + 900ms);
}

.center-title h2:hover span {
  transform: translateY(-3px);
  filter: drop-shadow(0 8px 12px rgba(255, 239, 226, 0.14));
}

.center-title h2:hover span:nth-child(even) {
  transform: translateY(2px);
}

.center-stage .search-box {
  transform-origin: center;
}

.center-stage .search-box:hover {
  border-color: rgba(255, 232, 218, 0.72);
  box-shadow:
    inset 0 0 30px rgba(255, 255, 255, 0.11),
    0 0 0 5px rgba(255, 205, 156, 0.08),
    0 26px 86px rgba(4, 3, 18, 0.46);
  transform: translateY(-4px) scale(1.012);
}

.center-stage .search-box > svg {
  transition: transform 220ms ease, color 220ms ease;
}

.center-stage .search-box:hover > svg {
  color: rgba(255, 218, 182, 0.96);
  transform: rotate(-8deg) scale(1.08);
}

.center-stage .search-box:hover button {
  filter: brightness(1.1);
}

@keyframes loader-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes sidebar-rail-enter {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes layered-title-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes layered-search-enter {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 430px) {
  .category-grid,
  .quick-grid {
    grid-template-columns: 1fr;
  }

  .quick-card {
    min-height: 76px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    text-align: left;
  }

  .link-open {
    min-height: 76px;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    padding-right: 42px;
    text-align: left;
  }

  .delete-link {
    opacity: 1;
  }

  .brand {
    margin: 0;
  }
}

/* Center-search layout with a collapsible left navigation drawer. */
body {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: #08071a;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  z-index: -2;
  background: url("./background.png") center / cover no-repeat;
  animation: background-drift 28s ease-in-out infinite alternate;
  transition: filter 360ms ease, transform 360ms ease;
}

body::after {
  z-index: -1;
  background:
    radial-gradient(circle at 50% 48%, rgba(8, 7, 22, 0.08), rgba(8, 7, 22, 0.42) 72%),
    linear-gradient(90deg, rgba(6, 8, 26, 0.36), rgba(6, 8, 26, 0.02) 46%, rgba(6, 8, 26, 0.08));
  opacity: 0.88;
  transition: opacity 360ms ease, background 360ms ease;
}

body.sidebar-open::before,
body:has(.nav-panel:hover)::before,
body:has(.nav-panel:focus-within)::before {
  filter: blur(8px) saturate(0.96) brightness(0.78);
  transform: scale(1.035);
}

body.sidebar-open::after,
body:has(.nav-panel:hover)::after,
body:has(.nav-panel:focus-within)::after {
  opacity: 1;
  background:
    radial-gradient(circle at 22% 50%, rgba(19, 15, 42, 0.38), rgba(8, 7, 22, 0.72) 74%),
    rgba(7, 6, 20, 0.2);
}

.page-shell {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 0;
}

.center-stage {
  width: min(760px, calc(100vw - 148px));
  display: grid;
  justify-items: center;
  gap: 22px;
  transform: translateY(-3vh);
  transition: filter 280ms ease, opacity 280ms ease, transform 280ms ease;
}

.center-title {
  text-align: center;
  text-shadow: 0 12px 38px rgba(4, 3, 18, 0.38);
  animation: panel-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.center-title h2 {
  margin: 0;
  font-size: clamp(42px, 7vw, 82px);
  line-height: 1;
  color: transparent;
  background: linear-gradient(100deg, #fff7ea 0%, #ffd39f 28%, #f3a6d9 50%, #fff7ea 72%, #ffd39f 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 8px 22px rgba(255, 188, 143, 0.22));
  animation: title-gradient 5.6s ease-in-out infinite;
}

.center-title h2 span {
  display: inline-block;
  color: transparent;
  background: inherit;
  background-size: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  animation:
    title-letter-enter 520ms cubic-bezier(0.16, 1, 0.3, 1) both,
    title-letter-float 3.8s ease-in-out infinite;
  animation-delay:
    calc(var(--i) * 70ms),
    calc(var(--i) * 170ms);
  transition: transform 180ms ease, filter 180ms ease;
}

.center-title h2:hover span {
  transform: translateY(-5px) rotate(-1deg);
  filter: drop-shadow(0 8px 14px rgba(255, 204, 150, 0.28));
}

.center-title h2:hover span:nth-child(even) {
  transform: translateY(4px) rotate(1deg);
}

.center-title p {
  margin: 14px 0 0;
  color: rgba(255, 239, 226, 0.74);
  font-size: clamp(15px, 1.7vw, 20px);
}

.center-stage .search-box {
  width: 100%;
  min-height: clamp(60px, 8vh, 76px);
  grid-template-columns: 30px 1fr 58px;
  margin: 0;
  padding: 9px 14px 9px 28px;
  background: rgba(26, 23, 47, 0.44);
  box-shadow:
    inset 0 0 26px rgba(255, 255, 255, 0.08),
    0 22px 70px rgba(4, 3, 18, 0.38);
  backdrop-filter: blur(20px);
  animation: panel-enter 640ms cubic-bezier(0.16, 1, 0.3, 1) 80ms both;
}

.center-stage .search-box input {
  font-size: clamp(17px, 2vw, 20px);
}

.center-stage .search-box button {
  width: 58px;
  height: clamp(44px, 5.6vh, 52px);
}

body.sidebar-open .center-stage,
body:has(.nav-panel:hover) .center-stage,
body:has(.nav-panel:focus-within) .center-stage {
  opacity: 0.42;
  filter: blur(7px);
  transform: translateY(-3vh) scale(0.985);
}

.nav-panel {
  position: fixed;
  z-index: 3;
  top: clamp(12px, 2vw, 24px);
  bottom: clamp(12px, 2vw, 24px);
  left: clamp(10px, 1.6vw, 22px);
  width: 76px;
  min-width: 0;
  max-width: none;
  max-height: none;
  border-radius: 24px;
  display: flex;
  overflow: hidden;
  transform: none;
  transition:
    width 340ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 220ms ease,
    box-shadow 220ms ease,
    background 220ms ease;
}

.nav-panel:hover,
.nav-panel:focus-within,
body.sidebar-open .nav-panel {
  width: clamp(560px, 43vw, 720px);
  border-color: rgba(255, 232, 218, 0.58);
  box-shadow: 0 26px 90px rgba(5, 4, 20, 0.58), inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav-panel .profile,
.nav-panel .category-grid,
.nav-panel .quick-section,
.nav-panel .panel-footer {
  min-width: min(720px, 43vw);
}

.nav-panel .profile {
  padding: 24px 24px 18px;
}

.nav-panel .avatar {
  width: 44px;
}

.nav-panel:hover .avatar,
.nav-panel:focus-within .avatar,
body.sidebar-open .nav-panel .avatar {
  width: clamp(64px, 8vh, 82px);
}

.profile-copy,
.category-grid,
.quick-section,
.panel-footer {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 220ms ease 80ms, transform 220ms ease 80ms;
}

.nav-panel:not(:hover):not(:focus-within) .category-grid,
.nav-panel:not(:hover):not(:focus-within) .quick-section,
.nav-panel:not(:hover):not(:focus-within) .panel-footer {
  pointer-events: none;
}

.nav-panel:hover .profile-copy,
.nav-panel:hover .category-grid,
.nav-panel:hover .quick-section,
.nav-panel:hover .panel-footer,
.nav-panel:focus-within .profile-copy,
.nav-panel:focus-within .category-grid,
.nav-panel:focus-within .quick-section,
.nav-panel:focus-within .panel-footer,
body.sidebar-open .nav-panel .profile-copy,
body.sidebar-open .nav-panel .category-grid,
body.sidebar-open .nav-panel .quick-section,
body.sidebar-open .nav-panel .panel-footer {
  opacity: 1;
  transform: translateX(0);
}

.nav-panel .profile h1 {
  font-size: clamp(32px, min(3.8vw, 5.6vh), 48px);
}

.nav-panel .category-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0 24px;
}

.nav-panel .quick-section {
  margin: 18px 20px 16px;
}

.nav-panel .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nav-panel .panel-footer {
  margin-top: auto;
}

.nav-panel .footer-button span,
.nav-panel .time-row {
  white-space: nowrap;
}

@media (max-height: 760px) and (min-width: 761px) {
  .center-stage {
    transform: translateY(-1vh);
  }

  body.sidebar-open .center-stage,
  body:has(.nav-panel:hover) .center-stage,
  body:has(.nav-panel:focus-within) .center-stage {
    transform: translateY(-1vh) scale(0.985);
  }

  .nav-panel .profile {
    padding-top: 18px;
  }

  .nav-panel .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .page-shell {
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 0;
  }

  .center-stage {
    width: min(100% - 92px, 620px);
    margin-left: 56px;
    transform: translateY(-2vh);
  }

  .center-title h2 {
    font-size: clamp(34px, 12vw, 58px);
  }

  .center-stage .search-box {
    grid-template-columns: 24px 1fr 48px;
    min-height: 58px;
    padding-left: 20px;
  }

  .center-stage .search-box button {
    width: 48px;
    height: 42px;
  }

  .nav-panel {
    top: 10px;
    bottom: 10px;
    left: 8px;
    width: 64px;
    border-radius: 20px;
  }

  .nav-panel:hover,
  .nav-panel:focus-within,
  body.sidebar-open .nav-panel {
    width: calc(100vw - 16px);
  }

  .nav-panel .profile,
  .nav-panel .category-grid,
  .nav-panel .quick-section,
  .nav-panel .panel-footer {
    min-width: calc(100vw - 16px);
  }

  .nav-panel .category-grid,
  .nav-panel .quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final title tone-down overrides. */
.center-title h2 {
  color: rgba(255, 248, 238, 0.94);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  filter: drop-shadow(0 10px 24px rgba(4, 3, 18, 0.34));
  animation: none;
}

.center-title h2 span {
  color: inherit;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  animation:
    title-letter-enter 420ms cubic-bezier(0.16, 1, 0.3, 1) both,
    title-letter-float 4.4s ease-in-out infinite;
  animation-delay:
    calc(var(--i) * 52ms + 220ms),
    calc(var(--i) * 180ms + 900ms);
}

.center-title h2:hover span {
  transform: translateY(-3px);
  filter: drop-shadow(0 8px 12px rgba(255, 239, 226, 0.14));
}

.center-title h2:hover span:nth-child(even) {
  transform: translateY(2px);
}

/* Final neutral UI overrides. Keep this block last. */
body::before {
  filter: saturate(0.78) brightness(0.82);
}

body::after {
  background:
    linear-gradient(90deg, rgba(3, 5, 12, 0.58), rgba(6, 8, 16, 0.18) 42%, rgba(6, 8, 16, 0.04) 72%),
    radial-gradient(circle at 70% 44%, rgba(7, 9, 18, 0.02), rgba(7, 9, 18, 0.34) 86%);
}

.nav-panel {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 28, 0.42);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.nav-panel:hover,
.nav-panel:focus-within,
body.sidebar-open .nav-panel {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(20, 22, 28, 0.5);
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.nav-panel .avatar {
  width: 34px;
  border-color: rgba(255, 255, 255, 0.16);
  filter: saturate(0.55) brightness(0.86);
  opacity: 0.72;
  box-shadow: none;
}

.nav-panel:hover .avatar,
.nav-panel:focus-within .avatar,
body.sidebar-open .nav-panel .avatar {
  width: 46px;
  opacity: 0.84;
  transform: none;
}

.center-stage {
  width: min(860px, calc(100vw - 148px));
  gap: 26px;
}

.center-stage .search-box {
  min-height: clamp(72px, 9vh, 88px);
  grid-template-columns: 34px 1fr 64px;
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 26px 78px rgba(0, 0, 0, 0.34), inset 0 0 24px rgba(255, 255, 255, 0.035);
  padding: 10px 16px 10px 32px;
}

.center-stage .search-box input {
  font-size: clamp(19px, 2.1vw, 23px);
}

.center-stage .search-box button {
  width: 64px;
  height: clamp(50px, 6.3vh, 58px);
  border-radius: 18px;
}

.search-box:focus-within,
.center-stage .search-box:hover {
  border-color: rgba(159, 179, 217, 0.45);
  background: rgba(255, 255, 255, 0.1);
  box-shadow:
    0 30px 88px rgba(0, 0, 0, 0.4),
    0 0 0 4px rgba(159, 179, 217, 0.08),
    inset 0 0 24px rgba(255, 255, 255, 0.045);
}

.search-box button,
.primary-button {
  color: #f5f7fa;
  background: rgba(159, 179, 217, 0.34);
  box-shadow: none;
}

.category-card {
  min-height: 64px;
  grid-template-columns: 30px 1fr 18px;
  gap: 12px;
  padding: 13px 14px;
}

.category-card small {
  display: none;
}

.category-card strong,
.quick-card strong {
  font-size: 15px;
  font-weight: 600;
}

.category-icon,
.category-icon.warm,
.category-icon.amber,
.category-icon.plain,
.category-icon.sky,
.category-icon.paper,
.category-icon.pink {
  width: 24px;
  height: 24px;
  color: rgba(245, 247, 250, 0.8);
}

.category-card,
.quick-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.category-card:hover,
.quick-card:hover,
.category-card.active {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.nav-panel .category-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.nav-panel .quick-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.quick-section {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
}

.quick-card {
  min-height: 82px;
  padding: 12px 8px;
}

.brand,
.brand.github,
.brand.notion,
.brand.google,
.brand.bilibili,
.brand.custom,
.brand.vercel {
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: rgba(245, 247, 250, 0.82);
  background: rgba(255, 255, 255, 0.08);
  font-family: inherit;
  font-size: 12px;
}

.brand.add {
  color: rgba(245, 247, 250, 0.72);
  background: transparent;
  border-style: dashed;
  font-size: 24px;
}

.quick-card small {
  margin-top: 4px;
  color: #8e97a3;
  font-size: 12px;
}

.panel-footer {
  min-height: 46px;
  border-top-color: rgba(255, 255, 255, 0.08);
  background: transparent;
  opacity: 0.72;
}

.footer-button {
  color: rgba(245, 247, 250, 0.68);
  font-size: 14px;
}

.footer-button svg {
  width: 18px;
  height: 18px;
}

.time-row {
  color: rgba(184, 192, 204, 0.72);
  font-size: 13px;
}

.modal,
.custom-select-menu,
.toast {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(20, 22, 28, 0.88);
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.44);
}

.modal input,
.modal select,
.custom-select-trigger {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
}
