:root {
  --navy: #15213d;
  --navy-soft: #35415d;
  --blue: #3972f6;
  --blue-deep: #2458d8;
  --yellow: #ffda52;
  --coral: #ff866f;
  --mint: #7ce0bd;
  --sky: #dcecff;
  --cream: #fff8e7;
  --paper: #fffcf5;
  --white: #ffffff;
  --muted: #6e7587;
  --line: rgba(21, 33, 61, 0.13);
  --shadow: 0 14px 0 rgba(21, 33, 61, 0.08);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  height: 100%;
  color-scheme: light;
  background: var(--cream);
}

body {
  min-height: 100dvh;
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--navy);
  background:
    radial-gradient(circle at 8% 14%, rgba(124, 224, 189, 0.4) 0 6rem, transparent 6.1rem),
    radial-gradient(circle at 94% 28%, rgba(255, 134, 111, 0.3) 0 9rem, transparent 9.1rem),
    linear-gradient(180deg, #fffdf7 0%, #fff8e7 100%);
  font-family: "LXGW WenKai", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}

body::before {
  top: 9%;
  right: 8%;
  width: 80px;
  height: 80px;
  opacity: 0.12;
  background-image: radial-gradient(var(--navy) 1.5px, transparent 1.5px);
  background-size: 12px 12px;
  transform: rotate(8deg);
}

body::after {
  bottom: 7%;
  left: 3%;
  width: 150px;
  height: 54px;
  border: 12px solid rgba(57, 114, 246, 0.1);
  border-right: 0;
  border-left: 0;
  transform: rotate(-10deg);
}

button,
input,
select { font: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  display: flex;
  width: min(1200px, calc(100% - 44px));
  min-height: 100dvh;
  flex-direction: column;
  margin: 0 auto;
  padding: 24px 0 20px;
}

.masthead {
  position: relative;
  display: grid;
  height: 132px;
  flex: 0 0 132px;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 14px 30px;
  overflow: hidden;
  border: 2px solid var(--navy);
  border-radius: 28px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.48) 0 5rem, transparent 5.1rem),
    var(--yellow);
  box-shadow: var(--shadow);
}

.masthead::before,
.masthead::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.masthead::before {
  top: -72px;
  right: 18%;
  width: 118px;
  height: 118px;
  border: 15px solid rgba(21, 33, 61, 0.08);
  border-radius: 50%;
}

.masthead::after {
  right: -24px;
  bottom: -54px;
  width: 134px;
  height: 84px;
  border-radius: 52% 48% 0 0;
  background: var(--coral);
  transform: rotate(-12deg);
}

.masthead-copy { position: relative; z-index: 1; }

.masthead-actions {
  position: relative;
  z-index: 2;
}

.account-badge {
  position: absolute;
  z-index: 3;
  bottom: -7px;
  left: 50%;
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 7px;
  padding: 3px 4px 3px 10px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.82);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
  transform: translateX(-50%);
}

.account-badge button {
  min-height: 18px;
  padding: 0 7px;
  border: 0;
  border-radius: 999px;
  color: var(--white);
  background: var(--blue);
  font: inherit;
  cursor: pointer;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 5px;
  padding: 4px 9px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.68);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(57, 114, 246, 0.16);
}

h1 {
  display: flex;
  max-width: 760px;
  align-items: center;
  gap: 11px;
  margin: 0;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: clamp(40px, 4.4vw, 50px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.035em;
}

.title-cn { white-space: nowrap; }

.title-fun {
  display: inline-block;
  padding: 0.1em 0.23em 0.13em;
  border: 2px solid var(--navy);
  border-radius: 0.24em;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 4px 4px 0 var(--coral);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", "Microsoft YaHei UI", sans-serif;
  font-size: 0.64em;
  font-weight: 900;
  font-style: normal;
  letter-spacing: 0.035em;
  line-height: 0.95;
  transform: rotate(-2deg);
}

.intro {
  max-width: 650px;
  margin: 5px 0 0;
  color: var(--navy-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.page-total {
  position: relative;
  z-index: 1;
  display: grid;
  width: 90px;
  height: 90px;
  padding: 0;
  place-content: center;
  appearance: none;
  border: 2px solid var(--navy);
  border-radius: 50%;
  outline: none;
  color: var(--white);
  background: var(--blue);
  box-shadow: 5px 5px 0 rgba(21, 33, 61, 0.16);
  cursor: pointer;
  text-align: center;
  transform: rotate(3deg);
  user-select: none;
  touch-action: manipulation;
  transition: box-shadow 160ms ease, transform 160ms ease;
}

.page-total:hover { transform: rotate(5deg) scale(1.025); }
.page-total:active { box-shadow: 2px 2px 0 rgba(21, 33, 61, 0.16); transform: translate(2px, 2px) rotate(3deg) scale(0.98); }
.page-total:focus-visible { box-shadow: 5px 5px 0 rgba(21, 33, 61, 0.16), 0 0 0 4px rgba(255, 255, 255, 0.75); }

.page-total.is-unlocking { animation: management-unlock 260ms ease-in-out both; }

@keyframes management-unlock {
  45% { color: var(--navy); background: var(--yellow); transform: rotate(-5deg) scale(1.08); }
  100% { color: var(--white); background: var(--blue); transform: rotate(3deg) scale(1); }
}

.page-total strong {
  display: block;
  font-family: "Arial Rounded MT Bold", "Microsoft YaHei", sans-serif;
  font-size: 33px;
  line-height: 0.9;
  letter-spacing: -0.06em;
}

.page-total span {
  display: block;
  margin-top: 5px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.manage-preview .page-total.upload-entry {
  color: var(--white);
  background: var(--blue);
  box-shadow: 5px 5px 0 rgba(21, 33, 61, 0.16);
  transform: translateY(-5px) rotate(3deg);
}

.manage-preview .page-total.upload-entry strong,
.manage-preview .page-total.upload-entry span { display: none; }

.manage-preview .page-total.upload-entry::after {
  content: "+";
  font-family: "Arial Rounded MT Bold", "Microsoft YaHei", sans-serif;
  font-size: 58px;
  font-weight: 500;
  line-height: 0.8;
}

.manage-preview .page-total.upload-entry:hover { transform: translateY(-5px) rotate(5deg) scale(1.05); }

.manage-preview .account-badge { bottom: -13px; }

.toolbar {
  position: sticky;
  top: 10px;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) repeat(2, minmax(140px, 180px));
  gap: 8px;
  align-items: center;
  margin: 18px 0 13px;
  padding: 7px;
  border: 1.5px solid var(--navy);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 24px rgba(35, 54, 91, 0.1);
  backdrop-filter: blur(16px);
}

.search-box { position: relative; }

.search-box svg {
  position: absolute;
  top: 50%;
  left: 15px;
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--blue);
  stroke-linecap: round;
  stroke-width: 2;
  transform: translateY(-50%);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  height: 42px;
  padding: 0 15px 0 43px;
  border: 0;
  border-radius: 13px;
  outline: none;
  color: var(--navy);
  background: var(--cream);
  font-size: 12px;
  transition: box-shadow 150ms ease, background 150ms ease;
}

.search-box input::placeholder { color: #969bad; }

.search-box input:focus {
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(57, 114, 246, 0.18);
}

.select-box {
  position: relative;
  min-width: 0;
}

.select-trigger {
  display: flex;
  width: 100%;
  height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 15px;
  border: 1.5px solid rgba(57, 114, 246, 0.22);
  border-radius: 999px;
  outline: none;
  color: var(--navy);
  background: rgba(220, 236, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.select-trigger:hover {
  border-color: rgba(57, 114, 246, 0.38);
  background: rgba(220, 236, 255, 0.82);
}

.select-trigger:focus-visible {
  border-color: rgba(57, 114, 246, 0.45);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(57, 114, 246, 0.16);
}

.select-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 2px solid var(--blue);
  border-bottom: 2px solid var(--blue);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 160ms ease;
}

.select-trigger[aria-expanded="true"] .select-chevron {
  transform: translateY(2px) rotate(225deg);
}

.select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: min(260px, 44vh);
  padding: 7px;
  overflow-y: auto;
  border: 1.5px solid var(--navy);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 15px 36px rgba(35, 54, 91, 0.2), 4px 4px 0 rgba(57, 114, 246, 0.12);
  backdrop-filter: blur(16px);
  scrollbar-width: thin;
  scrollbar-color: rgba(57, 114, 246, 0.45) transparent;
  transform-origin: top center;
  animation: select-menu-in 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.select-menu[hidden] { display: none; }

@keyframes select-menu-in {
  from { opacity: 0; transform: translateY(-5px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.select-option {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 10px 7px 12px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  color: var(--navy-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition: color 120ms ease, background 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.select-option + .select-option { margin-top: 3px; }

.select-option:hover,
.select-option:focus-visible {
  border-color: rgba(57, 114, 246, 0.2);
  outline: none;
  color: var(--navy);
  background: rgba(220, 236, 255, 0.66);
  transform: translateX(2px);
}

.select-option[aria-selected="true"] {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--yellow);
  box-shadow: 2px 2px 0 rgba(21, 33, 61, 0.14);
}

.select-option-count {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--blue);
  background: var(--white);
  font-size: 9px;
  font-weight: 900;
}

.select-option[aria-selected="true"] .select-option-count {
  color: var(--white);
  background: var(--blue);
}

.author-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.author-filter {
  min-height: 38px;
  padding: 0 14px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  color: var(--navy-soft);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.author-filter:hover {
  color: var(--blue-deep);
  background: var(--sky);
  transform: translateY(-1px);
}

.author-filter[aria-pressed="true"] {
  border-color: var(--navy);
  color: var(--navy);
  background: var(--yellow);
  box-shadow: 0 3px 0 rgba(21, 33, 61, 0.16);
  transform: translateY(-2px);
}

.result-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 0 4px 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.page-grid {
  display: grid;
  min-height: 0;
  flex: 1 0 auto;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
  padding: 8px 12px 28px 4px;
  overflow: visible;
  overscroll-behavior: contain;
  scrollbar-color: rgba(57, 114, 246, 0.65) rgba(21, 33, 61, 0.06);
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

.page-grid::-webkit-scrollbar { width: 10px; }

.page-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(21, 33, 61, 0.05);
}

.page-grid::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(57, 114, 246, 0.68);
  background-clip: padding-box;
}

.page-grid:focus-visible {
  border-radius: 18px;
  outline: 3px solid rgba(57, 114, 246, 0.34);
  outline-offset: -3px;
}

.page-card {
  position: relative;
  display: flex;
  min-height: 198px;
  flex-direction: column;
  padding: 16px 17px 15px;
  overflow: hidden;
  border: 1.5px solid rgba(21, 33, 61, 0.18);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 30px rgba(35, 54, 91, 0.06);
  transform-origin: 50% 85%;
  animation: pop-in 440ms backwards;
  transition: background 190ms ease, border-color 190ms ease, box-shadow 210ms ease, transform 210ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-card:has(.metadata-row) {
  min-height: 210px;
  padding-bottom: 19px;
}

.page-card::before {
  position: absolute;
  top: -18px;
  right: -18px;
  width: 66px;
  height: 66px;
  border: 12px solid rgba(57, 114, 246, 0.055);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transition: border-color 210ms ease, transform 210ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-card::after {
  position: absolute;
  right: 10px;
  bottom: -18px;
  color: rgba(21, 33, 61, 0.035);
  font-family: "Arial Rounded MT Bold", "Microsoft YaHei", sans-serif;
  font-size: 72px;
  font-weight: 900;
  line-height: 1;
  content: attr(data-index);
  pointer-events: none;
  transition: color 210ms ease, transform 210ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.page-card:hover {
  z-index: 1;
  border-color: rgba(57, 114, 246, 0.58);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 17px 34px rgba(35, 54, 91, 0.15);
  transform: translateY(-5px) rotate(-0.25deg) scale(1.008);
}

.page-card:hover::before {
  border-color: rgba(57, 114, 246, 0.13);
  transform: translate(-5px, 5px) scale(1.16);
}

.page-card:hover::after {
  color: rgba(21, 33, 61, 0.065);
  transform: translate(-3px, -3px) rotate(-2deg);
}

.page-card:nth-child(even):hover { transform: translateY(-5px) rotate(0.25deg) scale(1.008); }

.card-link {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
}

.card-link:focus-visible {
  border-radius: 15px;
  outline: 3px solid var(--blue);
  outline-offset: -2px;
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.card-top,
.card-bottom {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.card-top { align-items: center; }
.card-bottom { align-items: center; margin-top: auto; padding-top: 8px; }
.page-card:has(.metadata-row) .card-bottom { padding-top: 8px; }

.card-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.card-meta time { flex: 0 0 auto; white-space: nowrap; }

.author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(21, 33, 61, 0.1);
  border-radius: 999px;
  color: var(--navy);
  background: rgba(255, 248, 231, 0.78);
  font-size: 9px;
  font-weight: 800;
}

.card-meta .author { flex: 0 1 auto; }
.card-meta .author {
  padding: 0;
  border: 0;
  background: transparent;
}

.card-meta .author::before { display: none; }
.card-meta .author[data-author="zihan"] { color: #2458d8; background: transparent; }
.card-meta .author[data-author="hinswind"] { color: #197158; background: transparent; }
.card-meta .author[data-author="xinyue"] { color: #b94b37; background: transparent; }

.author::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.author[data-author="zihan"] {
  border-color: #bfd0ff;
  color: #2458d8;
  background: #edf3ff;
}

.author[data-author="zihan"]::before { background: #3972f6; }

.author[data-author="hinswind"] {
  border-color: #b8e6d6;
  color: #197158;
  background: #ebfaf5;
}

.author[data-author="hinswind"]::before { background: #43b890; }

.author[data-author="xinyue"] {
  border-color: #ffc8bd;
  color: #b94b37;
  background: #fff0ec;
}

.author[data-author="xinyue"]::before { background: #ff866f; }

.author-filter[data-author="zihan"][aria-pressed="true"] { color: var(--white); background: #3972f6; }
.author-filter[data-author="hinswind"][aria-pressed="true"] { color: var(--white); background: #24866a; }
.author-filter[data-author="xinyue"][aria-pressed="true"] { color: var(--white); background: #d75d47; }

.card-index {
  color: rgba(21, 33, 61, 0.46);
  font-size: 11px;
  font-weight: 800;
}

.page-card h2 {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  min-height: 2.9em;
  max-height: 2.9em;
  margin: 18px 0 7px;
  overflow: hidden;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.path {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  color: rgba(21, 33, 61, 0.58);
  font: 10px/1.55 "Cascadia Mono", Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metadata-row {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 20px;
  align-items: center;
  gap: 4px;
  margin-top: 7px;
  overflow: hidden;
  white-space: nowrap;
}

.type-chip,
.tag-chip,
.tag-more {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  padding: 4px 6px;
  overflow: hidden;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 750;
  line-height: 1;
  text-overflow: ellipsis;
}

.type-chip {
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #f1d58c;
  color: #82600c;
  background: #fff9e6;
  font-size: 9px;
  font-weight: 850;
}

.type-chip::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e6ba2e;
  content: "";
}

.type-chip[data-type="其他"] { border-color: rgba(21, 33, 61, 0.12); color: var(--muted); background: rgba(21, 33, 61, 0.05); }
.type-chip[data-type="其他"]::before { background: #98a0b2; }
.type-chip[data-type="试玩"] { border-color: #bfd0ff; color: #2458d8; background: #edf3ff; }
.type-chip[data-type="试玩"]::before { background: #3972f6; }
.type-chip[data-type="工具"] { border-color: #b8e6d6; color: #197158; background: #ebfaf5; }
.type-chip[data-type="工具"]::before { background: #43b890; }
.type-chip[data-type="编辑器"] { border-color: #f1d58c; color: #82600c; background: #fff9e6; }
.type-chip[data-type="编辑器"]::before { background: #e6ba2e; }
.type-chip[data-type="报告"] { border-color: #ffc8bd; color: #b94b37; background: #fff0ec; }
.type-chip[data-type="报告"]::before { background: #ff866f; }

.tag-chip {
  flex: 0 0 auto;
  max-width: 64px;
  color: var(--navy-soft);
  background: rgba(220, 236, 255, 0.62);
}

.tag-more { flex: 0 0 auto; color: var(--muted); background: transparent; }

time {
  color: rgba(21, 33, 61, 0.55);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.5;
}

.open-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  color: var(--white);
  background: var(--blue);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, gap 150ms ease, transform 150ms ease;
}

.card-link:hover .open-link,
.card-link:focus-visible .open-link {
  gap: 8px;
  border-color: var(--navy);
  color: var(--navy);
  background: var(--coral);
  transform: rotate(-1deg);
}

.card-manage-actions {
  position: absolute;
  top: 16px;
  right: 14px;
  z-index: 4;
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(21, 33, 61, 0.1);
  border-radius: 999px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 3px 10px rgba(21, 33, 61, 0.09);
  pointer-events: none;
  transform: translateY(-3px) scale(0.94);
  transition: opacity 150ms ease, transform 150ms ease;
}

.card-manage-button {
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: rgba(21, 33, 61, 0.62);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.card-manage-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.manage-preview .card-index { transition: opacity 150ms ease; }
.manage-preview .page-card:hover .card-index,
.manage-preview .page-card:focus-within .card-index { opacity: 0; }

.manage-preview .page-card:hover .card-manage-actions,
.manage-preview .page-card:focus-within .card-manage-actions {
  opacity: 0.86;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.card-manage-button:hover,
.card-manage-button:focus-visible {
  outline: none;
  color: var(--blue-deep);
  background: rgba(220, 236, 255, 0.9);
  transform: translateY(-1px);
}

.card-manage-button.is-danger:hover,
.card-manage-button.is-danger:focus-visible { color: #a63421; background: #ffe0d8; }

.metadata-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--navy);
  border-radius: 26px;
  color: var(--navy);
  background: var(--paper);
  box-shadow: 12px 14px 0 rgba(21, 33, 61, 0.18);
}

.upload-dialog { max-height: calc(100dvh - 28px); overflow-y: auto; }
.delete-dialog { width: min(440px, calc(100% - 28px)); }

.metadata-dialog::backdrop {
  background: rgba(21, 33, 61, 0.42);
  backdrop-filter: blur(5px);
}

.metadata-dialog form { padding: 25px; }
.delete-dialog-content { padding: 25px; }

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.dialog-heading h2 {
  margin: 5px 0 0;
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 27px;
  line-height: 1.2;
}

.dialog-kicker {
  color: var(--blue-deep);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.dialog-close {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1.5px solid var(--navy);
  border-radius: 50%;
  color: var(--navy);
  background: var(--white);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.dialog-project {
  margin: 17px 0 20px;
  padding: 12px 14px;
  overflow-wrap: anywhere;
  border-radius: 14px;
  color: var(--navy-soft);
  background: var(--cream);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
}

.field-group {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.field-group > span { font-size: 12px; font-weight: 850; }

.field-group input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1.5px solid rgba(21, 33, 61, 0.18);
  border-radius: 13px;
  outline: none;
  color: var(--navy);
  background: var(--white);
  font-size: 12px;
}

.field-group input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(57, 114, 246, 0.14); }
.field-group small { color: var(--muted); font-size: 10px; }
.upload-file-field input[type="file"] {
  height: auto;
  min-height: 46px;
  padding: 7px;
  cursor: pointer;
}

.upload-file-field input[type="file"]::file-selector-button {
  margin-right: 10px;
  padding: 7px 10px;
  border: 1px solid rgba(21, 33, 61, 0.14);
  border-radius: 999px;
  color: var(--navy);
  background: var(--cream);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.upload-existing-project strong {
  padding: 12px 14px;
  overflow-wrap: anywhere;
  border: 1.5px solid rgba(21, 33, 61, 0.18);
  border-radius: 13px;
  color: var(--blue-deep);
  background: var(--white);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 11px;
}

.login-dialog { width: min(430px, calc(100% - 28px)); }

.remember-login {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.remember-login input {
  appearance: none;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1.5px solid var(--navy);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
}

.remember-login input::after {
  color: var(--navy);
  content: "✓";
  font-size: 13px;
  font-weight: 900;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 140ms ease, transform 140ms ease;
}

.remember-login input:checked { background: var(--yellow); }
.remember-login input:checked::after { opacity: 1; transform: scale(1); }
.remember-login input:focus-visible { outline: 3px solid rgba(57, 114, 246, 0.35); outline-offset: 2px; }

.metadata-type-select .select-trigger {
  height: 46px;
  background: var(--white);
}

.metadata-type-select .select-menu {
  z-index: 60;
  max-height: 218px;
}

.upload-dialog .metadata-type-select .select-menu {
  z-index: 80;
  top: auto;
  bottom: calc(100% + 8px);
  max-height: 188px;
  padding: 6px;
  border-radius: 18px;
  background: linear-gradient(145deg, #fffdf4, #edf5ff);
  box-shadow: 0 16px 34px rgba(35, 54, 91, 0.22), 4px 4px 0 rgba(57, 114, 246, 0.14);
  transform-origin: bottom center;
  animation: upload-type-menu-in 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.upload-dialog .metadata-type-select .select-option {
  min-height: 32px;
  padding: 5px 9px 5px 11px;
  border-radius: 11px;
}

.select-option-create {
  gap: 7px;
  margin-top: 4px;
  border-top: 1px dashed rgba(57, 114, 246, 0.28);
  border-radius: 11px;
  color: var(--blue);
  font-weight: 800;
}

.select-option-create > span:first-child {
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--blue);
  font-size: 15px;
  line-height: 1;
}

.type-dialog { width: min(420px, calc(100% - 28px)); }

@keyframes upload-type-menu-in {
  from { opacity: 0; transform: translateY(5px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-note {
  margin-top: 18px;
  padding: 11px 13px;
  border-left: 4px solid var(--coral);
  border-radius: 0 12px 12px 0;
  color: var(--navy-soft);
  background: #fff0ec;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.55;
}

.dialog-note.is-error {
  border-left-color: #b94b37;
  color: #8a260f;
  background: #fff0ec;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.dialog-actions button {
  min-height: 40px;
  padding: 0 17px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
}

.danger-action {
  min-height: 40px;
  padding: 0 17px;
  border: 1.5px solid var(--navy);
  border-radius: 999px;
  color: var(--white);
  background: var(--coral);
  box-shadow: 3px 3px 0 rgba(21, 33, 61, 0.16);
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.danger-action:disabled { cursor: wait; opacity: 0.62; }
.delete-note { margin-top: 16px; }

.feedback-toast {
  position: fixed;
  z-index: 2147483647;
  inset: auto;
  top: 50%;
  left: 50%;
  margin: 0;
  display: flex;
  width: max-content;
  max-width: min(440px, calc(100vw - 32px));
  align-items: center;
  gap: 14px;
  padding: 13px 14px 13px 16px;
  border: 1px solid rgba(21, 33, 61, 0.2);
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  color: var(--navy);
  background: #fffdf7;
  box-shadow: 0 14px 32px rgba(21, 33, 61, 0.18);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  transform: translate(-50%, -50%);
}

.feedback-toast:not([open]) { display: none; }
.feedback-toast::backdrop { background: transparent; }

.feedback-toast.is-error { border-left-color: var(--coral); color: #8a260f; }

.feedback-toast button {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 4px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.secondary-action { color: var(--navy); background: var(--white); }
.primary-action { color: var(--navy); background: var(--yellow); box-shadow: 0 4px 0 rgba(21, 33, 61, 0.14); }
.primary-action:disabled { cursor: wait; opacity: 0.62; transform: none; }

.author-filter:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 84px 24px;
  border: 1.5px dashed var(--navy);
  border-radius: 26px;
  color: var(--navy-soft);
  background: rgba(255, 255, 255, 0.58);
  font-family: "YouYuan", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  text-align: center;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex: 0 0 auto;
  margin-top: 14px;
  padding: 18px 4px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

noscript {
  display: block;
  padding: 20px;
  color: #8a260f;
  text-align: center;
}

@media (max-width: 1120px) {
  .page-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 940px) {
  .masthead { padding: 14px 26px; }
  .page-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toolbar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-box { grid-column: 1 / -1; }
}

@media (max-width: 650px) {
  body {
    background:
      radial-gradient(circle at 4% 10%, rgba(124, 224, 189, 0.32) 0 4rem, transparent 4.1rem),
      linear-gradient(180deg, #fffdf7 0%, #fff8e7 100%);
  }

  .page-shell { width: min(100% - 24px, 1200px); min-height: 100dvh; padding: 12px 0 10px; }
  .masthead { height: 102px; flex-basis: 102px; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; padding: 12px 16px; border-radius: 24px; }
  .eyebrow,
  .intro { display: none; }
  h1 { font-size: 38px; letter-spacing: -0.04em; }
  .page-total { width: 72px; height: 72px; box-shadow: 4px 4px 0 rgba(21, 33, 61, 0.16); }
  .page-total strong { font-size: 31px; }
  .page-total span { margin-top: 6px; font-size: 7px; }
  .manage-preview .page-total.upload-entry::after { font-size: 48px; }
  .manage-preview .page-total.upload-entry { transform: translateY(-4px) rotate(3deg); }
  .manage-preview .page-total.upload-entry:hover { transform: translateY(-4px) rotate(5deg) scale(1.05); }
  .manage-preview .account-badge { bottom: -8px; }
  .toolbar { margin: 12px 0 8px; padding: 7px; border-radius: 18px; }
  .search-box input { height: 40px; }
  .select-trigger { height: 40px; padding: 0 14px; font-size: 11px; }
  .select-menu { border-radius: 16px; }
  .result-meta { margin-bottom: 7px; }
  .page-grid { grid-template-columns: 1fr; }
  .page-card { min-height: 230px; }
  .page-card:has(.metadata-row) { min-height: 254px; }
  .footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
