:root {
  --ink: #151515;
  --muted: #66625c;
  --line: rgba(21, 21, 21, 0.12);
  --shadow: 0 16px 36px rgba(30, 28, 22, 0.12);
  --yellow: #ffe45c;
  --pink: #ff5cbe;
  --blue: #43d9ff;
  --green: #76f06d;
  --orange: #ff9d42;
  --card-color: var(--yellow);
  --card-ink: var(--ink);
  --card-muted: rgba(21, 21, 21, 0.68);
  --card-border: rgba(21, 21, 21, 0.86);
  --card-line: rgba(21, 21, 21, 0.18);
  --card-soft-bg: rgba(255, 255, 255, 0.62);
  --card-hint-bg: rgba(255, 255, 255, 0.72);
  --detail-color: var(--yellow);
  --detail-ink: var(--ink);
  --detail-muted: rgba(21, 21, 21, 0.68);
  --detail-border: rgba(21, 21, 21, 0.86);
  --detail-line: rgba(21, 21, 21, 0.18);
  --detail-soft-bg: rgba(255, 255, 255, 0.62);
  --form-color: var(--yellow);
  --form-ink: var(--ink);
  --form-muted: rgba(21, 21, 21, 0.68);
  --form-border: rgba(21, 21, 21, 0.86);
  --form-line: rgba(21, 21, 21, 0.18);
  --form-soft-bg: rgba(255, 255, 255, 0.62);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 92, 190, 0.28), transparent 26%),
    radial-gradient(circle at 90% 4%, rgba(67, 217, 255, 0.34), transparent 24%),
    radial-gradient(circle at 80% 88%, rgba(118, 240, 109, 0.32), transparent 30%),
    linear-gradient(135deg, #fffdf4 0%, #fff4dd 100%);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body.is-leaving .page {
  opacity: 0;
  transform: translateY(12px) scale(0.985);
}

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

body::before {
  width: 280px;
  height: 110px;
  top: 88px;
  left: -64px;
  border-radius: 999px;
  background: var(--yellow);
  transform: rotate(-18deg);
  opacity: 0.82;
  animation: blobSlideIn 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both, blobFloat 12s 900ms ease-in-out infinite alternate;
}

body::after {
  width: 150px;
  height: 150px;
  right: 9vw;
  bottom: 72px;
  border: 18px solid var(--orange);
  border-radius: 42px;
  transform: rotate(18deg);
  opacity: 0.64;
  animation: ringPopIn 820ms 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both, ringDrift 14s 1s ease-in-out infinite alternate;
}

.page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0 80px;
  transition: opacity 260ms ease, transform 260ms ease;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 32px;
  align-items: end;
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.12em;
}

.eyebrow::before {
  flex: 0 0 auto;
  width: 44px;
  height: 14px;
  border: 1px solid rgba(21, 21, 21, 0.18);
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink) 0 33%, var(--yellow) 33% 66%, var(--blue) 66% 100%);
  content: "";
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.auth-eyebrow {
  cursor: default;
}

.auth-eyebrow::before {
  cursor: pointer;
}

h1 {
  max-width: 760px;
  margin: 18px 0 0;
  font-family: "Microsoft JhengHei UI", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.92;
  letter-spacing: -0.08em;
}

.lead {
  max-width: 420px;
  margin: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
  box-shadow: 0 12px 26px rgba(30, 28, 22, 0.08);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, 224px);
  gap: 24px;
  justify-content: center;
  align-items: start;
}

.person-card {
  position: relative;
  width: 224px;
  height: 360px;
  padding: 10px 10px 14px;
  border: 1px solid rgba(21, 21, 21, 0.13);
  border-radius: 30px;
  background: var(--card-color);
  color: var(--card-ink);
  box-shadow: var(--shadow);
  cursor: pointer;
  overflow: hidden;
  animation: rise 680ms cubic-bezier(0.2, 0.7, 0.25, 1) both;
  transition: transform 220ms ease, outline-color 220ms ease, background 220ms ease, color 220ms ease, border-color 220ms ease;
  will-change: transform;
}

.person-card::before {
  position: absolute;
  inset: 10px 10px auto auto;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  background: var(--card-soft-bg);
  content: "";
  transform: rotate(12deg);
  z-index: 1;
}

.person-card::after {
  position: absolute;
  inset: -70px auto auto -96px;
  width: 74px;
  height: 440px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.48), transparent);
  content: "";
  opacity: 0;
  transform: rotate(18deg) translateX(0);
  transition: opacity 220ms ease, transform 520ms ease;
}

.person-card:hover {
  transform: translateY(-8px) rotate(-1deg);
}

.person-card:hover::after,
.person-card:focus-visible::after {
  opacity: 1;
  transform: rotate(18deg) translateX(360px);
}

.person-card:active {
  transform: translateY(-3px) rotate(-0.5deg) scale(0.98);
}

.person-card:focus-visible,
.back-link:focus-visible {
  outline: 3px solid rgba(21, 21, 21, 0.86);
  outline-offset: 5px;
}

.photo-frame {
  width: 204px;
  height: 214px;
  border: 2px solid var(--card-border);
  border-radius: 23px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms ease;
}

.person-card:hover img {
  transform: scale(1.06);
}

.card-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 116px;
  padding: 8px 6px 0;
}

.name {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.card-meta {
  display: grid;
  gap: 4px;
  margin: 6px 0 0;
}

.card-meta div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

.card-meta dt,
.card-meta dd {
  margin: 0;
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}

.card-meta dt {
  padding: 2px 5px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--card-hint-bg);
  color: var(--card-ink);
  font-weight: 900;
  text-align: center;
}

.card-meta dd {
  overflow: hidden;
  color: var(--card-muted);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dot {
  width: 18px;
  height: 18px;
  border: 2px solid var(--card-border);
  border-radius: 50%;
  background: var(--card-soft-bg);
  box-shadow: -8px 8px 0 var(--card-line);
}

.card-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 5px 9px;
  border: 1px solid var(--card-line);
  border-radius: 999px;
  background: var(--card-hint-bg);
  color: var(--card-ink);
  font-size: 11px;
  font-weight: 900;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 180ms ease, transform 180ms ease, background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.person-card:hover .card-hint,
.person-card:focus-visible .card-hint {
  opacity: 1;
  transform: translateY(0);
}

.note {
  margin: 32px auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.error {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px solid rgba(255, 92, 92, 0.35);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  color: #9b2525;
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-bottom: 24px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 22px rgba(30, 28, 22, 0.08);
  transition: transform 180ms ease;
}

.back-link:hover {
  transform: translateX(-4px);
}

.detail-shell {
  width: min(1180px, calc(100% - 40px));
}

.detail-loading {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 30px;
  align-items: stretch;
  margin-bottom: 24px;
}

.detail-copy,
.detail-portrait,
.detail-panel {
  border: 1px solid rgba(21, 21, 21, 0.13);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
}

.detail-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: 34px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.42)),
    radial-gradient(circle at 18% 20%, var(--detail-color), transparent 34%);
  transition: background 220ms ease, color 220ms ease;
}

.detail-subtitle {
  max-width: 620px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 2px solid var(--detail-border);
  border-radius: 999px;
  background: var(--detail-color);
  color: var(--detail-ink);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 5px 5px 0 rgba(21, 21, 21, 0.16);
  cursor: pointer;
  font-family: inherit;
  transition: transform 180ms ease, background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.mini-button:hover {
  transform: translate(-2px, -2px);
}

.detail-portrait {
  position: relative;
  min-height: 360px;
  padding: 14px;
  background: var(--detail-color);
  color: var(--detail-ink);
  overflow: hidden;
  transition: background 220ms ease, color 220ms ease;
}

.detail-portrait::after {
  position: absolute;
  right: -32px;
  bottom: -36px;
  width: 140px;
  height: 140px;
  border: 20px solid rgba(255, 255, 255, 0.48);
  border-radius: 42px;
  content: "";
  transform: rotate(18deg);
}

.detail-portrait img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 332px;
  border: 2px solid var(--detail-border);
  border-radius: 26px;
  object-fit: cover;
}

.detail-panel {
  margin-top: 24px;
  padding: 28px;
  content-visibility: auto;
  contain-intrinsic-size: 1px 420px;
  transition: transform 200ms ease;
}

.detail-panel:hover {
  transform: translateY(-3px);
}

.section-title {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

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

.info-item,
.value-card,
.skill-card {
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.58);
}

.info-item {
  min-height: 88px;
  padding: 16px;
  transition: transform 180ms ease, background 180ms ease;
}

.info-item:hover,
.value-card:hover,
.skill-card:hover {
  background: rgba(255, 255, 255, 0.78);
  transform: translateY(-3px);
}

.info-label,
.value-name {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.info-value,
.value-number {
  display: block;
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.3;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.tag {
  padding: 8px 12px;
  border: 2px solid var(--detail-border);
  border-radius: 999px;
  background: var(--detail-color);
  color: var(--detail-ink);
  font-size: 13px;
  font-weight: 900;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.story-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.9;
}

.story-text + .story-text {
  margin-top: 12px;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.value-card {
  position: relative;
  padding: 16px;
  text-align: center;
  overflow: hidden;
  transition: transform 180ms ease, background 180ms ease;
}

.value-number {
  font-size: 26px;
}

.value-bar {
  display: block;
  height: 7px;
  margin-top: 12px;
  border: 1px solid rgba(21, 21, 21, 0.18);
  border-radius: 999px;
  background: rgba(21, 21, 21, 0.08);
  overflow: hidden;
}

.value-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--detail-color);
}

.skill-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.skill-card {
  position: relative;
  padding: 18px;
  overflow: hidden;
  transition: transform 180ms ease, background 180ms ease;
}

.skill-card::before {
  position: absolute;
  inset: auto 14px 14px auto;
  width: 48px;
  height: 48px;
  border-radius: 18px;
  background: var(--detail-color);
  content: "";
  opacity: 0.4;
  transform: rotate(12deg);
}

.skill-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  margin-bottom: 10px;
  border: 1px solid var(--detail-line);
  border-radius: 999px;
  background: var(--detail-color);
  color: var(--detail-ink);
  font-size: 12px;
  font-weight: 900;
}

.skill-title {
  margin: 0 0 10px;
  font-size: 18px;
}

.skill-desc {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.skill-desc + .skill-desc {
  margin-top: 6px;
}

.skill-desc--blank {
  min-height: 1.7em;
}

.skill-mechanism {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--detail-line);
  border-radius: 24px;
  background: var(--detail-soft-bg);
}

.skill-mechanism__title {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 2px solid var(--detail-border);
  border-radius: 18px;
  background: var(--detail-color);
  cursor: zoom-in;
  object-fit: cover;
  transition: transform 180ms ease, background 220ms ease, border-color 220ms ease;
}

.gallery img:hover,
.gallery img:focus-visible {
  transform: translateY(-5px) rotate(-1deg);
  outline: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 14px;
  padding: 24px;
  background: rgba(21, 21, 21, 0.72);
  animation: fadeIn 180ms ease both;
}

.is-lightbox-open {
  overflow: hidden;
}

.lightbox-viewport {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 28px;
  touch-action: none;
  user-select: none;
}

.lightbox-image {
  max-width: 96vw;
  max-height: calc(100vh - 132px);
  border: 3px solid rgba(255, 255, 255, 0.84);
  border-radius: 24px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.35);
  cursor: zoom-in;
  image-rendering: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 180ms ease;
  will-change: transform;
}

.lightbox-image.is-draggable {
  cursor: grab;
}

.lightbox-image.is-draggable:active {
  cursor: grabbing;
}

.lightbox-image.is-panning {
  transition: none;
}

.lightbox-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
}

.lightbox-controls button {
  min-width: 48px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  transition: transform 160ms ease, background 160ms ease;
}

.lightbox-controls button:hover,
.lightbox-controls button:focus-visible {
  background: #ffffff;
  outline: none;
  transform: translateY(-2px);
}

.lightbox-close {
  position: fixed;
  top: 22px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--detail-color);
  color: var(--detail-ink);
  cursor: pointer;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
  transition: background 220ms ease, color 220ms ease, transform 160ms ease;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 228, 92, 0.24), transparent 28%),
    radial-gradient(circle at 72% 78%, rgba(67, 217, 255, 0.18), transparent 26%),
    rgba(255, 253, 244, 0.46);
  backdrop-filter: blur(8px) saturate(1.04);
  animation: fadeIn 160ms ease both;
}

.auth-dialog {
  position: relative;
  width: min(430px, 100%);
  padding: 30px;
  border: 1px solid rgba(21, 21, 21, 0.16);
  border-radius: 32px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 232, 0.72)),
    radial-gradient(circle at 16% 14%, rgba(255, 228, 92, 0.28), transparent 34%);
  box-shadow:
    0 24px 56px rgba(30, 28, 22, 0.14),
    0 8px 22px rgba(30, 28, 22, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.auth-dialog h2 {
  margin: 18px 0 10px;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.auth-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 50%;
  background: rgba(255, 92, 190, 0.24);
  color: var(--ink);
  cursor: pointer;
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.auth-field {
  display: grid;
  gap: 10px;
  margin-top: 22px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.auth-field input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid rgba(21, 21, 21, 0.28);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 228, 92, 0.16), transparent 36%),
    rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.auth-field input:focus {
  border-color: var(--blue);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 0 4px rgba(67, 217, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.auth-message {
  min-height: 24px;
  margin-top: 12px !important;
  font-size: 14px;
  font-weight: 800;
}

.auth-submit {
  border: 2px solid rgba(21, 21, 21, 0.82);
  border-radius: 999px;
  background: var(--ink);
  color: #fffdf4;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: transform 160ms ease, background 160ms ease;
}

.auth-submit {
  width: 100%;
  margin-top: 18px;
  padding: 15px 18px;
  box-shadow: 0 10px 22px rgba(21, 21, 21, 0.12);
}

.auth-submit:hover {
  background: var(--pink);
  color: var(--ink);
  transform: translateY(-2px);
}

.auth-submit:focus-visible,
.auth-close:focus-visible {
  outline: 3px solid rgba(21, 21, 21, 0.86);
  outline-offset: 4px;
}

.quick-menu {
  width: 100%;
  margin-top: 26px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background:
    radial-gradient(circle at 16% 12%, rgba(255, 92, 190, 0.28), transparent 26%),
    radial-gradient(circle at 84% 18%, rgba(67, 217, 255, 0.3), transparent 26%),
    linear-gradient(135deg, rgba(255, 253, 244, 0.98), rgba(255, 244, 221, 0.98));
  box-shadow: var(--shadow);
  animation: fadeIn 160ms ease both;
}

.quick-menu__shell {
  display: grid;
  grid-template-rows: auto auto auto auto auto;
  gap: 18px;
  width: 100%;
  padding: clamp(18px, 4vw, 44px);
}

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

.quick-menu__header h2 {
  margin: 18px 0 10px;
  font-size: clamp(36px, 7vw, 76px);
  line-height: 0.94;
  letter-spacing: -0.07em;
}

.quick-menu__header p,
.quick-menu__message,
.quick-menu__footer p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.quick-actions button,
.quick-action-link,
.quick-deletebar button,
.quick-menu__footer button {
  border: 2px solid rgba(21, 21, 21, 0.82);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, background 160ms ease, opacity 160ms ease;
}

.quick-actions button,
.quick-action-link {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.68);
}

.quick-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.quick-actions button:hover,
.quick-action-link:hover,
.quick-deletebar button:hover {
  transform: translateY(-2px);
}

.quick-deletebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(21, 21, 21, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.58);
}

.quick-deletebar strong {
  font-size: 18px;
}

.quick-deletebar div {
  display: flex;
  gap: 10px;
}

.quick-deletebar button {
  padding: 10px 14px;
  background: var(--yellow);
}

.quick-menu__message {
  min-height: 28px;
  font-weight: 800;
}

.quick-menu__message[data-type="success"] {
  color: #1c7d34;
}

.quick-menu__message[data-type="error"] {
  color: #bd255f;
}

.operation-feedback {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 70;
  max-width: min(360px, calc(100vw - 36px));
  padding: 14px 16px;
  border: 2px solid rgba(21, 21, 21, 0.82);
  border-radius: 22px;
  background: rgba(255, 253, 244, 0.94);
  color: var(--ink);
  font-weight: 900;
  line-height: 1.5;
  box-shadow: 0 20px 48px rgba(30, 28, 22, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease, background 180ms ease;
}

.operation-feedback.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.operation-feedback[data-type="success"] {
  background: rgba(118, 240, 109, 0.94);
}

.operation-feedback[data-type="error"] {
  background: rgba(255, 92, 190, 0.94);
}

.quick-menu__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 16px;
  padding: 4px 4px 16px;
}

.quick-character {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 244px;
  padding: 12px;
  border: 2px solid rgba(21, 21, 21, 0.12);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 14px 30px rgba(30, 28, 22, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.quick-character:hover {
  transform: translateY(-4px);
  border-color: rgba(21, 21, 21, 0.38);
}

.quick-character.is-selected {
  border-color: rgba(255, 92, 190, 0.94);
  background:
    linear-gradient(135deg, rgba(255, 92, 190, 0.18), rgba(255, 228, 92, 0.18)),
    rgba(255, 255, 255, 0.78);
  box-shadow:
    0 16px 34px rgba(30, 28, 22, 0.1),
    0 0 0 5px rgba(255, 92, 190, 0.12);
}

.quick-character__check {
  justify-self: start;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--card-color);
  color: var(--card-ink);
  font-size: 12px;
  font-weight: 900;
  transition: background 220ms ease, color 220ms ease;
}

.quick-character.is-selected .quick-character__check {
  background: var(--card-color);
  box-shadow: 0 0 0 3px var(--card-line);
}

.quick-character img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 2px solid rgba(21, 21, 21, 0.76);
  border-radius: 20px;
  object-fit: cover;
}

.quick-character strong {
  font-size: 19px;
  letter-spacing: -0.03em;
}

.quick-character small {
  color: var(--muted);
  font-weight: 800;
}

.quick-empty {
  align-self: start;
  margin: 0;
  padding: 28px;
  border: 1px dashed rgba(21, 21, 21, 0.26);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--muted);
  font-weight: 800;
}

.quick-form {
  --form-color: var(--yellow);
  --form-ink: var(--ink);
  --form-muted: rgba(21, 21, 21, 0.68);
  --form-border: rgba(21, 21, 21, 0.86);
  --form-line: rgba(21, 21, 21, 0.18);
  --form-soft-bg: rgba(255, 255, 255, 0.62);
  display: grid;
  grid-column: 1 / -1;
  gap: 18px;
  align-self: start;
  padding: 18px;
  border: 1px solid rgba(21, 21, 21, 0.16);
  border-radius: 30px;
  background:
    linear-gradient(135deg, var(--form-soft-bg), rgba(255, 255, 255, 0.62)),
    rgba(255, 255, 255, 0.62);
  box-shadow: 0 16px 36px rgba(30, 28, 22, 0.1);
  transition: background 220ms ease;
}

.quick-form__section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 24px;
  background: rgba(255, 253, 244, 0.62);
}

.quick-form__section h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.quick-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.quick-section-title span {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(67, 217, 255, 0.2);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.quick-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

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

.quick-form__stack,
.quick-background-list {
  display: grid;
  gap: 12px;
}

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

.quick-image-help,
.quick-image-status {
  margin: 0;
  color: rgba(102, 98, 92, 0.8);
  font-size: 13px;
  font-weight: 800;
}

.quick-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.quick-image-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 10px;
  border: 1px solid rgba(21, 21, 21, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 26px rgba(30, 28, 22, 0.08);
  transition: opacity 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.quick-image-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(30, 28, 22, 0.12);
}

.quick-image-card.is-dragging {
  opacity: 0.55;
  transform: scale(0.98);
}

.quick-image-frame,
.quick-image-add {
  aspect-ratio: 1 / 1;
}

.quick-image-frame {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(21, 21, 21, 0.08);
}

.quick-image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.quick-image-card strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.quick-image-actions button,
.quick-image-add {
  border: 2px solid rgba(21, 21, 21, 0.76);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.quick-image-actions button {
  min-height: 38px;
  background: rgba(67, 217, 255, 0.22);
}

.quick-image-actions button[data-delete-image] {
  background: rgba(255, 92, 190, 0.22);
}

.quick-image-actions button:disabled,
.quick-image-add:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.quick-image-restore {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border: 1px dashed rgba(21, 21, 21, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.48);
}

.quick-image-restore strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.quick-image-restore button {
  min-height: 34px;
  border: 2px solid rgba(21, 21, 21, 0.76);
  border-radius: 999px;
  background: rgba(255, 228, 92, 0.32);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.quick-image-restore button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.quick-image-add {
  min-height: 150px;
  width: 100%;
  border-style: dashed;
  border-radius: 24px;
  background: rgba(255, 228, 92, 0.3);
  place-items: center;
}

.quick-image-add span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  font-size: 34px;
  line-height: 1;
}

.quick-image-add small {
  color: rgba(102, 98, 92, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.quick-image-status[data-type="error"] {
  color: #d6285f;
}

.quick-image-status[data-type="info"] {
  color: #277b92;
}

.quick-form label,
.quick-skill,
.quick-value {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.quick-value {
  align-content: start;
  padding: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.56);
}

.quick-form input,
.quick-form textarea,
.quick-form select {
  width: 100%;
  border: 1px solid rgba(21, 21, 21, 0.18);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  outline: none;
}

.quick-form input,
.quick-form select {
  min-height: 44px;
  padding: 10px 12px;
}

.quick-form input[type="color"] {
  padding: 5px;
}

.quick-theme-control {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.quick-theme-preview {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border: 2px solid var(--form-border);
  border-radius: 16px;
  background: var(--form-color);
  color: var(--form-ink);
  font-size: 12px;
  font-weight: 900;
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.quick-form textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

.quick-form input:focus,
.quick-form textarea:focus,
.quick-form select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(67, 217, 255, 0.16);
}

.quick-form input::placeholder,
.quick-form textarea::placeholder {
  color: rgba(102, 98, 92, 0.58);
}

.quick-date-control {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.quick-date-control button {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid rgba(21, 21, 21, 0.2);
  border-radius: 16px;
  background: rgba(67, 217, 255, 0.2);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.quick-date-control__picker {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.quick-unit-control {
  position: relative;
}

.quick-unit-control em {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: rgba(102, 98, 92, 0.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  pointer-events: none;
  white-space: nowrap;
}

.quick-unit-control input {
  padding-right: 46px;
}

.quick-background-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.quick-background-item button,
.quick-add-button,
.quick-tag-add button {
  min-height: 42px;
  padding: 10px 14px;
  border: 2px solid rgba(21, 21, 21, 0.78);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.quick-background-item button {
  background: rgba(255, 92, 190, 0.24);
}

.quick-add-button {
  justify-self: start;
}

.quick-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-height: 48px;
  padding: 10px;
  border: 1px dashed rgba(21, 21, 21, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.46);
}

.quick-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px 9px 14px;
  border: 2px solid rgba(21, 21, 21, 0.78);
  border-radius: 999px;
  background: rgba(67, 217, 255, 0.24);
  cursor: grab;
  font-size: 13px;
  font-weight: 900;
}

.quick-tag.is-dragging {
  opacity: 0.48;
}

.quick-tag button {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--pink);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
}

.quick-tag-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.quick-value strong {
  color: var(--ink);
  font-size: 16px;
}

.quick-value__control {
  position: relative;
}

.quick-value__control em {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: rgba(102, 98, 92, 0.78);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  pointer-events: none;
  white-space: nowrap;
}

.quick-value__control input {
  padding-right: 74px;
}

.quick-value__error {
  min-height: 18px;
  color: #d6285f;
  font-size: 12px;
  font-weight: 900;
}

.quick-form__actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 10px;
  background: linear-gradient(180deg, transparent, rgba(255, 253, 244, 0.92) 28%);
}

.quick-save-feedback {
  position: sticky;
  bottom: 72px;
  z-index: 1;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(21, 21, 21, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.6;
}

.quick-save-feedback:empty {
  display: none;
}

.quick-save-feedback[data-type="success"] {
  border-color: rgba(28, 125, 52, 0.28);
  background: rgba(118, 240, 109, 0.22);
  color: #1c7d34;
}

.quick-save-feedback[data-type="error"] {
  border-color: rgba(189, 37, 95, 0.28);
  background: rgba(255, 92, 190, 0.18);
  color: #bd255f;
}

.quick-form__actions button {
  min-width: 132px;
  padding: 13px 18px;
  border: 2px solid rgba(21, 21, 21, 0.82);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.quick-form__actions button[type="submit"] {
  background: var(--form-color);
  color: var(--form-ink);
  border-color: var(--form-border);
  transition: background 220ms ease, color 220ms ease, border-color 220ms ease, transform 160ms ease;
}

.quick-form__actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.quick-menu__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(21, 21, 21, 0.16);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 16px 36px rgba(30, 28, 22, 0.1);
}

.quick-menu__footer button {
  flex: 0 0 auto;
  padding: 13px 18px;
  background: var(--pink);
}

.quick-menu__footer button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.quick-actions button:focus-visible,
.quick-action-link:focus-visible,
.quick-deletebar button:focus-visible,
.quick-character:focus-visible,
.quick-menu__footer button:focus-visible,
.quick-form__actions button:focus-visible {
  outline: 3px solid rgba(21, 21, 21, 0.86);
  outline-offset: 4px;
}

.morephotos-panel .quick-menu__shell {
  grid-template-rows: auto auto auto auto;
}

.morephotos-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.morephotos-actions button {
  min-height: 42px;
  padding: 10px 14px;
  border: 2px solid rgba(21, 21, 21, 0.82);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.morephotos-actions button[data-upload-trigger] {
  background: var(--yellow);
}

.morephotos-actions button:hover {
  transform: translateY(-2px);
}

.morephotos-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.morephotos-filter,
.morephotos-gallery-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  border-radius: 28px;
  background: rgba(255, 253, 244, 0.62);
}

.morephotos-character-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.morephotos-character {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 12px;
  border: 2px solid rgba(21, 21, 21, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.58);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.morephotos-character:has(input:checked) {
  border-color: rgba(21, 21, 21, 0.72);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-color) 28%, transparent), rgba(255, 255, 255, 0.72)),
    rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 24px rgba(30, 28, 22, 0.1);
}

.morephotos-character:hover {
  transform: translateY(-2px);
}

.morephotos-character input {
  width: 18px;
  height: 18px;
  accent-color: var(--pink);
}

.morephotos-character span {
  overflow: hidden;
  color: var(--ink);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.morephotos-character small {
  grid-column: 2;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.morephotos-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 16px;
  min-height: 160px;
}

.morephotos-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 12px;
  border: 1px solid rgba(21, 21, 21, 0.14);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 14px 30px rgba(30, 28, 22, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.morephotos-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 36px rgba(30, 28, 22, 0.12);
}

.morephotos-card__frame {
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(21, 21, 21, 0.76);
  border-radius: 20px;
  background: rgba(21, 21, 21, 0.08);
}

.morephotos-card__frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.morephotos-card__body {
  display: grid;
  gap: 7px;
}

.morephotos-card__body strong,
.morephotos-card__body small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.morephotos-card__body strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.morephotos-card__body small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.morephotos-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.morephotos-card__tags span {
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(67, 217, 255, 0.22);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.morephotos-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.morephotos-card__actions button {
  min-height: 38px;
  border: 2px solid rgba(21, 21, 21, 0.76);
  border-radius: 999px;
  background: rgba(67, 217, 255, 0.22);
  color: var(--ink);
  cursor: pointer;
  font-weight: 900;
}

.morephotos-card__actions button[data-delete-photo] {
  background: rgba(255, 92, 190, 0.22);
}

.is-morephotos-busy .morephotos-card__actions button {
  cursor: not-allowed;
  opacity: 0.48;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes blobSlideIn {
  from {
    opacity: 0;
    transform: translate(-36px, -18px) rotate(-24deg) scale(0.88);
  }

  to {
    opacity: 0.82;
    transform: translate(0, 0) rotate(-18deg) scale(1);
  }
}

@keyframes blobFloat {
  from {
    transform: translate(0, 0) rotate(-18deg) scale(1);
  }

  to {
    transform: translate(28px, 18px) rotate(-13deg) scale(1.04);
  }
}

@keyframes ringPopIn {
  from {
    opacity: 0;
    transform: translate(28px, 30px) rotate(2deg) scale(0.72);
  }

  to {
    opacity: 0.64;
    transform: translate(0, 0) rotate(18deg) scale(1);
  }
}

@keyframes ringDrift {
  from {
    transform: translate(0, 0) rotate(18deg) scale(1);
  }

  to {
    transform: translate(-20px, -26px) rotate(34deg) scale(1.06);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 780px) {
  .page {
    width: min(100% - 28px, 560px);
    padding-top: 44px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .lead {
    max-width: none;
  }

  .detail-shell {
    width: min(100% - 28px, 620px);
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-copy {
    min-height: auto;
  }

  .detail-portrait {
    min-height: 420px;
  }

  .info-grid,
  .value-grid,
  .skill-list,
  .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-menu__shell {
    gap: 14px;
    padding: 18px;
  }

  .quick-menu__header {
    align-items: flex-start;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .quick-deletebar,
  .quick-menu__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .quick-deletebar div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quick-menu__footer button {
    width: 100%;
  }

  .quick-form__grid,
  .quick-form__grid--three,
  .quick-values {
    grid-template-columns: 1fr;
  }

  .quick-background-item,
  .quick-tag-add {
    grid-template-columns: 1fr;
  }

  .quick-form__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .morephotos-actions {
    justify-content: stretch;
  }

  .morephotos-actions button {
    flex: 1 1 160px;
  }

  .morephotos-character-list,
  .morephotos-gallery {
    grid-template-columns: 1fr;
  }

  .auth-dialog {
    padding: 24px;
  }
}

@media (max-width: 520px) {
  .grid {
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 16px;
  }

  .person-card {
    width: 100%;
    max-width: 224px;
    height: 360px;
    margin: 0 auto;
  }

  .photo-frame {
    width: 100%;
  }

  .detail-panel,
  .detail-copy {
    padding: 22px;
    border-radius: 28px;
  }

  .detail-portrait {
    min-height: 330px;
  }

  .detail-portrait img {
    min-height: 302px;
  }

  .info-grid,
  .value-grid,
  .skill-list {
    grid-template-columns: 1fr;
  }

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

  .lightbox {
    gap: 10px;
    padding: 14px;
  }

  .lightbox-image {
    max-width: 100vw;
    max-height: calc(100vh - 104px);
    border-radius: 18px;
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
  }

  .quick-menu__header {
    gap: 12px;
  }

  .quick-menu__grid {
    grid-template-columns: 1fr;
  }

  .quick-form {
    padding: 12px;
    border-radius: 24px;
  }

  .quick-form__section {
    padding: 12px;
  }

  .morephotos-filter,
  .morephotos-gallery-section {
    padding: 12px;
    border-radius: 22px;
  }

  .morephotos-card {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body,
  body::before,
  body::after {
    animation: none;
  }

  .lightbox,
  .lightbox-image,
  .lightbox-controls button {
    animation: none;
    transition: none;
  }
}
