:root {
  --ink: #f4f4f7;
  --muted: rgba(255, 255, 255, 0.55);
  --dim: rgba(255, 255, 255, 0.32);
  --line: rgba(255, 255, 255, 0.1);
  --glass: rgba(255, 255, 255, 0.1);
  --accent: #ec4899;
  --radius: 18px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #0d0d12;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* ---------------- 公共页 ---------------- */

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 0;
}

.stage-bg,
.stage-scrim {
  position: fixed;
  inset: 0;
  max-width: 520px;
  margin: 0 auto;
  pointer-events: none;
}

.stage-bg {
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.stage-scrim {
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(6, 6, 10, 0.6) 0%,
    rgba(6, 6, 10, 0.2) 34%,
    rgba(6, 6, 10, 0) 60%,
    rgba(6, 6, 10, 0.12) 100%
  );
}

.stage > *:not(.stage-bg):not(.stage-scrim) {
  position: relative;
  z-index: 2;
}

/* 下半部分：半透明面板，背景图保持清晰，只压暗不模糊 */
.sheet {
  flex: 1 0 auto;
  margin-top: 22px;
  border-radius: 26px 26px 0 0;
  background: rgba(10, 10, 14, 0.34);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  min-height: 58vh;
  padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  overflow: hidden;
}

.hero {
  flex: 0 0 auto;
  padding: 54px 20px 18px;
  text-align: center;
}

.avatar-ring {
  width: 104px;
  height: 104px;
  margin: 0 auto 16px;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent), #ffffff55, var(--accent));
}

.avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #1b1b22;
  display: block;
}

.avatar-ph {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #1b1b22;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  font-weight: 700;
  color: var(--accent);
}

.p-title {
  margin: 0;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.65);
  word-break: break-word;
}

.p-desc {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 16px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #17171c;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s;
}

.pill:active {
  transform: scale(0.96);
}

.pill svg {
  opacity: 0.7;
}

.filters {
  padding: 16px 16px 10px;
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.search {
  width: 100%;
  padding: 11px 16px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 14px;
  outline: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  -webkit-appearance: none;
  appearance: none;
}

.search::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 2px;
  scrollbar-width: none;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 0 0 auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background: rgba(255, 255, 255, 0.13);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.78);
  white-space: nowrap;
  cursor: pointer;
  transition: 0.15s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.chip.on {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.chip-group-label {
  font-size: 11px;
  color: var(--dim);
  letter-spacing: 1px;
  padding: 8px 0 0;
}

.count {
  padding: 4px 16px 0;
  font-size: 12px;
  color: var(--dim);
}

.list {
  padding: 6px 16px 0;
}

.thead {
  display: flex;
  padding: 8px 6px;
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 1px;
  border-bottom: 1px solid var(--line);
}

.thead .c1 {
  flex: 1;
}

.thead .c2 {
  width: 38%;
}

.row {
  display: flex;
  align-items: center;
  padding: 13px 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  animation: fade 0.25s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
}

.row .c1 {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.row .c2 {
  width: 38%;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.tags {
  display: flex;
  gap: 5px;
  margin-top: 3px;
}

.tag {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.62);
}

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.foot {
  margin-top: 36px;
  text-align: center;
  font-size: 11.5px;
  color: var(--dim);
  letter-spacing: 1px;
}

.foot a {
  display: inline-block;
  margin-bottom: 12px;
  padding: 11px 26px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink);
}

/* ---------------- 编辑/列表页 ---------------- */

.panel {
  padding: 20px 16px 40px;
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 8px;
}

.bar h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.mini {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

.card {
  background: #14141a;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
}

.field {
  margin-top: 12px;
}

.field:first-child {
  margin-top: 0;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--dim);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  background: #0e0e13;
  border: 1px solid var(--line);
  font-size: 14px;
  outline: none;
}

.field textarea {
  min-height: 130px;
  resize: vertical;
  line-height: 1.6;
}

.btn {
  display: block;
  width: 100%;
  padding: 13px;
  margin-top: 12px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #0b0b10;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 400;
}

.btn.danger {
  background: transparent;
  border: 1px solid rgba(255, 90, 90, 0.4);
  color: #ff6b6b;
  font-weight: 400;
}

.swatch-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.swatch {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 2px solid transparent;
  cursor: pointer;
}

.swatch.on {
  border-color: #fff;
}

.upload {
  display: flex;
  gap: 10px;
  align-items: center;
}

.thumb {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: #0e0e13;
  border: 1px solid var(--line);
}

.tr-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tr-row .name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tr-row .sub {
  font-size: 11.5px;
  color: var(--dim);
  margin-top: 2px;
}

.tr-row select {
  padding: 5px 6px;
  border-radius: 8px;
  background: #0e0e13;
  border: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
}

.x {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  flex: 0 0 auto;
}

.hint {
  font-size: 12px;
  color: var(--dim);
  line-height: 1.7;
  margin-top: 10px;
}

/* ---------------- 二维码弹层 ---------------- */

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  padding: 20px;
}

.modal-box {
  width: 100%;
  max-width: 340px;
  background: #14141a;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  text-align: center;
}

.modal-box h3 {
  margin: 0 0 4px;
  font-size: 16px;
}

.modal-box p {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--dim);
}

.qr-canvas {
  width: 260px;
  height: 260px;
  border-radius: 14px;
  background: #fff;
  display: block;
  margin: 0 auto;
}

.url-input {
  width: 100%;
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #0e0e13;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
