@font-face {
  font-family: "Ark Pixel SC";
  src: url("assets/fonts/ark-pixel-12px-zh-cn.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --bg: #050714;
  --window: #090d22;
  --panel: #101632;
  --panel-2: #151d41;
  --cell: #090e25;
  --line: #263368;
  --cyan: #4ff0ff;
  --pink: #ff5de2;
  --green: #5dffa6;
  --yellow: #f6ff5d;
  --orange: #ffb04a;
  --purple: #9b6bff;
  --text: #cbd6ff;
  --muted: #7380b4;
  --pixel: "Press Start 2P", "ZCOOL QingKe HuangYou", monospace;
  --mono: "VT323", "ZCOOL QingKe HuangYou", monospace;
}

html[lang="zh-CN"] {
  --pixel: "Ark Pixel SC", "ZCOOL QingKe HuangYou", "Microsoft YaHei", sans-serif;
  --mono: "Ark Pixel SC", "ZCOOL QingKe HuangYou", "Microsoft YaHei", sans-serif;
}

/* Mechanical console theme */
:root {
  --console-bg: #050814;
  --console-panel: rgba(8, 12, 29, .94);
  --console-panel-hi: rgba(13, 19, 43, .96);
  --console-line: #34406f;
  --console-line-hi: #66e8ff;
  --console-purple: #9273ff;
  --console-pink: #ff55d9;
  --console-yellow: #ffd85c;
  --console-green: #66ffae;
  --console-cut: 9px;
  --console-grid: rgba(93, 117, 190, .055);
}

html[lang="zh-CN"] .nav-btn b,
html[lang="zh-CN"] .cta-btn,
html[lang="zh-CN"] .action-btn,
html[lang="zh-CN"] .species-tabs button,
html[lang="zh-CN"] .lang-toggle {
  font-family: var(--pixel);
}

body {
  background:
    linear-gradient(var(--console-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--console-grid) 1px, transparent 1px),
    radial-gradient(circle at 48% 0, rgba(52, 70, 145, .18), transparent 38%),
    var(--console-bg);
  background-size: 22px 22px, 22px 22px, auto, auto;
}

.topbar {
  position: relative;
  z-index: 50;
  min-height: 64px;
  height: 64px;
  padding: 6px 10px;
  border-bottom: 1px solid #5b78ba;
  background:
    linear-gradient(90deg, rgba(39, 224, 255, .08), transparent 24%, transparent 72%, rgba(182, 83, 255, .08)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(122, 151, 224, .025) 3px 4px),
    #070b18;
  box-shadow:
    inset 0 -4px 0 rgba(0, 0, 0, .42),
    inset 0 -5px 0 rgba(79, 240, 255, .08),
    0 2px 14px rgba(0, 0, 0, .75);
}

.topbar::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -2px;
  left: 12px;
  height: 1px;
  background: linear-gradient(90deg, #4ff0ff, transparent 18%, transparent 82%, #a975ff);
  opacity: .55;
  pointer-events: none;
}

.brand {
  min-width: 244px;
  gap: 10px;
}

.brand-mark {
  position: relative;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid #6befff;
  border-radius: 3px;
  background:
    linear-gradient(90deg, transparent 46%, rgba(79, 240, 255, .2) 47% 53%, transparent 54%),
    linear-gradient(transparent 46%, rgba(79, 240, 255, .2) 47% 53%, transparent 54%),
    #091027;
  box-shadow:
    inset 0 0 0 3px #172148,
    inset 0 0 0 5px #b755e8,
    0 0 12px rgba(79, 240, 255, .32);
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid #4ff0ff;
}

.brand-mark::after {
  inset: 17px;
  border-color: #ff55d9;
  background: #ff55d9;
  box-shadow: 0 0 8px #ff55d9;
}

.brand h1 {
  font-size: 14px;
  line-height: 1.15;
  color: #79f3ff;
  text-shadow: 0 0 8px rgba(79, 240, 255, .55);
}

.brand small {
  display: block;
  margin-top: 4px;
  color: #7080ae;
  font-size: 7px;
  letter-spacing: .12em;
}

.nav {
  gap: 7px;
  margin-left: auto;
}

.nav-btn,
.cta-btn,
.lang-toggle,
.action-btn,
.species-tabs button,
.modal-close {
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% calc(100% - 7px), calc(100% - 7px) 100%, 7px 100%, 0 calc(100% - 7px), 0 7px);
}

.nav-btn,
.cta-btn {
  height: 42px;
  min-height: 42px;
  border-width: 1px;
  background:
    linear-gradient(180deg, rgba(30, 41, 82, .9), rgba(7, 11, 27, .96));
  box-shadow:
    inset 0 0 0 2px rgba(86, 104, 172, .2),
    inset 0 0 13px rgba(79, 240, 255, .03);
}

.nav-btn {
  width: 126px;
  color: #aeb9e7;
}

.nav-btn:hover,
.nav-btn.active {
  color: #75f4ff;
  border-color: #52e8ff;
  background: linear-gradient(180deg, rgba(22, 70, 95, .78), rgba(7, 17, 35, .96));
  box-shadow:
    inset 0 0 0 2px rgba(79, 240, 255, .13),
    inset 0 0 18px rgba(79, 240, 255, .11),
    0 0 10px rgba(79, 240, 255, .18);
}

.cta-btn {
  width: 150px;
  border-color: #cc62f6;
  background: linear-gradient(180deg, rgba(90, 28, 104, .82), rgba(29, 8, 49, .96));
  color: #ff82e4;
  box-shadow:
    inset 0 0 0 2px rgba(255, 85, 217, .12),
    inset 0 0 18px rgba(255, 85, 217, .1),
    0 0 10px rgba(195, 84, 255, .15);
}

.cta-btn:hover {
  border-color: #ff78e7;
  color: #fff;
  box-shadow: inset 0 0 18px rgba(255, 85, 217, .22), 0 0 14px rgba(255, 85, 217, .28);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 42px;
  margin-left: 3px;
  padding-left: 8px;
  border-left: 1px solid #27345d;
}

.online-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid #265c53;
  color: #76ffc1;
  background: rgba(13, 48, 43, .42);
  font-family: var(--pixel);
  font-size: 6px;
}

.online-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #59ffac;
  box-shadow: 0 0 7px #59ffac;
  animation: consoleStatus 2.2s steps(2, end) infinite;
}

.system-clock {
  min-width: 57px;
  color: #8391bd;
  font-family: var(--mono);
  font-size: 11px;
  text-align: center;
}

.lang-toggle {
  position: static;
  height: 28px;
  width: 72px;
  min-width: 68px;
  padding: 0 7px;
  border: 1px solid #6c55ad;
  color: #b7a4ff;
  background: #0b0d24;
  font-size: 8px;
}

html[lang="zh-CN"] .lang-toggle { font-size: 11px; }

.map-stage {
  border-right: 1px solid #40558d;
  box-shadow: inset -4px 0 10px rgba(0, 0, 0, .5);
}

.map-stage::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  border: 1px solid rgba(89, 228, 255, .14);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .35);
  pointer-events: none;
}

.map-status,
.map-controls,
.map-hint,
.plot-hover-card {
  border: 1px solid #5571a8;
  border-radius: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(92, 116, 180, .035) 3px 4px),
    rgba(5, 9, 22, .94);
  box-shadow:
    inset 0 0 0 2px rgba(48, 63, 109, .42),
    inset 0 0 15px rgba(79, 240, 255, .05),
    0 4px 14px rgba(0, 0, 0, .55);
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}

.map-status {
  top: 8px;
  left: 8px;
  min-height: 28px;
  padding: 6px 11px;
  border-color: #2e9cb0;
  color: #7ef5ff;
  font-size: 8px;
}

.map-status::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 7px;
  border: 1px solid #4ff0ff;
  background: #4ff0ff;
  box-shadow: 0 0 7px #4ff0ff;
}

.map-controls {
  left: 8px;
  bottom: 24px;
  gap: 3px;
  padding: 4px;
}

.map-controls button {
  width: 31px;
  height: 31px;
  border-color: #31547c;
  border-radius: 0;
  background: #081328;
  color: #4ff0ff;
}

.map-hint {
  right: 9px;
  bottom: 8px;
  padding: 7px 10px;
  color: #6f80ad;
}

.plot-hover-card {
  border-color: #7866be;
}

.sidebar {
  background:
    linear-gradient(var(--console-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--console-grid) 1px, transparent 1px),
    #050817;
  background-size: 14px 14px;
  border-left: 1px solid #151d3b;
}

.panel,
.memorial-card,
.account-guest,
.account-panel,
.account-item,
.detail-card,
.modal-card,
.search-box,
.selected-plot-field,
.photo-drop,
.tombstone-option {
  position: relative;
  border: 1px solid var(--console-line);
  border-radius: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(104, 127, 191, .025) 3px 4px),
    linear-gradient(145deg, rgba(17, 24, 53, .96), rgba(6, 9, 23, .98));
  box-shadow:
    inset 0 0 0 2px rgba(77, 91, 149, .14),
    inset 0 0 22px rgba(55, 82, 146, .07),
    0 5px 16px rgba(0, 0, 0, .35);
  clip-path: polygon(var(--console-cut) 0, calc(100% - var(--console-cut)) 0, 100% var(--console-cut), 100% calc(100% - var(--console-cut)), calc(100% - var(--console-cut)) 100%, var(--console-cut) 100%, 0 calc(100% - var(--console-cut)), 0 var(--console-cut));
}

.panel::after,
.memorial-card::after,
.account-guest::after,
.account-panel::after,
.account-item::after,
.detail-card::after,
.modal-card::after,
.search-box::after {
  content: "";
  position: absolute;
  inset: 4px;
  z-index: 0;
  border-top: 1px solid rgba(103, 229, 255, .24);
  border-bottom: 1px solid rgba(144, 101, 255, .2);
  clip-path: polygon(0 0, 42px 0, 34px 2px, 0 2px, 0 100%, calc(100% - 34px) 100%, calc(100% - 42px) calc(100% - 2px), 0 calc(100% - 2px));
  pointer-events: none;
}

.panel > *,
.memorial-card > *,
.account-guest > *,
.account-panel > *,
.account-item > *,
.detail-card > *,
.modal-card > *,
.search-box > * {
  position: relative;
  z-index: 1;
}

.panel {
  padding: 9px 10px;
}

.panel h3,
.modal-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 23px;
  margin: -2px -2px 8px;
  padding: 0 8px;
  border-left: 2px solid #4ff0ff;
  border-bottom: 1px solid #27365f;
  background: linear-gradient(90deg, rgba(54, 170, 201, .12), transparent 75%);
  color: #80f3ff;
  font-size: 8px;
  letter-spacing: .08em;
}

.panel h3::before,
.modal-head h2::before {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
  box-shadow: 0 0 6px currentColor;
}

html[lang="zh-CN"] .panel h3,
html[lang="zh-CN"] .modal-head h2 {
  min-height: 23px;
  font-size: 12px;
}

.selected-panel { border-color: #644e9b; }

.selected-hero {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 10px;
  padding: 2px 0 6px;
  text-align: left;
}

.sprite-box.large {
  width: 68px;
  height: 68px;
  border: 1px solid #6d56ae;
  background:
    linear-gradient(rgba(79, 240, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 240, 255, .06) 1px, transparent 1px),
    radial-gradient(circle, rgba(137, 84, 255, .18), transparent 67%),
    #080d22;
  background-size: 8px 8px, 8px 8px, auto, auto;
  box-shadow: inset 0 0 13px rgba(101, 82, 204, .18);
}

.selected-panel blockquote {
  border: 1px solid #4b3d78;
  border-left: 2px solid #bc5bdd;
  border-radius: 0;
  background: rgba(25, 13, 42, .7);
}

.pet-meta {
  border-top: 1px dashed #2c3961;
  border-bottom: 1px dashed #2c3961;
}

.action-btn {
  border-color: #4b61a2;
  background: linear-gradient(180deg, #142142, #090d21);
  color: #aebeff;
}

.action-btn.primary {
  border-color: #d05bd8;
  background: linear-gradient(180deg, rgba(107, 33, 112, .86), rgba(35, 9, 51, .95));
  color: #ff91e8;
  box-shadow: inset 0 0 12px rgba(255, 85, 217, .12);
}

.action-btn:hover {
  border-color: #65eafd;
  color: #7af5ff;
}

.signal {
  position: relative;
  min-height: 48px;
  border: 1px solid #343e6b;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(82, 67, 154, .12), transparent 58%),
    #080c1e;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}

.signal::after {
  content: "";
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-right: 1px solid #7f64ca;
  border-bottom: 1px solid #7f64ca;
}

.signal.active {
  border-color: #ff63dc;
  box-shadow: inset 0 0 10px rgba(255, 85, 217, .15), 0 0 8px rgba(255, 85, 217, .2);
}

.species-tabs button {
  border-color: #344474;
  border-radius: 0;
  background: linear-gradient(180deg, #111934, #080c1e);
}

.species-tabs button.active {
  border-color: #4ff0ff;
  color: #6ef3ff;
  box-shadow: inset 0 0 12px rgba(79, 240, 255, .12);
}

.cemetery-stats div {
  border-bottom: 1px dotted #28345b;
}

.cemetery-stats dd {
  color: var(--console-green);
  font-family: var(--pixel);
  font-size: 9px;
}

.content-view {
  background:
    linear-gradient(rgba(68, 91, 151, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(68, 91, 151, .045) 1px, transparent 1px),
    radial-gradient(circle at 50% 0, rgba(73, 61, 156, .17), transparent 38%),
    #060916;
  background-size: 24px 24px, 24px 24px, auto, auto;
}

.content-wrap {
  max-width: 1280px;
}

.page-head {
  position: relative;
  margin-bottom: 15px;
  padding: 14px 18px;
  border: 1px solid #354674;
  background: linear-gradient(90deg, rgba(35, 119, 151, .14), rgba(13, 17, 39, .96) 42%, rgba(93, 42, 128, .12));
  box-shadow: inset 0 0 0 3px rgba(62, 76, 128, .1);
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.page-head::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 2px;
  background: #4ff0ff;
  box-shadow: 0 0 8px rgba(79, 240, 255, .75);
}

.page-head h2 {
  color: #79f3ff;
  text-shadow: 0 0 8px rgba(79, 240, 255, .45);
}

.search-box {
  padding: 7px;
}

.search-box input,
.form-grid input,
.form-grid select,
.form-grid textarea {
  border: 1px solid #344574;
  border-radius: 0;
  background:
    linear-gradient(180deg, rgba(16, 23, 50, .95), rgba(7, 10, 25, .98));
  color: #dce7ff;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, .28);
}

.search-box input:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: #4ff0ff;
  outline: none;
  box-shadow: inset 0 0 10px rgba(79, 240, 255, .06), 0 0 0 1px rgba(79, 240, 255, .18);
}

.memorial-card,
.account-item {
  transition: transform .18s steps(3, end), border-color .18s, box-shadow .18s;
}

.memorial-card:hover,
.account-item:hover {
  transform: translateY(-2px);
  border-color: #5769a5;
  box-shadow: inset 0 0 0 2px rgba(94, 108, 176, .12), 0 8px 22px rgba(0, 0, 0, .42);
}

.memorial-card .card-photo {
  border-radius: 0;
  border-bottom: 1px solid #374a78;
  filter: saturate(.9) contrast(1.04);
}

.account-guest,
.account-panel,
.detail-card {
  padding: 18px;
}

.detail-card {
  border-color: #4a4f91;
}

.detail-card .detail-photo {
  border-radius: 0;
  border: 1px solid #495a8c;
}

.detail-card blockquote {
  border: 1px solid #59417e;
  border-left: 3px solid #ca5fde;
  border-radius: 0;
  background: rgba(36, 15, 51, .65);
}

.modal-backdrop {
  background:
    linear-gradient(rgba(45, 59, 107, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 59, 107, .05) 1px, transparent 1px),
    rgba(2, 4, 12, .84);
  background-size: 20px 20px;
  backdrop-filter: blur(5px);
}

.modal-card {
  border-color: #7156a6;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(117, 103, 186, .03) 3px 4px),
    linear-gradient(145deg, rgba(16, 22, 51, .99), rgba(7, 8, 24, .99));
  box-shadow:
    inset 0 0 0 3px rgba(94, 72, 147, .14),
    inset 0 0 35px rgba(107, 69, 173, .08),
    0 20px 70px rgba(0, 0, 0, .72);
}

.modal-head {
  margin: -4px -4px 14px;
  padding: 4px 4px 8px;
  border-bottom: 1px solid #33416d;
}

.modal-close {
  border-color: #735696;
  border-radius: 0;
  background: #12122c;
  color: #d38aff;
}

.auth-tabs button {
  border-radius: 0;
  border-color: #35436e;
  background: #0b1025;
}

.auth-tabs button.active {
  border-color: #4ff0ff;
  color: #69f1ff;
  box-shadow: inset 0 0 12px rgba(79, 240, 255, .12);
}

.photo-drop {
  border-style: dashed;
  border-color: #5965a1;
}

.photo-drop:hover {
  border-color: #61e9fa;
  background: rgba(19, 44, 61, .45);
}

.tombstone-option {
  border-color: #37436f;
}

.tombstone-option.selected {
  border-color: #ff64dd;
  box-shadow: inset 0 0 14px rgba(255, 85, 217, .14), 0 0 9px rgba(255, 85, 217, .18);
}

.toast {
  border: 1px solid #5570a4;
  border-radius: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(99, 123, 188, .04) 3px 4px),
    #0a1025;
  color: #dce7ff;
  box-shadow: inset 0 0 0 2px rgba(67, 82, 139, .18), 0 8px 24px rgba(0, 0, 0, .55);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.toast.error {
  border-color: #e45d8c;
  color: #ffb4cc;
}

.empty-state,
.loading-state {
  border: 1px dashed #42517f;
  border-radius: 0;
  background: rgba(8, 12, 29, .76);
  color: #7888b5;
}

@keyframes consoleStatus {
  0%, 72% { opacity: 1; }
  73%, 100% { opacity: .35; }
}

@media (min-width: 1000px) {
  .topbar {
    display: flex;
  }

  .main-shell {
    height: calc(100vh - 64px);
    min-height: 0;
  }

  .sidebar {
    width: 282px;
    min-width: 282px;
    gap: 5px;
    padding: 5px;
    overflow: hidden;
  }

  .panel {
    padding: 8px 9px;
  }

  .selected-panel {
    flex: 0 1 auto;
  }

  .selected-panel blockquote {
    min-height: 36px;
    margin: 5px 0;
    padding: 7px 8px;
  }

  .pet-meta div {
    padding: 1px 0;
  }

  .action-btn {
    min-height: 30px;
    padding: 6px 9px;
  }

  .gallery-panel,
  .filter-panel {
    flex: 0 0 auto;
  }

  .stats-panel {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .cemetery-stats {
    margin-bottom: 7px;
  }
}

@media (min-width: 1000px) and (max-width: 1360px) {
  .brand {
    min-width: 210px;
  }

  .brand h1 {
    font-size: 12px;
  }

  .brand small {
    font-size: 6px;
  }

  .nav-btn {
    width: 108px;
  }

  .cta-btn {
    width: 132px;
  }

  .header-status {
    gap: 4px;
    padding-left: 5px;
  }

  .online-chip {
    display: none;
  }

  .system-clock {
    min-width: 49px;
    font-size: 10px;
  }

  .lang-toggle {
    min-width: 62px;
  }
}

@media (max-width: 999px) {
  .topbar {
    height: auto;
    min-height: 64px;
  }

  .header-status {
    position: absolute;
    top: 70px;
    right: 8px;
    z-index: 40;
    border: 0;
  }

  .online-chip,
  .system-clock {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .online-chip i,
  .memorial-card,
  .account-item {
    animation: none !important;
    transition: none !important;
  }

  .memorial-card:hover,
  .account-item:hover {
    transform: none;
  }
}

@layer base {
* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--mono); font-size: 19px; overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}
[hidden] { display: none !important; }

.app {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--line);
  background:
    radial-gradient(circle at 18% 15%, rgba(79,240,255,.06), transparent 28%),
    radial-gradient(circle at 80% 80%, rgba(255,93,226,.06), transparent 32%),
    var(--window);
}

.system-bar {
  height: 29px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--line);
  background: #050716;
}
.system-lights { display: flex; gap: 5px; }
.system-lights i { width: 9px; height: 9px; background: #ff5b68; }
.system-lights i:nth-child(2) { background: var(--yellow); }
.system-lights i:nth-child(3) { background: var(--green); }
.lang-toggle {
  margin-left: auto;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  background: transparent;
  padding: 3px 8px;
  font-family: var(--pixel);
  font-size: 8px;
  cursor: pointer;
}

.topbar {
  min-height: 70px;
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
  border-bottom: 1px solid var(--line);
  background: rgba(9,13,34,.94);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
}
.brand-mark { color: var(--pink); font-size: 28px; text-shadow: 0 0 10px var(--pink); }
.brand strong {
  display: block;
  color: var(--cyan);
  font-family: var(--pixel);
  font-size: 13px;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(79,240,255,.7);
}
.brand small { display: block; color: var(--muted); margin-top: 5px; font-size: 13px; }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav-btn, .cta-btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: .16s ease;
}
.nav-btn b, .cta-btn { font-family: var(--pixel); font-size: 9px; letter-spacing: .5px; }
.nav-btn:hover, .nav-btn.active { border-color: var(--cyan); color: var(--cyan); background: rgba(79,240,255,.08); }
.nav-btn.active { box-shadow: inset 0 -2px var(--cyan), 0 0 12px rgba(79,240,255,.15); }
.cta-btn { border-color: var(--pink); color: var(--pink); text-shadow: 0 0 5px var(--pink); }
.cta-btn:hover { background: var(--pink); color: #07091a; text-shadow: none; box-shadow: 0 0 14px rgba(255,93,226,.6); }

.config-banner {
  padding: 7px 14px;
  flex: 0 0 auto;
  border-bottom: 1px solid #806f21;
  background: #24210d;
  color: var(--yellow);
  text-align: center;
  font-size: 14px;
}
.main-shell { position: relative; flex: 1; min-height: 0; }
.view { display: none; width: 100%; height: 100%; }
.view.active { display: flex; }

.map-view { gap: 10px; padding: 10px; }
.map-stage {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #060a1b;
  cursor: grab;
}
.map-stage.create-hotspot-hover { cursor: pointer; }
.map-stage.dragging { cursor: grabbing; }
#mapCanvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.plot-hover-card {
  position: absolute;
  z-index: 8;
  width: 230px;
  padding: 11px 12px;
  border: 1px solid var(--cyan);
  background: rgba(5,8,23,.96);
  box-shadow: 0 0 18px rgba(79,240,255,.28);
  pointer-events: none;
}
.plot-hover-card strong { display: block; color: #fff; font-family: var(--pixel); font-size: 9px; }
.plot-hover-card small { display: block; margin-top: 6px; color: var(--cyan); }
.plot-hover-card p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: #aeb9dc;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.plot-select-banner {
  position: absolute;
  z-index: 9;
  top: 48px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  transform: translateX(-50%);
  border: 1px solid var(--yellow);
  background: rgba(20,17,4,.94);
  color: var(--yellow);
  font-family: var(--pixel);
  font-size: 8px;
}
.plot-select-banner button {
  border: 1px solid #8e7d2b;
  background: transparent;
  color: #fff2a0;
  cursor: pointer;
}
.plot-hover-card[hidden], .plot-select-banner[hidden] { display: none; }
.map-stage.selecting-plot { cursor: crosshair; }
.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(0,0,0,.28) 3px);
}
.map-title {
  position: absolute;
  top: 16px;
  left: 16px;
  pointer-events: none;
  text-shadow: 0 2px #000, 0 0 12px var(--cyan);
}
.map-title small, .eyebrow { color: var(--cyan); font-family: var(--pixel); font-size: 8px; letter-spacing: 1px; }
.map-title strong { display: block; margin-top: 8px; color: #ecfbff; font-family: var(--pixel); font-size: 15px; }
.map-controls {
  position: absolute;
  left: 15px;
  bottom: 15px;
  display: grid;
  gap: 4px;
  padding: 5px;
  background: rgba(5,7,20,.86);
  border: 1px solid var(--line);
}
.map-controls button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  background: var(--cell);
  color: var(--cyan);
  cursor: pointer;
}
.map-controls span { text-align: center; color: var(--cyan); font-size: 12px; }
.map-hint {
  position: absolute;
  right: 15px;
  bottom: 15px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  background: rgba(5,7,20,.82);
  color: var(--muted);
  font-size: 13px;
  pointer-events: none;
}
.mobile-drawer-btn { display: none; }

.sidebar {
  width: 300px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
}
.drawer-close { display: none; }
.panel {
  padding: 13px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(21,29,65,.96), rgba(12,17,42,.96));
}
.panel-kicker, .panel-heading, .field-label {
  color: var(--cyan);
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: .6px;
}
.panel-kicker { padding-bottom: 9px; border-bottom: 1px dashed var(--line); }
.panel-heading { display: flex; justify-content: space-between; margin-bottom: 10px; }
.panel-heading b { color: var(--yellow); }
.selected-hero { display: flex; align-items: center; gap: 12px; padding: 14px 0 10px; }
.selected-hero h2 { margin: 0 0 7px; color: var(--pink); font-family: var(--pixel); font-size: 13px; }
.selected-hero p { margin: 0; color: var(--muted); }
.sprite-box {
  position: relative;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cell);
  image-rendering: pixelated;
}
.sprite-box.large { width: 76px; height: 76px; }
.sprite-box.xlarge { width: 112px; height: 112px; }
.sprite-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pet-meta { margin: 0; }
.pet-meta div { display: flex; justify-content: space-between; padding: 4px 0; }
.pet-meta dt { color: var(--muted); }
.pet-meta dd { margin: 0; color: #fff; }
blockquote {
  margin: 10px 0;
  padding: 10px;
  border: 1px dashed var(--line);
  color: #baf9ff;
  font-style: italic;
  background: var(--cell);
}
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.signal {
  aspect-ratio: 1;
  position: relative;
  border: 1px solid var(--line);
  background: var(--cell);
  cursor: pointer;
}
.signal.selected { border-color: var(--pink); box-shadow: 0 0 8px rgba(255,93,226,.5); }
.sidebar-cta { text-align: center; }
.sidebar-cta strong { color: var(--yellow); font-family: var(--pixel); font-size: 9px; }
.sidebar-cta p { color: var(--muted); margin: 8px 0 12px; font-size: 14px; }
.pulse-dot { width: 8px; height: 8px; margin: 0 auto 10px; background: var(--pink); box-shadow: 0 0 10px var(--pink); animation: pulse 1.8s infinite; }

.content-view, .detail-view {
  display: none;
  flex-direction: column;
  overflow-y: auto;
  padding: 28px clamp(16px, 4vw, 54px) 50px;
}
.content-view.active, .detail-view.active { display: flex; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-head h1 { margin: 9px 0 7px; color: #fff; font-family: var(--pixel); font-size: clamp(18px, 3vw, 28px); line-height: 1.5; }
.page-head p { margin: 0; color: var(--muted); }
.search-row { display: flex; gap: 10px; margin-bottom: 18px; }
.search-box { flex: 1; display: flex; align-items: center; border: 1px solid var(--line); background: var(--cell); }
.search-box span { padding-left: 13px; color: var(--cyan); }
.search-box input, .field input, .field textarea, .pixel-select {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--cell);
  color: var(--text);
  padding: 10px 12px;
  outline: 0;
}
.search-box input { border: 0; background: transparent; }
.search-box:focus-within, .field input:focus, .field textarea:focus, .pixel-select:focus { border-color: var(--cyan); box-shadow: 0 0 8px rgba(79,240,255,.22); }
.pixel-select { max-width: 210px; }
.memorial-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 14px; }
.memorial-card {
  position: relative;
  min-height: 265px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel-2), var(--panel));
  cursor: pointer;
  transition: .18s ease;
}
.memorial-card:hover { transform: translateY(-3px); border-color: var(--pink); box-shadow: 0 8px 24px rgba(0,0,0,.3), 0 0 12px rgba(255,93,226,.2); }
.card-top { display: flex; gap: 12px; align-items: center; }
.card-sprite { width: 64px; height: 64px; }
.memorial-card h3 { margin: 0 0 6px; color: var(--pink); font-family: var(--pixel); font-size: 12px; line-height: 1.5; }
.memorial-card .card-date { color: var(--muted); font-size: 14px; }
.memorial-card blockquote { flex: 1; margin-top: 14px; }
.card-footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; }
.card-footer span:last-child { color: var(--cyan); }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state span { color: var(--cyan); font-size: 40px; }

.account-guest, .account-panel {
  max-width: 880px;
  padding: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.account-guest { text-align: center; }
.account-guest .account-icon { font-size: 52px; color: var(--cyan); text-shadow: 0 0 12px var(--cyan); }
.account-guest h2 { color: #fff; font-family: var(--pixel); font-size: 14px; line-height: 1.6; }
.account-guest p { color: var(--muted); }
.account-header { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.account-header h2 { color: var(--yellow); margin: 0 0 5px; }
.account-header p { margin: 0; color: var(--muted); }
.account-list { margin-top: 20px; display: grid; gap: 10px; }
.account-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  background: var(--cell);
}
.account-item h3 { margin: 0 0 4px; color: var(--pink); }
.account-item p { margin: 0; color: var(--muted); font-size: 14px; }
.item-actions { display: flex; gap: 6px; }
.icon-btn, .text-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cyan);
  cursor: pointer;
  padding: 7px 9px;
}
.danger { color: #ff6573; border-color: #6e2c3b; }

.detail-view { align-items: center; }
.back-btn { align-self: flex-start; border: 0; background: none; color: var(--cyan); cursor: pointer; margin-bottom: 16px; }
.detail-card {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.1fr;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.detail-media { min-height: 460px; position: relative; display: grid; place-items: center; overflow: hidden; background: var(--cell); }
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-media .sprite-box { position: absolute; right: 18px; bottom: 18px; background: rgba(5,7,20,.9); }
.detail-copy { padding: clamp(24px, 5vw, 52px); display: flex; flex-direction: column; }
.detail-copy .coordinate { color: var(--cyan); font-family: var(--pixel); font-size: 8px; }
.detail-copy h1 { margin: 18px 0 8px; color: var(--pink); font-family: var(--pixel); font-size: clamp(24px, 4vw, 40px); line-height: 1.4; }
.detail-copy .life-dates { color: var(--muted); }
.detail-copy blockquote { margin: 34px 0; padding: 20px; font-size: 24px; line-height: 1.5; }
.detail-actions { display: flex; gap: 10px; margin-top: auto; }

.action-btn {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--cyan);
  background: transparent;
  color: var(--cyan);
  font-family: var(--pixel);
  font-size: 8px;
  line-height: 1.4;
  cursor: pointer;
  transition: .15s ease;
}
.action-btn:hover { color: var(--cell); background: var(--cyan); box-shadow: 0 0 12px rgba(79,240,255,.5); }
.action-btn.primary { color: var(--pink); border-color: var(--pink); }
.action-btn.primary:hover { color: var(--cell); background: var(--pink); box-shadow: 0 0 12px rgba(255,93,226,.5); }
.action-btn.full { width: 100%; }
.action-btn:disabled { opacity: .55; cursor: wait; }

.create-cta-compact,
.create-cta-card {
  position: relative;
  isolation: isolate;
  border: 1px solid rgba(225, 90, 255, .82);
  color: #fff4ff;
  background:
    linear-gradient(180deg, rgba(119, 31, 134, .92), rgba(55, 16, 84, .98)),
    #220f36;
  box-shadow:
    inset 0 0 0 1px rgba(255, 157, 255, .12),
    inset 0 14px 26px rgba(255, 110, 236, .08),
    inset 0 -2px 0 rgba(255, 86, 229, .6),
    0 0 18px rgba(178, 64, 255, .18);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
  cursor: pointer;
  transition: filter .16s ease, transform .16s ease, box-shadow .16s ease;
}

.create-cta-compact::before,
.create-cta-card::before {
  content: "";
  position: absolute;
  inset: 6px 8px;
  z-index: -1;
  border-top: 1px solid rgba(255, 128, 244, .74);
  border-bottom: 1px solid rgba(255, 128, 244, .54);
  background:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 10px 10px;
  pointer-events: none;
}

.create-cta-compact:hover,
.create-cta-card:hover,
.create-cta-compact:focus-visible,
.create-cta-card:focus-visible {
  filter: brightness(1.16) saturate(1.12);
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(255, 180, 255, .2),
    inset 0 14px 26px rgba(255, 110, 236, .14),
    inset 0 -2px 0 rgba(255, 86, 229, .76),
    0 0 22px rgba(226, 85, 255, .38);
}

.create-cta-compact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-width: 150px;
  min-height: 42px;
  padding: 0 24px;
  border-radius: 0;
  font-family: var(--zh-pixel);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  text-shadow: 0 0 8px rgba(255, 164, 255, .5);
}

.topbar > .create-cta-compact {
  width: 180px;
  flex: 0 0 180px;
}

.account-create-cta {
  margin-right: 8px;
}

.create-cta-card {
  display: grid;
  grid-template-columns: 60px 1fr 58px;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 94px;
  padding: 15px 16px;
  text-align: left;
}

.create-cta-icon,
.create-cta-plus {
  position: relative;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(164, 91, 255, .72);
  background: linear-gradient(180deg, rgba(53, 26, 90, .88), rgba(22, 13, 42, .9));
  box-shadow: inset 0 0 0 2px rgba(160, 87, 255, .1), 0 0 13px rgba(184, 81, 255, .16);
  clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px);
}

.create-cta-plus {
  color: #f072ff;
  font-size: 30px;
  font-family: var(--pixel);
  text-shadow: 0 0 12px rgba(240, 114, 255, .7);
}

.create-cta-copy strong {
  display: block;
  color: #f072ff;
  font-family: var(--zh-pixel);
  font-size: 22px;
  line-height: 1.1;
  text-shadow: 0 0 10px rgba(240, 114, 255, .48);
}

.create-cta-copy small {
  display: block;
  margin-top: 8px;
  color: #b48adb;
  font-family: var(--zh-pixel);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: .02em;
}

.create-cta-cat {
  position: relative;
  width: 34px;
  height: 28px;
  border: 3px solid #36f0ff;
  border-radius: 12px 12px 10px 10px;
  box-shadow: 0 0 12px rgba(54, 240, 255, .65);
}

.create-cta-cat::before,
.create-cta-cat::after {
  content: "";
  position: absolute;
  top: -13px;
  width: 11px;
  height: 16px;
  border: 3px solid #36f0ff;
  border-bottom: 0;
  background: rgba(68, 35, 116, .95);
  box-shadow: 0 0 10px rgba(54, 240, 255, .45);
}

.create-cta-cat::before {
  left: 2px;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.create-cta-cat::after {
  right: 2px;
  clip-path: polygon(0 100%, 50% 0, 100% 100%);
}

.create-cta-cat span {
  display: none;
}

.create-cta-icon::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  left: 20px;
  top: 30px;
  background: #36f0ff;
  box-shadow: 13px 0 0 #36f0ff, 6px 8px 0 #f072ff;
}

html[lang="zh-CN"] .nav-btn b,
html[lang="zh-CN"] .cta-btn,
html[lang="zh-CN"] .action-btn,
html[lang="zh-CN"] .species-tabs button,
html[lang="zh-CN"] .lang-toggle {
  font-family: var(--pixel);
  font-weight: 700;
  line-height: 1;
}
.selected-plot-field {
  display: flex;
  justify-content: space-between;
  padding: 9px 10px;
  border: 1px solid #374675;
  background: #090d20;
  color: #8290bd;
}
.selected-plot-field strong { color: var(--yellow); font-family: var(--pixel); font-size: 9px; }
.tombstone-options { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.tombstone-option {
  min-width: 0;
  padding: 4px;
  border: 1px solid #35416c;
  background: #080c20;
  cursor: pointer;
}
.tombstone-option img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  image-rendering: pixelated;
}
.tombstone-option:hover { border-color: var(--cyan); }
.tombstone-option.selected {
  border-color: var(--pink);
  background: rgba(255,93,226,.1);
  box-shadow: 0 0 10px rgba(255,93,226,.3);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 16px;
  background: rgba(3,5,14,.82);
  backdrop-filter: blur(5px);
}
.modal.show { display: grid; }
.modal-card {
  width: min(440px, 100%);
  max-height: 92vh;
  overflow-y: auto;
  border: 1px solid var(--cyan);
  background: var(--panel);
  box-shadow: 0 0 35px rgba(79,240,255,.3);
}
.memorial-form-card { width: min(830px, 100%); border-color: var(--pink); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); background: var(--window); }
.modal-head small { color: var(--cyan); font-family: var(--pixel); font-size: 7px; }
.modal-head h2 { margin: 7px 0 0; color: #fff; font-family: var(--pixel); font-size: 14px; }
.modal-close { width: 34px; height: 34px; border: 0; background: none; color: var(--muted); font-size: 26px; cursor: pointer; }
.auth-card form { padding: 18px; }
.auth-tabs { display: flex; border-bottom: 1px solid var(--line); }
.auth-tabs button { flex: 1; padding: 12px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.auth-tabs button.active { color: var(--pink); border-color: var(--pink); }
.field { display: block; margin-bottom: 13px; }
.field > span, .color-field legend { display: block; margin-bottom: 6px; color: var(--muted); font-family: var(--pixel); font-size: 8px; }
.field textarea { resize: vertical; min-height: 95px; }
.field-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.counter { display: block; margin-top: 3px; text-align: right; color: var(--muted); }
.color-field { margin: 0; padding: 0; border: 0; }
.color-options { display: flex; flex-wrap: wrap; gap: 7px; }
.color-option { width: 28px; height: 28px; border: 2px solid transparent; cursor: pointer; }
.color-option.selected { border-color: white; box-shadow: 0 0 9px currentColor; }
.memorial-form { display: grid; grid-template-columns: 1fr 280px; gap: 18px; padding: 18px; }
.photo-drop {
  min-height: 230px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  overflow: hidden;
  border: 1px dashed var(--line);
  background: var(--cell);
  color: var(--muted);
  text-align: center;
  cursor: pointer;
}
.photo-drop input { position: absolute; opacity: 0; pointer-events: none; }
.photo-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-drop span { color: var(--cyan); font-size: 32px; }
.photo-drop b { color: var(--cyan); }
.photo-drop small { font-size: 13px; padding: 0 12px; }
.media-column .text-btn { width: 100%; margin-top: 7px; }
.sprite-preview { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }
.form-wide { grid-column: 1 / -1; }
.form-error { min-height: 18px; margin: 0 0 10px; color: #ff6573; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 16px;
  border: 1px solid var(--green);
  background: #050714;
  color: var(--green);
  transition: .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { color: #ff6573; border-color: #ff6573; }

.topbar > .create-cta-compact {
  width: 180px;
  flex: 0 0 180px;
  padding: 0 24px;
}

.topbar > .create-cta-compact span:last-child {
  display: inline;
}

@keyframes pulse { 50% { opacity: .35; box-shadow: 0 0 2px var(--pink); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 900px) {
  body { overflow: auto; }
  .app { min-height: 100vh; height: auto; overflow: visible; }
  .main-shell { min-height: calc(100vh - 100px); }
  .config-banner:not([hidden]) ~ .main-shell { min-height: calc(100vh - 132px); }
  .map-view { min-height: calc(100vh - 100px); }
  .config-banner:not([hidden]) ~ .main-shell .map-view { min-height: calc(100vh - 132px); }
  .brand small { display: none; }
  .brand strong { max-width: 130px; line-height: 1.5; }
  .topbar { gap: 9px; padding: 8px 10px; }
  .nav-btn { padding: 0 11px; }
  .nav-btn b { display: none; }
  .topbar > .cta-btn { padding: 0 9px; }
  .topbar > .cta-btn span:last-child { display: none; }
  .sidebar {
    position: fixed;
    z-index: 60;
    right: 0;
    top: 0;
    width: min(360px, 92vw);
    height: 100vh;
    padding: 46px 10px 10px;
    background: var(--window);
    transform: translateX(105%);
    transition: transform .2s ease;
  }
  .sidebar.open { transform: translateX(0); box-shadow: -20px 0 50px rgba(0,0,0,.5); }
  .drawer-close { display: block; position: absolute; right: 12px; top: 8px; border: 0; background: none; font-size: 28px; cursor: pointer; }
  .mobile-drawer-btn {
    display: block;
    position: absolute;
    right: 12px;
    bottom: 12px;
    border: 1px solid var(--pink);
    background: rgba(5,7,20,.9);
    color: var(--pink);
    padding: 9px 12px;
  }
  .map-hint { right: 12px; bottom: 55px; font-size: 11px; }
  .map-title strong { font-size: 11px; }
  .content-view, .detail-view { min-height: calc(100vh - 100px); height: auto; }
  .detail-card { grid-template-columns: 1fr; }
  .detail-media { min-height: 330px; }
}

@media (max-width: 600px) {
  .system-bar > span:nth-child(2) { display: none; }
  .topbar { min-height: 64px; }
  .brand strong { font-size: 10px; max-width: 105px; }
  .brand-mark { font-size: 21px; }
  .nav { gap: 3px; }
  .nav-btn { min-height: 36px; padding: 0 9px; }
  .map-view { padding: 7px; min-height: calc(100vh - 94px); }
  .config-banner:not([hidden]) ~ .main-shell { min-height: calc(100vh - 126px); }
  .config-banner:not([hidden]) ~ .main-shell .map-view { min-height: calc(100vh - 126px); }
  .map-title { top: 12px; left: 12px; }
  .map-title small { font-size: 6px; }
  .map-title strong { max-width: 220px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .search-row { flex-direction: column; }
  .pixel-select { max-width: none; }
  .memorial-grid { grid-template-columns: 1fr; }
  .memorial-form { grid-template-columns: 1fr; }
  .media-column { order: -1; }
  .photo-drop { min-height: 190px; }
  .field-split { grid-template-columns: 1fr; gap: 0; }
  .form-wide { grid-column: auto; }
  .account-header { align-items: flex-start; flex-direction: column; }
  .account-item { grid-template-columns: 48px 1fr; }
  .item-actions { grid-column: 1 / -1; }
  .detail-copy { padding: 24px 18px; }
  .detail-copy blockquote { font-size: 20px; }
  .detail-actions { flex-direction: column; }
}

/* Desktop cemetery map v2 */
@media (min-width: 1000px) {
  body { min-width: 1180px; }
  .app {
    border: 1px solid #283463;
    background: #070a18;
  }
  .system-bar {
    height: 24px;
    padding: 0 8px;
    font-size: 11px;
    border-bottom-color: #1c2752;
  }
  .system-lights i { width: 7px; height: 7px; }
  .system-spacer { flex: 1; }
  .system-clock { color: #92a2d8; letter-spacing: 2px; }
  .lang-toggle { margin-left: 4px; padding: 2px 7px; font-size: 7px; }
  .topbar {
    min-height: 62px;
    height: 62px;
    padding: 7px 14px;
    gap: 12px;
    background:
      linear-gradient(90deg, rgba(79,240,255,.025), transparent 30%, rgba(255,93,226,.025)),
      #0a0e21;
  }
  .brand { min-width: 330px; }
  .brand-mark {
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border: 1px solid #1bdde9;
    color: #1bdde9;
    font-size: 13px;
    box-shadow: inset 0 0 9px rgba(27,221,233,.3), 0 0 8px rgba(27,221,233,.18);
  }
  .brand strong {
    color: #78f4ff;
    font-size: 15px;
    letter-spacing: 1.5px;
  }
  .brand small {
    display: inline;
    margin-left: 8px;
    color: #65719b;
    font-size: 13px;
  }
  .nav { margin-left: auto; gap: 7px; }
  .nav-btn { width: 160px; }
  .topbar > .cta-btn { width: 172px; flex: 0 0 172px; }
  .nav-btn, .cta-btn {
    min-height: 36px;
    height: 36px;
    padding: 0 14px;
    background: rgba(8,12,30,.85);
    border-color: #34406c;
  }
  .nav-btn b, .cta-btn { font-size: 8px; }
  html[lang="zh-CN"] .nav-btn b,
  html[lang="zh-CN"] .topbar > .cta-btn {
    font-size: 12px;
  }
  .nav-btn.active {
    color: #8af7ff;
    border-color: #54efff;
    background: rgba(79,240,255,.11);
    box-shadow: inset 0 0 13px rgba(79,240,255,.12), 0 0 8px rgba(79,240,255,.18);
  }
  .config-banner {
    position: fixed;
    z-index: 30;
    left: 10px;
    bottom: 8px;
    padding: 4px 8px;
    border: 1px solid #6a622a;
    background: rgba(32,29,9,.88);
    font-size: 11px;
    pointer-events: none;
  }
  .main-shell { min-height: 0; }
  .map-view {
    padding: 0;
    gap: 0;
    background: #03050d;
  }
  .map-stage {
    border: 0;
    border-right: 1px solid #34406c;
    box-shadow: inset 0 0 40px rgba(0,0,0,.45);
  }
  .map-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 50px rgba(0,0,0,.42);
  }
  .map-status {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 8px;
    border: 1px solid rgba(79,240,255,.28);
    background: rgba(4,7,19,.72);
    color: #80f7ff;
    font-family: var(--pixel);
    font-size: 7px;
    letter-spacing: .8px;
    text-shadow: 0 0 5px #4ff0ff;
    pointer-events: none;
  }
  .map-status i {
    width: 6px;
    height: 6px;
    background: #5dffa6;
    box-shadow: 0 0 8px #5dffa6;
    animation: pulse 1.8s infinite;
  }
  .map-controls {
    left: 10px;
    bottom: 10px;
    padding: 4px;
    gap: 3px;
    border-color: #2c3969;
    background: rgba(4,7,19,.82);
  }
  .map-controls button { width: 31px; height: 31px; }
  .map-hint {
    right: 10px;
    bottom: 8px;
    padding: 5px 8px;
    font-size: 11px;
    border-color: rgba(53,67,113,.75);
    background: rgba(4,7,19,.75);
  }
  .sidebar {
    width: 282px;
    gap: 0;
    overflow-y: auto;
    background: #0d122a;
    scrollbar-width: thin;
    scrollbar-color: #394777 #080b1e;
  }
  .sidebar .panel {
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #303c69;
    background:
      linear-gradient(135deg, rgba(20,27,60,.96), rgba(11,16,39,.98));
  }
  .selected-panel { flex: 0 0 auto; }
  .panel-kicker, .panel-heading, .field-label {
    font-size: 8px;
    color: #91a0cf;
    text-shadow: none;
  }
  .panel-kicker { padding-bottom: 8px; }
  .selected-hero {
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    padding: 13px 0 8px;
    text-align: center;
  }
  .sprite-box.large {
    width: 82px;
    height: 82px;
    border: 0;
    background:
      radial-gradient(circle, rgba(79,240,255,.13), transparent 66%);
  }
  .selected-hero h2 {
    margin-bottom: 5px;
    font-size: 13px;
    color: #78f4ff;
    text-shadow: 0 0 7px rgba(79,240,255,.65);
  }
  .selected-hero p { font-size: 15px; }
  .pet-meta div {
    padding: 2px 0;
    font-size: 15px;
  }
  .selected-panel blockquote {
    margin: 8px 0;
    min-height: 42px;
    padding: 8px;
    font-size: 14px;
    line-height: 1.35;
  }
  .action-btn {
    min-height: 32px;
    padding: 7px 10px;
    font-size: 7px;
  }
  html[lang="zh-CN"] .action-btn { font-size: 11px; }
  .gallery-panel { flex: 0 0 auto; }
  .signal-grid { grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .signal {
    border-color: #35416c;
    background: #090d20;
  }
  .signal:hover { border-color: #4ff0ff; box-shadow: 0 0 8px rgba(79,240,255,.35); }
  .filter-panel { flex: 0 0 auto; }
  .species-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
  }
  .species-tabs button {
    min-height: 29px;
    border: 1px solid #36436f;
    background: #090d20;
    color: #7885b5;
    font-family: var(--pixel);
    font-size: 7px;
    cursor: pointer;
  }
  html[lang="zh-CN"] .species-tabs button { font-size: 11px; }
  .species-tabs button:hover,
  .species-tabs button.active {
    color: #4ff0ff;
    border-color: #4ff0ff;
    background: rgba(79,240,255,.09);
    box-shadow: inset 0 0 8px rgba(79,240,255,.12);
  }
  .stats-panel { margin-top: auto; }
  .cemetery-stats { margin: 0 0 10px; }
  .cemetery-stats div {
    display: flex;
    justify-content: space-between;
    padding: 2px 0;
    font-size: 15px;
  }
  .cemetery-stats dt { color: #7885b5; }
  .cemetery-stats dd {
    margin: 0;
    color: #5dffa6;
    text-shadow: 0 0 5px rgba(93,255,166,.55);
  }
  .drawer-close,
  .mobile-drawer-btn { display: none; }
}
}

/* High-fidelity mechanical archive frames */
:root {
  --archive-cyan: #35eaff;
  --archive-blue: #4e8dff;
  --archive-purple: #9c5dff;
  --archive-pink: #ff54dd;
  --archive-ink: #040817;
  --archive-panel: rgba(7, 12, 31, .97);
  --archive-line: rgba(89, 104, 176, .7);
}

.frame-emblem {
  position: absolute;
  z-index: 6;
  top: -15px;
  left: 50%;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  transform: translateX(-50%) rotate(45deg);
  border: 2px solid #8555d1;
  background: #0b0d29;
  color: #ff65df;
  font-size: 10px;
  box-shadow:
    inset 0 0 0 3px #17113a,
    0 0 0 2px rgba(57, 37, 103, .8),
    0 0 14px rgba(196, 78, 255, .45);
}

.frame-emblem::before {
  content: "✦";
  transform: rotate(-45deg);
  text-shadow: 0 0 7px currentColor;
}

.frame-emblem {
  font-size: 0;
}

.archive-console,
.account-console {
  position: relative;
  padding: 28px clamp(22px, 4vw, 52px) 34px;
  background:
    linear-gradient(rgba(65, 88, 151, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(65, 88, 151, .045) 1px, transparent 1px),
    radial-gradient(circle at 50% 0, rgba(82, 38, 144, .16), transparent 38%),
    #040714;
  background-size: 20px 20px, 20px 20px, auto, auto;
}

.archive-console::before,
.account-console::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 18px 26px;
  border: 1px solid #644994;
  background:
    linear-gradient(90deg, var(--archive-cyan), transparent 12%) top left / 35% 2px no-repeat,
    linear-gradient(270deg, var(--archive-purple), transparent 12%) top right / 35% 2px no-repeat,
    linear-gradient(90deg, var(--archive-purple), transparent 12%) bottom left / 35% 2px no-repeat,
    linear-gradient(270deg, var(--archive-cyan), transparent 12%) bottom right / 35% 2px no-repeat,
    rgba(5, 9, 24, .72);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
  box-shadow:
    inset 0 0 0 4px rgba(28, 35, 78, .7),
    inset 0 0 0 5px rgba(80, 214, 255, .09),
    inset 0 0 40px rgba(42, 53, 113, .13),
    0 0 18px rgba(42, 26, 84, .5);
  pointer-events: none;
}

.archive-console::after,
.account-console::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 24px;
  right: 32px;
  bottom: 24px;
  left: 32px;
  border-top: 1px solid rgba(60, 231, 255, .22);
  border-bottom: 1px solid rgba(187, 84, 255, .22);
  clip-path: polygon(0 0, 90px 0, 76px 3px, 0 3px, 0 100%, calc(100% - 76px) 100%, calc(100% - 90px) calc(100% - 3px), 0 calc(100% - 3px));
  pointer-events: none;
}

.archive-console > *,
.account-console > * {
  position: relative;
  z-index: 1;
}

.archive-console .page-head,
.account-console .page-head {
  margin: 0 10px 15px;
  padding: 19px 24px 17px;
  overflow: visible;
  border-color: #654a96;
  background:
    linear-gradient(90deg, rgba(33, 190, 218, .13), transparent 30%, rgba(139, 65, 188, .1)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(111, 138, 201, .025) 3px 4px),
    #080d22;
  box-shadow:
    inset 0 0 0 3px rgba(50, 56, 111, .3),
    inset 0 0 25px rgba(46, 76, 142, .08),
    0 5px 18px rgba(0, 0, 0, .4);
}

.archive-console .page-head::after,
.account-console .page-head::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 85px;
  height: 14px;
  border-top: 1px solid rgba(75, 225, 255, .4);
  border-right: 1px solid rgba(75, 225, 255, .18);
  background: repeating-linear-gradient(90deg, transparent 0 8px, rgba(78, 153, 255, .22) 8px 10px);
}

.search-row {
  position: relative;
  margin: 0 10px 16px;
  padding: 7px;
  gap: 8px;
  border: 1px solid #3c4779;
  background: rgba(6, 10, 27, .92);
  box-shadow: inset 0 0 0 3px rgba(44, 54, 99, .22);
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

.search-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  width: 110px;
  height: 2px;
  background: linear-gradient(90deg, var(--archive-cyan), transparent);
  box-shadow: 0 0 7px rgba(53, 234, 255, .45);
}

.search-row .search-box {
  flex: 1;
  padding: 0 10px;
  border-color: #26365f;
  clip-path: none;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .35);
}

.search-row .pixel-select {
  min-width: 190px;
  border: 1px solid #405185;
  border-radius: 0;
  background: #0a1027;
  color: #99a9da;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.archive-console .memorial-grid {
  margin: 0 10px;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 11px;
}

.memorial-card {
  min-height: 248px;
  padding: 14px;
  overflow: hidden;
  border-color: #394574;
  background:
    linear-gradient(90deg, rgba(39, 229, 255, .05), transparent 22%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(94, 118, 181, .03) 3px 4px),
    #080d22;
  clip-path: polygon(10px 0, calc(100% - 20px) 0, 100% 20px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 10px);
}

.memorial-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 5px;
  border: 1px solid rgba(79, 105, 166, .22);
  border-left-color: rgba(70, 229, 255, .25);
  pointer-events: none;
}

.memorial-card .node-corner,
.account-item .node-corner {
  position: absolute;
  z-index: 2;
  top: 5px;
  right: 6px;
  width: 25px;
  height: 12px;
  border-top: 2px solid #8d5fd3;
  border-right: 2px solid #8d5fd3;
  opacity: .8;
}

.memorial-card .card-top {
  padding-bottom: 10px;
  border-bottom: 1px solid #29375f;
}

.memorial-card .sprite-box {
  border-color: #5364a0;
  background:
    linear-gradient(rgba(64, 220, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 220, 255, .055) 1px, transparent 1px),
    #090e24;
  background-size: 7px 7px;
  box-shadow: inset 0 0 12px rgba(79, 240, 255, .1), 0 0 8px rgba(87, 111, 216, .12);
}

.memorial-card blockquote {
  margin: 11px 0;
  padding: 10px;
  border: 1px dashed #29355d;
  background: rgba(5, 8, 22, .66);
}

.memorial-card .card-footer {
  border-top: 1px solid #28345a;
  padding-top: 8px;
}

.account-console #accountContent {
  margin: 0 10px;
}

.account-guest,
.account-panel {
  max-width: none;
  min-height: 360px;
  padding: 34px;
  overflow: visible;
  border-color: #55447e;
  background:
    radial-gradient(circle at 50% 30%, rgba(50, 154, 184, .08), transparent 30%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(92, 116, 180, .03) 3px 4px),
    #080c20;
  box-shadow:
    inset 0 0 0 4px rgba(46, 54, 103, .24),
    inset 0 0 40px rgba(61, 74, 151, .09),
    0 10px 30px rgba(0, 0, 0, .4);
}

.account-emblem {
  top: -16px;
}

.account-guest {
  display: grid;
  place-content: center;
}

.account-guest .account-icon {
  display: grid;
  width: 92px;
  height: 92px;
  margin: 0 auto 15px;
  place-items: center;
  border: 1px solid #3b6f92;
  background:
    linear-gradient(rgba(53, 234, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 234, 255, .07) 1px, transparent 1px),
    rgba(5, 15, 30, .8);
  background-size: 9px 9px;
  box-shadow: inset 0 0 18px rgba(53, 234, 255, .11), 0 0 14px rgba(53, 234, 255, .12);
}

.account-header {
  padding: 13px 15px 19px;
  border: 1px solid #35436f;
  background: linear-gradient(90deg, rgba(45, 199, 224, .07), transparent 42%, rgba(145, 64, 199, .08));
}

.account-list {
  gap: 8px;
}

.account-item {
  overflow: hidden;
  border-color: #35416c;
  background:
    linear-gradient(90deg, rgba(53, 234, 255, .045), transparent 35%),
    #070c1f;
}

.account-item:hover {
  border-color: #67509c;
}

.detail-view {
  position: relative;
  padding: 28px clamp(24px, 4vw, 58px) 36px;
  background:
    linear-gradient(rgba(54, 74, 130, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(54, 74, 130, .04) 1px, transparent 1px),
    radial-gradient(circle at 50% 30%, rgba(68, 36, 129, .13), transparent 42%),
    #030611;
  background-size: 20px 20px, 20px 20px, auto, auto;
}

.detail-view .back-btn {
  position: relative;
  z-index: 5;
  margin-bottom: 17px;
  padding: 8px 13px;
  border: 1px solid #375c82;
  background: #071126;
  color: var(--archive-cyan);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

.detail-card {
  position: relative;
  width: min(1480px, 100%);
  min-height: min(720px, calc(100vh - 150px));
  margin: 0 auto;
  padding: 28px;
  grid-template-columns: minmax(360px, .92fr) minmax(450px, 1.25fr);
  gap: 32px;
  overflow: visible;
  border: 2px solid #67479a;
  background:
    linear-gradient(90deg, rgba(47, 218, 255, .035), transparent 25%, transparent 72%, rgba(177, 73, 255, .045)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(93, 116, 180, .025) 3px 4px),
    #05091b;
  box-shadow:
    inset 0 0 0 5px #0c1230,
    inset 0 0 0 6px rgba(68, 214, 255, .16),
    inset 0 0 48px rgba(39, 53, 117, .12),
    0 0 0 3px rgba(34, 29, 74, .9),
    0 18px 55px rgba(0, 0, 0, .58);
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);
}

.detail-card::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 13px;
  border: 1px solid rgba(70, 93, 163, .45);
  background:
    linear-gradient(90deg, var(--archive-cyan), transparent 18%) top left / 40% 2px no-repeat,
    linear-gradient(270deg, var(--archive-purple), transparent 18%) top right / 40% 2px no-repeat,
    linear-gradient(90deg, var(--archive-purple), transparent 18%) bottom left / 40% 2px no-repeat,
    linear-gradient(270deg, var(--archive-cyan), transparent 18%) bottom right / 40% 2px no-repeat;
  pointer-events: none;
}

.detail-card::after {
  inset: 20px;
  border-top-color: rgba(53, 234, 255, .28);
  border-bottom-color: rgba(255, 84, 221, .27);
}

.detail-emblem {
  top: -17px;
}

.detail-media {
  min-height: 610px;
  display: block;
  padding: 25px 20px 20px;
  overflow: visible;
  border: 1px solid #5064a0;
  background:
    linear-gradient(rgba(53, 234, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 234, 255, .035) 1px, transparent 1px),
    #04091a;
  background-size: 9px 9px;
  box-shadow:
    inset 0 0 0 5px rgba(14, 25, 58, .9),
    inset 0 0 0 6px rgba(48, 184, 226, .18),
    inset 0 0 35px rgba(37, 63, 125, .14);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.detail-photo-chamber {
  height: calc(100% - 125px);
  min-height: 430px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #344d80;
  background:
    radial-gradient(circle at 50% 40%, rgba(49, 111, 164, .08), transparent 38%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(70, 96, 159, .03) 2px 3px),
    #030716;
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .55);
}

.detail-photo-chamber img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-photo-chamber .empty-state {
  width: 100%;
  height: 100%;
  min-height: 430px;
  display: grid;
  place-content: center;
  border: 0;
  background: transparent;
}

.detail-photo-chamber .empty-state span {
  color: var(--archive-cyan);
  font-size: 42px;
  text-shadow: 0 0 10px rgba(53, 234, 255, .58);
}

.detail-hologram {
  position: absolute;
  z-index: 5;
  right: -15px;
  bottom: 18px;
  width: 180px;
  height: 150px;
  display: grid;
  place-items: center;
  border: 1px solid #376d9a;
  background:
    linear-gradient(rgba(53, 234, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 234, 255, .055) 1px, transparent 1px),
    rgba(4, 13, 29, .95);
  background-size: 8px 8px;
  box-shadow:
    inset 0 0 0 4px #0b1833,
    inset 0 0 24px rgba(53, 234, 255, .13),
    0 0 18px rgba(53, 234, 255, .18);
  clip-path: polygon(13px 0, calc(100% - 13px) 0, 100% 13px, 100% calc(100% - 13px), calc(100% - 13px) 100%, 13px 100%, 0 calc(100% - 13px), 0 13px);
}

.detail-hologram .hologram-label {
  position: absolute;
  top: 7px;
  color: #ff68df;
  font-family: var(--pixel);
  font-size: 7px;
}

.detail-hologram .sprite-box {
  position: static;
  width: 104px;
  height: 104px;
  margin-top: 12px;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 0 8px rgba(53, 234, 255, .72));
  animation: hologramFloat 2.6s steps(5, end) infinite;
}

.detail-hologram > i {
  position: absolute;
  right: 23px;
  bottom: 8px;
  left: 23px;
  height: 9px;
  border: 1px solid #35eaff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(53, 234, 255, .7);
  opacity: .6;
}

.detail-copy {
  min-width: 0;
  padding: 54px 32px 38px 14px;
}

.detail-node-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--archive-cyan);
}

.detail-node-line::before,
.detail-node-line::after {
  content: "";
  width: 7px;
  height: 7px;
  border: 1px solid currentColor;
}

.detail-node-line::after {
  flex: 1;
  width: auto;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: .55;
}

.detail-node-line > i {
  width: 5px;
  height: 5px;
  border: 1px solid currentColor;
}

.detail-copy .coordinate {
  font-size: 9px;
  letter-spacing: .08em;
}

.detail-copy h1 {
  margin: 33px 0 20px;
  color: #ff62df;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.1;
  letter-spacing: .05em;
  overflow-wrap: anywhere;
  text-shadow:
    3px 0 rgba(128, 49, 173, .65),
    0 0 15px rgba(255, 84, 221, .35);
}

.detail-copy .life-dates {
  display: flex;
  align-items: center;
  gap: 13px;
  color: #8497d2;
  font-family: var(--pixel);
  font-size: clamp(12px, 1.6vw, 20px);
  letter-spacing: .05em;
}

.detail-copy .life-dates span {
  color: #5794ff;
  font-size: 24px;
  text-shadow: 0 0 7px rgba(78, 141, 255, .5);
}

.detail-divider {
  position: relative;
  height: 18px;
  margin: 26px 0 18px;
  border-top: 1px solid #314272;
}

.detail-divider::before,
.detail-divider::after,
.detail-divider i {
  content: "";
  position: absolute;
  top: -4px;
  width: 7px;
  height: 7px;
  border: 1px solid #865bd1;
  transform: rotate(45deg);
  background: #090d24;
}

.detail-divider::before { left: 0; }
.detail-divider::after { right: 0; }
.detail-divider i { left: 50%; border-color: #d151ed; box-shadow: 0 0 7px rgba(209, 81, 237, .65); }

.detail-copy blockquote {
  position: relative;
  min-height: 190px;
  margin: 0 0 33px;
  padding: 42px 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #b24cce;
  border-left-width: 3px;
  background:
    linear-gradient(90deg, rgba(119, 30, 138, .2), rgba(38, 10, 67, .78)),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(210, 84, 255, .025) 3px 4px);
  color: #c9faff;
  font-size: clamp(20px, 2.2vw, 33px);
  line-height: 1.55;
  text-align: center;
  box-shadow:
    inset 0 0 0 5px rgba(57, 18, 82, .7),
    inset 0 0 24px rgba(203, 68, 232, .1),
    0 0 14px rgba(183, 68, 214, .16);
  clip-path: polygon(12px 0, calc(100% - 35px) 0, 100% 35px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px), 0 12px);
}

.detail-copy blockquote span {
  margin: 0 8px;
  color: #f16be0;
}

.detail-actions {
  gap: 18px;
  margin-top: 0;
}

.detail-actions .action-btn {
  min-width: 210px;
  min-height: 55px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-width: 2px;
  font-size: 10px;
}

.detail-actions .action-btn.primary {
  border-color: #e65ad9;
  background: linear-gradient(180deg, rgba(104, 27, 113, .92), rgba(37, 8, 55, .98));
  box-shadow: inset 0 0 16px rgba(255, 84, 221, .18), 0 0 12px rgba(255, 84, 221, .18);
}

.detail-actions .link-action {
  border-color: #4c8eea;
  background: linear-gradient(180deg, rgba(24, 62, 115, .88), rgba(7, 21, 52, .98));
  color: #9bc8ff;
  box-shadow: inset 0 0 16px rgba(78, 141, 255, .12), 0 0 12px rgba(78, 141, 255, .12);
}

.modal-card {
  overflow: visible;
  border-width: 2px;
  border-color: #674c9b;
  box-shadow:
    inset 0 0 0 5px rgba(16, 20, 53, .95),
    inset 0 0 0 6px rgba(69, 218, 255, .11),
    inset 0 0 38px rgba(68, 56, 151, .12),
    0 0 0 3px rgba(34, 25, 73, .9),
    0 24px 75px rgba(0, 0, 0, .75);
  clip-path: polygon(17px 0, calc(100% - 17px) 0, 100% 17px, 100% calc(100% - 17px), calc(100% - 17px) 100%, 17px 100%, 0 calc(100% - 17px), 0 17px);
}

.modal-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(75, 96, 159, .42);
  background:
    linear-gradient(90deg, var(--archive-cyan), transparent) top left / 28% 2px no-repeat,
    linear-gradient(270deg, var(--archive-purple), transparent) bottom right / 28% 2px no-repeat;
  pointer-events: none;
}

.modal-emblem {
  top: -16px;
}

.memorial-form-card {
  overflow-x: hidden;
  overflow-y: auto;
}

.memorial-form-card .modal-emblem {
  top: 6px;
}

.memorial-form-card .modal-head {
  padding-top: 30px;
}

.modal-head {
  padding-top: 12px;
  background:
    linear-gradient(90deg, rgba(39, 188, 218, .1), transparent 45%, rgba(151, 69, 198, .09));
}

.modal-card input,
.modal-card select,
.modal-card textarea {
  border-color: #374b7b;
  background:
    linear-gradient(rgba(60, 88, 146, .035) 1px, transparent 1px),
    #070c20;
  background-size: 8px 8px;
}

.photo-drop,
.selected-plot-field,
.tombstone-option {
  box-shadow: inset 0 0 0 3px rgba(46, 58, 108, .2);
}

.tombstone-option.selected {
  border-width: 2px;
}

.panel,
.map-status,
.map-controls,
.map-hint,
.plot-hover-card {
  box-shadow:
    inset 0 0 0 2px rgba(65, 76, 134, .2),
    inset 0 0 18px rgba(54, 79, 145, .08),
    0 4px 14px rgba(0, 0, 0, .48);
}

.sidebar .panel {
  border-left-color: rgba(53, 234, 255, .38);
  border-right-color: rgba(156, 93, 255, .34);
}

.sidebar .panel h3,
.sidebar .panel .panel-kicker,
.sidebar .panel .panel-heading {
  position: relative;
}

.sidebar .panel h3::after,
.sidebar .panel .panel-heading::after {
  content: "";
  flex: 1;
  height: 1px;
  margin-left: 7px;
  background: linear-gradient(90deg, currentColor, transparent);
  opacity: .35;
}

@keyframes hologramFloat {
  0%, 100% { transform: translateY(0); opacity: .92; }
  50% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 1100px) {
  .detail-card {
    grid-template-columns: minmax(300px, .85fr) minmax(390px, 1fr);
    gap: 20px;
    padding: 23px;
  }

  .detail-copy {
    padding-right: 18px;
  }

  .detail-actions .action-btn {
    min-width: 0;
    flex: 1;
  }
}

@media (min-width: 1000px) and (max-height: 760px) {
  .detail-view {
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .detail-view .back-btn {
    margin-bottom: 10px;
  }

  .detail-card {
    min-height: calc(100vh - 145px);
    padding: 20px 23px;
  }

  .detail-media {
    min-height: 510px;
    padding-top: 20px;
  }

  .detail-photo-chamber,
  .detail-photo-chamber .empty-state {
    min-height: 340px;
  }

  .detail-copy {
    padding-top: 28px;
    padding-bottom: 22px;
  }

  .detail-copy h1 {
    margin: 20px 0 13px;
    font-size: clamp(34px, 4vw, 55px);
  }

  .detail-divider {
    margin: 17px 0 12px;
  }

  .detail-copy blockquote {
    min-height: 140px;
    margin-bottom: 18px;
    padding: 25px 34px;
  }

  .detail-actions .action-btn {
    min-height: 46px;
  }

  .detail-hologram {
    bottom: 12px;
    height: 140px;
  }
}

@media (max-width: 900px) {
  .archive-console,
  .account-console {
    padding: 22px 14px 28px;
  }

  .archive-console::before,
  .account-console::before {
    inset: 10px;
  }

  .detail-card {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .detail-media {
    min-height: 500px;
  }

  .detail-copy {
    padding: 25px 18px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .detail-hologram .sprite-box {
    animation: none !important;
  }
}

/* Reference-grade memorial terminal */
.detail-view.active {
  position: relative;
  min-height: calc(100vh - 64px);
  height: calc(100vh - 64px);
  padding: 10px 12px;
  display: block;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 45%, rgba(55, 36, 117, .13), transparent 48%),
    linear-gradient(rgba(47, 69, 126, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 69, 126, .035) 1px, transparent 1px),
    #02050f;
  background-size: auto, 16px 16px, 16px 16px, auto;
}

.detail-view .back-btn {
  position: absolute;
  z-index: 20;
  top: 28px;
  left: 34px;
  margin: 0;
  min-height: 36px;
  padding: 6px 13px 6px 34px;
  border: 1px solid #417aa5;
  background:
    linear-gradient(90deg, rgba(34, 140, 174, .18), rgba(5, 13, 31, .96));
  box-shadow: inset 0 0 10px rgba(53, 234, 255, .08), 0 0 10px rgba(53, 234, 255, .1);
}

.detail-view .back-btn::before {
  content: "";
  position: absolute;
  left: 11px;
  width: 11px;
  height: 11px;
  border-left: 2px solid var(--archive-cyan);
  border-bottom: 2px solid var(--archive-cyan);
  transform: rotate(45deg);
}

.detail-card {
  width: 100%;
  max-width: none;
  min-height: calc(100vh - 84px);
  height: calc(100vh - 84px);
  margin: 0;
  padding: clamp(58px, 6.4vh, 76px) clamp(50px, 5vw, 92px) clamp(34px, 4vh, 48px);
  display: grid;
  grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
  gap: clamp(40px, 4.5vw, 82px);
  overflow: hidden;
  border: 1px solid #65489c;
  background:
    radial-gradient(circle at 31% 45%, rgba(31, 117, 153, .055), transparent 28%),
    radial-gradient(circle at 77% 45%, rgba(113, 36, 146, .055), transparent 35%),
    repeating-linear-gradient(0deg, transparent 0 3px, rgba(91, 115, 179, .028) 3px 4px),
    #040817;
  box-shadow:
    inset 0 0 0 4px #0a1029,
    inset 0 0 0 5px rgba(83, 226, 255, .13),
    inset 0 0 0 10px rgba(27, 31, 76, .68),
    inset 0 0 54px rgba(44, 54, 117, .12),
    0 0 0 2px rgba(37, 26, 75, .9);
  clip-path: polygon(24px 0, calc(100% - 24px) 0, 100% 24px, 100% calc(100% - 24px), calc(100% - 24px) 100%, 24px 100%, 0 calc(100% - 24px), 0 24px);
}

.detail-card::before {
  inset: 15px;
  border-color: rgba(73, 94, 163, .55);
  background:
    linear-gradient(90deg, var(--archive-cyan), transparent 24%) top left / 42% 2px no-repeat,
    linear-gradient(270deg, var(--archive-purple), transparent 24%) top right / 42% 2px no-repeat,
    linear-gradient(90deg, var(--archive-purple), transparent 24%) bottom left / 42% 2px no-repeat,
    linear-gradient(270deg, var(--archive-cyan), transparent 24%) bottom right / 42% 2px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(73, 116, 194, .12) 31px 32px);
}

.detail-card::after {
  inset: 26px;
  border-top: 1px solid rgba(64, 227, 255, .28);
  border-bottom: 1px solid rgba(212, 81, 255, .25);
}

.detail-frame-assets,
.detail-frame-assets img {
  position: absolute;
  z-index: 8;
  pointer-events: none;
  user-select: none;
  image-rendering: pixelated;
}

.detail-frame-assets {
  inset: 0;
}

.frame-corner {
  width: clamp(105px, 10vw, 150px);
  height: auto;
  filter: drop-shadow(0 0 5px rgba(119, 69, 215, .28));
}

.frame-corner-tl { top: 7px; left: 8px; }
.frame-corner-tr { top: 7px; right: 8px; }
.frame-corner-bl {
  bottom: 7px;
  left: 8px;
  transform: scaleY(-1);
}
.frame-corner-br {
  right: 8px;
  bottom: 7px;
  transform: scaleY(-1);
}

.frame-paw {
  width: clamp(58px, 5vw, 78px);
  height: auto;
  filter: drop-shadow(0 0 8px rgba(239, 80, 255, .45));
}

.frame-paw-top {
  top: -9px;
  left: 26%;
  transform: translateX(-50%);
}

.frame-paw-bottom {
  bottom: -8px;
  left: 50%;
  width: clamp(48px, 4vw, 65px);
  transform: translateX(-50%);
}

.frame-tube {
  top: 50%;
  width: clamp(24px, 2.1vw, 34px);
  height: auto;
  transform: translateY(-50%);
  opacity: .9;
  animation: terminalLamp 2.8s steps(3, end) infinite;
}

.frame-tube-left { left: 18px; }
.frame-tube-right { right: 18px; animation-delay: -1.3s; }

.frame-node {
  bottom: 10px;
  width: clamp(95px, 9vw, 145px);
  height: auto;
  opacity: .86;
}

.frame-node-left { left: 22%; }
.frame-node-right { right: 20%; }

.detail-media {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(28px, 3.2vh, 40px) clamp(22px, 2.4vw, 38px) clamp(24px, 3vh, 34px);
  border: 1px solid #5268a6;
  background:
    linear-gradient(rgba(53, 234, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 234, 255, .04) 1px, transparent 1px),
    radial-gradient(circle at 50% 38%, rgba(28, 95, 137, .09), transparent 43%),
    #030818;
  background-size: 8px 8px, 8px 8px, auto, auto;
  box-shadow:
    inset 0 0 0 5px #0a1530,
    inset 0 0 0 6px rgba(50, 210, 248, .19),
    inset 0 0 35px rgba(39, 67, 139, .17),
    0 0 0 2px rgba(28, 38, 87, .8);
  clip-path: polygon(18px 0, calc(100% - 32px) 0, 100% 32px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.detail-media::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 13px;
  border-top: 2px solid rgba(178, 75, 224, .7);
  border-left: 2px solid rgba(53, 234, 255, .5);
  border-right: 1px solid rgba(159, 75, 224, .38);
  pointer-events: none;
}

.photo-corner {
  position: absolute;
  z-index: 4;
  top: -4px;
  width: clamp(86px, 8vw, 122px);
  height: auto;
  pointer-events: none;
  image-rendering: pixelated;
  opacity: .86;
  filter: drop-shadow(0 0 4px rgba(125, 70, 218, .24));
}

.photo-corner-left {
  left: -3px;
}

.photo-corner-right {
  right: -3px;
}

.detail-photo-chamber {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #314876;
  background:
    radial-gradient(circle at 50% 43%, rgba(27, 87, 126, .1), transparent 42%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(73, 101, 167, .03) 2px 3px),
    #020612;
  box-shadow:
    inset 0 0 35px rgba(0, 0, 0, .63),
    inset 0 0 0 3px rgba(24, 36, 77, .5);
}

.detail-photo-chamber::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0 48%, rgba(63, 218, 255, .045) 50%, transparent 52%);
  background-size: 100% 12px;
  opacity: .35;
  pointer-events: none;
}

.detail-photo-chamber > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-photo-chamber .empty-state {
  width: 100%;
  height: 100%;
  min-height: 0;
  display: grid;
  place-content: center;
  border: 0;
  background: transparent;
}

.detail-photo-chamber .empty-state span {
  font-size: clamp(42px, 4vw, 68px);
}

.detail-photo-chamber .empty-state p {
  margin-top: 26px;
  color: #7182bc;
  font-size: clamp(18px, 1.8vw, 28px);
}

.detail-hologram {
  right: -7%;
  bottom: -3%;
  width: clamp(220px, 20vw, 340px);
  height: clamp(190px, 22vh, 270px);
  border: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  clip-path: none;
}

.detail-hologram::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 17%;
  right: 12%;
  bottom: 21%;
  left: 12%;
  border: 1px solid rgba(53, 234, 255, .42);
  background:
    linear-gradient(rgba(53, 234, 255, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53, 234, 255, .055) 1px, transparent 1px),
    rgba(2, 15, 29, .78);
  background-size: 8px 8px;
  box-shadow: inset 0 0 25px rgba(53, 234, 255, .13);
  clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px);
}

.detail-hologram .hologram-label {
  z-index: 5;
  top: 18%;
  font-size: 7px;
}

.detail-hologram .sprite-box {
  position: absolute;
  z-index: 4;
  top: 23%;
  width: clamp(120px, 10vw, 170px);
  height: clamp(120px, 10vw, 170px);
  margin: 0;
}

.detail-hologram .hologram-base {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(53, 234, 255, .24));
}

.detail-hologram > i {
  z-index: 2;
  right: 23%;
  bottom: 15%;
  left: 23%;
  height: 10px;
}

.detail-copy {
  height: 100%;
  min-width: 0;
  padding: clamp(42px, 5vh, 65px) clamp(22px, 2.6vw, 46px) clamp(24px, 3vh, 35px) 0;
  display: flex;
  flex-direction: column;
}

.detail-copy h1 {
  margin: clamp(28px, 4vh, 46px) 0 clamp(20px, 2.6vh, 30px);
  font-size: clamp(52px, 6.2vw, 100px);
}

.detail-copy .life-dates {
  font-size: clamp(15px, 1.7vw, 27px);
}

.detail-divider {
  margin: clamp(25px, 3.4vh, 38px) 0 clamp(20px, 2.7vh, 30px);
}

.detail-copy blockquote {
  min-height: clamp(190px, 25vh, 285px);
  margin: 0 0 clamp(25px, 3.5vh, 38px);
  padding: clamp(34px, 4.4vh, 54px) clamp(42px, 4vw, 68px);
  font-size: clamp(24px, 2.5vw, 40px);
}

.detail-actions {
  gap: clamp(16px, 2vw, 30px);
}

.detail-actions .action-btn {
  min-width: clamp(220px, 19vw, 310px);
  min-height: clamp(52px, 6vh, 68px);
  font-size: clamp(10px, .9vw, 14px);
}

@keyframes terminalLamp {
  0%, 64%, 100% { opacity: .92; filter: brightness(1) drop-shadow(0 0 3px rgba(110, 88, 255, .35)); }
  68% { opacity: .55; filter: brightness(.72); }
  72% { opacity: 1; filter: brightness(1.2) drop-shadow(0 0 7px rgba(216, 74, 255, .6)); }
}

@media (min-width: 1000px) and (max-height: 760px) {
  .detail-view.active {
    height: calc(100vh - 64px);
    padding: 8px 10px;
  }

  .detail-card {
    min-height: 610px;
    height: auto;
    padding: 52px 48px 32px;
    gap: 45px;
  }

  .detail-view .back-btn {
    top: 22px;
    left: 29px;
  }

  .detail-copy {
    padding-top: 32px;
  }

  .detail-copy h1 {
    margin: 20px 0 13px;
    font-size: clamp(44px, 5vw, 66px);
  }

  .detail-divider {
    margin: 18px 0 14px;
  }

  .detail-copy blockquote {
    min-height: 150px;
    margin-bottom: 18px;
    padding: 25px 38px;
    font-size: clamp(21px, 2.1vw, 30px);
  }

  .detail-hologram {
    width: 245px;
    height: 190px;
  }
}

@media (max-width: 999px) {
  .detail-view.active {
    height: auto;
    min-height: calc(100vh - 64px);
  }

  .detail-card {
    min-height: 720px;
    height: auto;
    padding: 58px 42px 38px;
    grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
    gap: 32px;
  }

  .frame-tube,
  .frame-node {
    display: none;
  }

  .detail-copy {
    padding-right: 10px;
  }

  .detail-actions .action-btn {
    min-width: 0;
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .frame-tube,
  .detail-hologram .sprite-box,
  .detail-photo-chamber::after {
    animation: none !important;
  }
}

/* Memorial detail using the supplied reference artwork */
.detail-view.active {
  position: relative;
  min-height: calc(100vh - 64px);
  height: calc(100vh - 64px);
  padding: clamp(92px, 10vh, 124px) 24px 28px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  overflow: hidden;
  background: #02050d;
}

.detail-bg-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  pointer-events: none;
  filter: saturate(1.08) brightness(.82) contrast(1.05);
}

.detail-view.active::before {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 45%, transparent 0 34%, rgba(1, 4, 13, .25) 62%, rgba(1, 4, 13, .78) 100%),
    linear-gradient(rgba(6, 13, 33, .18) 1px, transparent 1px);
  background-size: auto, 100% 4px;
}

.detail-view .back-btn {
  position: absolute;
  z-index: 20;
  top: 9px;
  left: 10px;
  min-height: 32px;
  padding: 5px 14px;
  border: 1px solid rgba(79, 240, 255, .7);
  background: rgba(3, 12, 28, .72);
  box-shadow: 0 0 12px rgba(79, 240, 255, .2), inset 0 0 14px rgba(79, 240, 255, .08);
}

.detail-view .back-btn::before {
  display: none;
}

.detail-card {
  position: relative;
  z-index: 3;
  width: min(1308px, 76vw, calc(100vw - 96px));
  max-width: 1308px;
  min-height: 0;
  height: auto;
  aspect-ratio: auto;
  margin: 0 auto;
  padding: 0;
  display: block;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
  transform: translateX(clamp(28px, 5vw, 96px));
}

.detail-card::before,
.detail-card::after {
  display: none;
}

.detail-terminal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1719 / 948;
  overflow: visible;
  background: url("assets/detail-terminal/terminal-frame.png") center / 100% 100% no-repeat;
  image-rendering: pixelated;
  filter: drop-shadow(0 22px 42px rgba(0, 0, 0, .72)) drop-shadow(0 0 24px rgba(146, 70, 255, .18));
}

.detail-media {
  position: absolute;
  z-index: 5;
  top: 12.5%;
  left: 6.55%;
  width: 35.2%;
  height: 72.5%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
}

.detail-media::before {
  display: none;
}

.detail-photo-chamber {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 0;
  background:
    radial-gradient(circle at 50% 43%, rgba(25, 83, 122, .08), transparent 42%),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(73, 101, 167, .025) 2px 3px),
    #030716;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, .58);
  clip-path: polygon(0 0, 100% 0, 100% 66%, 72% 66%, 72% 84%, 64% 84%, 64% 100%, 0 100%);
}

.detail-photo-chamber::after {
  opacity: .18;
}

.detail-photo-chamber > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.detail-photo-chamber .empty-state {
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  background: transparent;
}

.detail-photo-chamber .empty-state span {
  font-size: clamp(36px, 3.4vw, 54px);
}

.detail-photo-chamber .empty-state p {
  margin-top: 22px;
  font-size: clamp(17px, 1.55vw, 24px);
}

.detail-hologram {
  position: absolute;
  z-index: 7;
  right: -5.5%;
  bottom: -4%;
  width: 31%;
  height: 30%;
  min-width: 104px;
  min-height: 96px;
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
  clip-path: none;
}

.detail-hologram::before {
  display: none;
}

.detail-hologram .sprite-box,
.detail-hologram .sprite-box.xlarge {
  position: absolute;
  z-index: 3;
  top: 5%;
  left: 14%;
  width: 72%;
  height: 72%;
  margin: 0;
  transform: none;
  border: 0;
  background: transparent;
  filter: drop-shadow(0 0 8px rgba(53, 234, 255, .65));
  animation: hologramFloat 2.6s steps(5, end) infinite;
}

.detail-hologram > i {
  z-index: 2;
  right: 14%;
  bottom: 13%;
  left: 14%;
  height: 6px;
}

.detail-copy {
  position: absolute;
  z-index: 4;
  top: 8%;
  left: 48.7%;
  width: 45.6%;
  height: 83%;
  min-width: 0;
  padding: 0;
  display: block;
}

.detail-copy::before {
  display: none;
}

.detail-copy > * {
  z-index: 1;
}

.detail-node-line,
.detail-copy h1,
.detail-copy .life-dates {
  background: rgba(4, 8, 23, .9);
  box-shadow: 0 0 16px rgba(4, 8, 23, .88);
}

.detail-node-line {
  position: absolute;
  top: 4.5%;
  left: 2%;
  width: 69%;
  min-height: 7%;
  padding: 8px 5px;
}

.detail-copy .coordinate {
  font-size: clamp(7px, .72vw, 10px);
}

.detail-copy h1 {
  position: absolute;
  top: 14%;
  left: 1.5%;
  width: 73%;
  min-height: 18%;
  margin: 0;
  padding: 6px 4px;
  display: flex;
  align-items: center;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1;
}

.detail-copy .life-dates {
  position: absolute;
  top: 34%;
  left: 1.5%;
  width: 73%;
  min-height: 9%;
  padding: 7px 4px;
  font-size: clamp(12px, 1.35vw, 19px);
}

.detail-copy .life-dates span {
  font-size: clamp(17px, 1.8vw, 25px);
}

.detail-divider {
  position: absolute;
  top: 45%;
  left: 1.5%;
  width: 91%;
  margin: 0;
}

.detail-copy blockquote {
  position: absolute;
  top: 50.2%;
  left: 2.2%;
  width: 88%;
  height: 27%;
  min-height: 0;
  margin: 0;
  padding: clamp(15px, 2.1vw, 31px);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: rgba(30, 8, 47, .64);
  box-shadow: inset 0 0 18px rgba(15, 4, 26, .5);
  font-size: clamp(15px, 1.85vw, 26px);
}

.detail-terminal-actions {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 4.2%;
  left: 52%;
  top: 80.3%;
  width: 35.2%;
  margin-top: 0;
  transform: translateY(-50%);
  pointer-events: none;
}

.detail-terminal-button {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 0 0 0 12%;
  border: 0;
  color: #bffcff;
  font-family: var(--zh-pixel);
  font-size: clamp(10px, .95vw, 16px);
  letter-spacing: .05em;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  box-shadow: none;
  image-rendering: pixelated;
  pointer-events: auto;
  cursor: pointer;
  text-shadow: 0 0 8px currentColor;
  filter: brightness(1);
  transition: filter .16s ease, transform .16s ease, text-shadow .16s ease;
}

.detail-terminal-button::before {
  display: none;
}

.detail-terminal-button::after {
  content: "";
  position: absolute;
  inset: 9% 8%;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(105deg, transparent 0 18%, rgba(255, 255, 255, .28) 46%, transparent 68%),
    radial-gradient(circle at 50% 50%, currentColor, transparent 68%);
  mix-blend-mode: screen;
  transition: opacity .16s ease;
}

.detail-terminal-button span {
  position: absolute;
  inset: 0 8% 0 23%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-1px);
}

.detail-terminal-button:hover,
.detail-terminal-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.25) saturate(1.2);
  text-shadow: 0 0 10px currentColor, 0 0 18px currentColor;
}

.detail-terminal-button:hover::after,
.detail-terminal-button:focus-visible::after {
  opacity: .35;
}

.detail-terminal-button:active {
  transform: translateY(1px);
  filter: brightness(1.38) saturate(1.28);
}

.detail-terminal-button-share {
  width: 40.8%;
  aspect-ratio: 273 / 96;
  color: #ffc4fb;
  background-image: url("assets/detail-terminal/btn-share-blank.png");
}

.detail-terminal-button-share:hover,
.detail-terminal-button-share:focus-visible {
  filter: brightness(1.25) saturate(1.2) drop-shadow(0 0 12px rgba(255, 83, 221, .65));
}

.detail-terminal-button-copy {
  width: 43.8%;
  aspect-ratio: 293 / 96;
  color: #b7d6ff;
  background-image: url("assets/detail-terminal/btn-copy-blank.png");
}

.detail-terminal-button-copy:hover,
.detail-terminal-button-copy:focus-visible {
  filter: brightness(1.25) saturate(1.2) drop-shadow(0 0 12px rgba(78, 141, 255, .65));
}

.detail-frame-assets,
.photo-corner,
.hologram-base,
.hologram-label {
  display: none !important;
}

/* Final raised brand plate */
.topbar .brand {
  position: relative;
  min-width: 320px;
  height: 58px;
  padding: 7px 18px 7px 9px;
  gap: 14px;
  flex: 0 0 320px;
  border: 1px solid rgba(168, 105, 255, .74);
  border-radius: 13px 18px 18px 13px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .13) 0 2%, transparent 2.5%),
    linear-gradient(180deg, rgba(91, 59, 160, .92), rgba(39, 18, 79, .96) 58%, rgba(24, 12, 52, .98)),
    #160d2e;
  box-shadow:
    inset 0 0 0 2px rgba(32, 18, 68, .8),
    inset 0 14px 20px rgba(255, 255, 255, .05),
    inset 0 -5px 0 rgba(224, 69, 255, .34),
    0 8px 16px rgba(0, 0, 0, .42),
    0 0 18px rgba(177, 80, 255, .24);
  clip-path: none;
  overflow: hidden;
}

.topbar .brand::before {
  content: "";
  position: absolute;
  inset: 5px 7px;
  z-index: 0;
  border: 1px solid rgba(194, 137, 255, .3);
  border-radius: 9px 14px 14px 9px;
  pointer-events: none;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, .34);
}

.topbar .brand::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 4px;
  left: 78px;
  z-index: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(191, 145, 255, .12), rgba(255, 91, 232, .66));
  pointer-events: none;
}

.topbar .brand-mark {
  position: relative;
  z-index: 1;
  width: 45px;
  height: 45px;
  flex: 0 0 45px;
  display: block;
  border: 1px solid rgba(194, 137, 255, .78);
  border-radius: 9px;
  color: transparent;
  font-size: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 32%),
    linear-gradient(180deg, rgba(54, 36, 103, .94), rgba(18, 11, 40, .98));
  box-shadow:
    inset 0 0 0 4px rgba(42, 27, 79, .92),
    inset 0 0 0 6px rgba(114, 70, 172, .34),
    inset 0 -5px 10px rgba(0, 0, 0, .38),
    0 4px 9px rgba(0, 0, 0, .48),
    0 0 11px rgba(173, 97, 255, .28);
}

.topbar .brand-mark::before,
.topbar .brand-mark::after {
  display: none;
}

.brand-paw,
.brand-paw::before,
.brand-paw::after {
  position: absolute;
  display: block;
  background: #a76bff;
  box-shadow:
    0 0 7px rgba(190, 124, 255, .75),
    inset -2px -2px 0 rgba(95, 45, 166, .42),
    inset 1px 1px 0 rgba(235, 210, 255, .35);
}

.brand-paw {
  left: 13px;
  top: 23px;
  width: 20px;
  height: 16px;
  border-radius: 55% 55% 46% 46%;
  transform: rotate(-7deg);
}

.brand-paw::before {
  content: "";
  left: -3px;
  top: -12px;
  width: 8px;
  height: 10px;
  border-radius: 50%;
  background: #a76bff;
  box-shadow:
    9px -5px 0 #a76bff,
    21px -5px 0 #a76bff,
    30px 1px 0 #a76bff,
    0 0 7px rgba(190, 124, 255, .75);
}

.brand-paw::after {
  content: "";
  left: 5px;
  top: 3px;
  width: 9px;
  height: 5px;
  border-radius: 50%;
  background: rgba(234, 210, 255, .28);
  box-shadow: 0 -1px 0 rgba(255, 255, 255, .16);
}

.topbar .brand-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.topbar .brand strong {
  color: #d9bbff;
  font-family: var(--zh-pixel);
  font-size: 20px;
  line-height: 1.05;
  letter-spacing: .08em;
  text-shadow:
    0 2px 0 rgba(33, 14, 62, .85),
    0 0 10px rgba(190, 118, 255, .52);
  white-space: nowrap;
}

.topbar .brand small {
  display: block;
  margin-top: 6px;
  margin-left: 1px;
  color: #c2bbd9;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .2em;
  text-shadow: 0 0 6px rgba(206, 188, 255, .24);
  white-space: nowrap;
}

@media (max-width: 1320px) {
  .topbar .brand {
    min-width: 280px;
    flex-basis: 280px;
    padding-right: 14px;
  }

  .topbar .brand strong {
    font-size: 17px;
    letter-spacing: .05em;
  }

  .topbar .brand small {
    font-size: 11px;
    letter-spacing: .14em;
  }

  .detail-view.active {
    padding-right: 20px;
    padding-left: 20px;
  }

  .detail-card {
    width: min(76vw, calc(100vw - 48px));
  }

  .detail-view .back-btn {
    left: 20px;
  }
}

@media (max-height: 790px) and (min-width: 1000px) {
  .detail-view.active {
    --short-detail-width: min(
      76vw,
      calc((100vh - 105px) * 1719 / 948),
      calc(100vw - 48px)
    );
    padding-top: 44px;
    padding-bottom: 18px;
  }

  .detail-card {
    width: var(--short-detail-width);
  }

  .detail-view .back-btn {
    top: 7px;
    left: max(24px, calc((100vw - var(--short-detail-width)) / 2));
  }
}

@media (prefers-reduced-motion: reduce) {
  .detail-hologram .sprite-box,
  .detail-photo-chamber::after {
    animation: none !important;
  }

  .detail-terminal-button,
  .detail-terminal-button::after {
    transition: none !important;
  }
}

.topbar > .create-cta-compact {
  width: 180px;
  flex: 0 0 180px;
  padding: 0 24px;
}

.topbar > .create-cta-compact span:last-child {
  display: inline;
}

@media (max-width: 900px) {
  .topbar > .create-cta-compact {
    width: 52px;
    flex: 0 0 52px;
    padding: 0;
  }

  .topbar > .create-cta-compact span:last-child {
    display: none;
  }
}

#memorialModal .modal-head {
  position: relative;
  min-height: 118px;
  padding: 34px 56px 18px 40px;
  align-items: flex-start;
}

#memorialModal .modal-head > div {
  width: min(220px, 42%);
  padding-left: 0;
}

#memorialModal .modal-head small,
#memorialModal .modal-head h2 {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#memorialModal .modal-head small {
  font-size: 8px;
  letter-spacing: .06em;
}

#memorialModal .modal-head h2 {
  margin-top: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(79, 240, 255, .34);
}

#memorialModal .modal-close {
  position: absolute;
  top: 30px;
  right: 30px;
}

/* Create CTA v2: darker, flatter, and closer to the reference card. */
.create-cta-compact,
.create-cta-card {
  border: 1px solid rgba(168, 83, 224, .72);
  color: #f7e8ff;
  background:
    linear-gradient(180deg, rgba(68, 27, 91, .78), rgba(26, 13, 45, .94)),
    #150b27;
  box-shadow:
    inset 0 0 0 1px rgba(217, 118, 255, .07),
    inset 0 1px 0 rgba(255, 129, 244, .34),
    inset 0 -1px 0 rgba(255, 87, 229, .34),
    0 0 13px rgba(177, 80, 255, .13);
  clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px), 0 14px);
}

.create-cta-compact::before,
.create-cta-card::before {
  inset: 7px 10px;
  border-top: 1px solid rgba(224, 100, 255, .48);
  border-bottom: 1px solid rgba(224, 100, 255, .38);
  background:
    linear-gradient(90deg, rgba(255, 110, 239, .12), transparent 32%, rgba(70, 230, 255, .05) 100%);
  background-size: auto;
}

.create-cta-compact:hover,
.create-cta-card:hover,
.create-cta-compact:focus-visible,
.create-cta-card:focus-visible {
  filter: brightness(1.1) saturate(1.08);
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px rgba(241, 144, 255, .12),
    inset 0 1px 0 rgba(255, 142, 247, .5),
    inset 0 -1px 0 rgba(255, 87, 229, .48),
    0 0 20px rgba(206, 83, 255, .28);
}

.create-cta-compact {
  min-height: 43px;
  gap: 13px;
  font-size: 15px;
  color: #fff4ff;
  text-shadow: 0 0 7px rgba(255, 179, 255, .38);
}

.create-cta-card {
  grid-template-columns: 52px minmax(0, 1fr) 48px;
  gap: 12px;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 88px;
  padding: 13px 13px;
  overflow: hidden;
  background:
    radial-gradient(circle at 14% 45%, rgba(90, 45, 134, .34), transparent 30%),
    linear-gradient(90deg, rgba(38, 18, 61, .94), rgba(25, 11, 43, .92) 55%, rgba(34, 15, 56, .94)),
    #140a24;
}

.create-cta-copy {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  writing-mode: horizontal-tb;
  text-orientation: mixed;
  white-space: normal;
}

.create-cta-copy strong {
  overflow: hidden;
  color: #ec72ff;
  font-size: 20px;
  line-height: 1.12;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 0 8px rgba(236, 114, 255, .42);
}

.create-cta-copy small {
  display: -webkit-box;
  margin-top: 7px;
  overflow: hidden;
  color: #b892d5;
  font-size: 13px;
  line-height: 1.28;
  letter-spacing: .01em;
  writing-mode: horizontal-tb;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.create-cta-icon,
.create-cta-plus {
  width: 48px;
  height: 48px;
  border-color: rgba(136, 73, 198, .66);
  background: linear-gradient(180deg, rgba(43, 22, 68, .85), rgba(17, 10, 31, .94));
  box-shadow:
    inset 0 0 0 1px rgba(197, 113, 255, .08),
    inset 0 -8px 16px rgba(117, 38, 160, .18),
    0 0 10px rgba(159, 73, 255, .12);
}

.create-cta-plus {
  color: #f278ff;
  font-size: 27px;
  text-shadow: 0 0 10px rgba(242, 120, 255, .58);
}

.create-cta-cat {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  background: url("assets/create-cta-cat.png") center / contain no-repeat;
  box-shadow: none;
  image-rendering: pixelated;
}

.create-cta-cat::before,
.create-cta-cat::after {
  display: none !important;
  content: none !important;
}

.create-cta-cat::before {
  left: 2px;
}

.create-cta-cat::after {
  right: 2px;
}

.create-cta-icon::after {
  display: none !important;
  content: none !important;
}
