/* ============================================================
   crazygrasses — 极简黑白噪点风
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #000;
  --text: #777;
  --text-light: #999;
  --text-white: #fff;
  --border: #1a1a1a;
  --border-light: #222;
  --max-width: 640px;
}

html { background: var(--bg); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
  letter-spacing: 1px;
  -webkit-font-smoothing: antialiased;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  opacity: 0.025;
  pointer-events: none;
  z-index: 9999;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: inherit; letter-spacing: inherit; }

/* ============================================================
   NAVIGATION
   ============================================================ */
nav {
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 52px;
}

/* Logo */
.nav-logo-wrap {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  cursor: default;
  min-width: 0;
  margin-right: 20px;
}

.nav-logo-wrap.has-logo { cursor: pointer; }

body.is-admin .nav-logo-wrap.has-logo { cursor: pointer; }

.nav-logo-img {
  max-height: 42px;
  object-fit: contain;
}

.nav-logo-text {
  font-size: 11px;
  letter-spacing: 3px;
  color: #bbb;
  white-space: nowrap;
}

.nav-logo-wrap.has-logo .nav-logo-text { display: none; }

.nav-links {
  display: flex;
  gap: 24px;
  margin: 0 auto;
}

.nav-links a {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text);
  transition: color 0.2s;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover { color: var(--text-white); }
.nav-links a.active {
  color: var(--text-white);
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.nav-lock {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  padding: 4px;
  transition: color 0.2s;
}

.nav-lock:hover { color: var(--text-white); }
.nav-lock.logged-in { color: var(--text-white); }

.nav-bg-btn {
  display: none;
  background: none; border: none;
  color: var(--text); cursor: pointer;
  font-size: 13px; padding: 4px;
  transition: color 0.2s;
}
.nav-bg-btn:hover { color: var(--text-white); }
body.is-admin .nav-bg-btn { display: inline; }

/* Page bg dragger */
.page-bg-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 20000; cursor: default;
}

.page-bg-drag-wrap {
  position: absolute;
  cursor: move;
}

.page-bg-drag-wrap img {
  display: block;
}

.page-bg-drag-handle {
  position: absolute; right: -6px; bottom: -6px;
  width: 20px; height: 20px;
  background: rgba(255,255,255,0.4);
  cursor: nwse-resize;
  border-radius: 2px;
}

.page-bg-drag-btns {
  position: fixed; right: 20px; bottom: 20px;
  display: flex; gap: 10px; z-index: 20001;
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 20px; height: 1px; background: var(--text); margin: 5px 0; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.container-wide {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

.page {
  padding: 40px 0 80px;
  min-height: 60vh;
}

.page-title {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--text-white);
  margin-bottom: 36px;
  font-weight: 400;
  text-transform: uppercase;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 8px 24px;
  font-size: 11px;
  letter-spacing: 3px;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text);
  transition: all 0.2s;
  text-transform: uppercase;
}

.btn:hover {
  border-color: var(--text-white);
  color: var(--text-white);
}

.btn-sm {
  padding: 5px 14px;
  font-size: 10px;
  letter-spacing: 2px;
}

/* ============================================================
   CAROUSEL (index.html)
   ============================================================ */
.carousel {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
  background: #050505;
}

.carousel-slide {
  min-width: 100%;
}

.carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
}

.carousel-slide-placeholder {
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
  font-size: 11px;
  letter-spacing: 4px;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  font-family: serif;
  line-height: 1;
}

.carousel-btn:hover { color: rgba(255,255,255,0.9); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  border: none;
  transition: background 0.2s;
  padding: 0;
}

.carousel-dot.active { background: rgba(255,255,255,0.8); }

/* ============================================================
   ABOUT TEXT (index.html)
   ============================================================ */
.about-text {
  padding: 48px 0 0;
  font-size: 13px;
  line-height: 2;
  color: var(--text);
  white-space: pre-wrap;
}

/* ============================================================
   SCROLL CONTAINER (shows / merch)
   ============================================================ */
.scroll-wrap { position: relative; }

.scroll-nav {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}

.scroll-nav button {
  background: none;
  border: 1px solid var(--border-light);
  color: var(--text);
  font-size: 14px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.scroll-nav button:hover { border-color: var(--text-white); color: var(--text-white); }

.scroll-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 0 16px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar { display: none; }

/* Show card */
.show-card {
  flex: 0 0 240px;
  border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
}

.show-card:hover { border-color: #333; transform: translateY(-2px); }

.show-card-img {
  aspect-ratio: 2 / 3;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.show-card-img img { width: 100%; height: 100%; object-fit: contain; }

.show-card-img .placeholder {
  color: #333;
  font-size: 10px;
  letter-spacing: 2px;
}

.show-card-body { padding: 14px; }

.show-card-body h4 {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-white);
  margin-bottom: 4px;
  font-weight: 400;
}

.show-card-body .meta {
  font-size: 11px;
  color: #555;
  margin-bottom: 4px;
}

.show-card-body .desc {
  font-size: 10px;
  color: #444;
  line-height: 1.6;
}

/* Merch card */
.merch-card {
  flex: 0 0 200px;
  border: 1px solid var(--border);
  transition: border-color 0.2s;
  position: relative;
}

.merch-card:hover { border-color: #333; transform: translateY(-2px); }

.merch-card-img {
  position: relative;
  aspect-ratio: 4 / 5;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.merch-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.3s;
}

.merch-card-img .placeholder {
  color: #333;
  font-size: 10px;
  letter-spacing: 2px;
}

/* Multi-image dots */
.merch-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding: 6px 0 0;
}

.merch-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background 0.2s;
}

.merch-dot.active { background: var(--text); }

.merch-card-body { padding: 12px; text-align: center; }

.merch-card-body h4 {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-white);
  margin-bottom: 4px;
  font-weight: 400;
}

.merch-card-body .price {
  font-size: 13px;
  color: var(--text);
  letter-spacing: 2px;
}

.merch-card-body .desc {
  font-size: 10px;
  color: #444;
  line-height: 1.6;
  margin-top: 4px;
}

/* ============================================================
   CONTACT (contact.html)
   ============================================================ */
.contact-section { margin-bottom: 48px; }

.contact-section h3 {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 400;
  text-transform: uppercase;
}

.contact-section p {
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-light);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.social-link {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text);
  transition: all 0.2s;
}

.social-link:hover { border-color: var(--text-white); color: var(--text-white); }

body.is-admin .social-link { cursor: pointer; }
body.is-admin .social-link:hover { border-color: var(--text-white); color: var(--text-white); }

.contact-form { margin-top: 24px; }

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus { border-color: #333; }

.contact-form textarea { resize: vertical; min-height: 80px; }

/* ============================================================
   ALBUM GRID (gallery.html)
   ============================================================ */
.album-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.album-card {
  position: relative;
  cursor: pointer;
  transition: opacity 0.3s;
}

.album-card:hover { opacity: 0.85; }

.album-card .album-del-btn {
  position: absolute;
  top: 4px; right: 4px;
  z-index: 5;
}

.album-cover {
  aspect-ratio: 4 / 3;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.album-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.album-cover .placeholder {
  color: #333;
  font-size: 11px;
  letter-spacing: 3px;
}

.album-info {
  padding: 8px 0;
}

.album-name {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text);
}

.album-desc {
  display: block;
  font-size: 10px;
  color: #555;
  margin-top: 2px;
}

/* ============================================================
   NOTES (index.html 疯草向外生长)
   ============================================================ */
.notes-list { margin-bottom: 24px; }

.note-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.note-item:hover { background: rgba(255,255,255,0.015); }
.note-item.open {
  background: rgba(255,255,255,0.02);
  padding-left: 16px;
  border-left: 2px solid #333;
}

.note-item .admin-card-actions {
  position: absolute;
  top: 20px; right: 0;
  display: none;
  z-index: 2;
  gap: 4px;
}

body.is-admin .note-item .admin-card-actions { display: flex; }

.note-title {
  font-size: 14px; letter-spacing: 2px; color: #ccc;
  margin-bottom: 4px;
  padding-right: 60px;
}

.note-date {
  width: 40px;
  height: 1px; background: rgba(255,255,255,0.15);
  margin: 8px 0 12px;
  font-size: 0; color: transparent;
  border: none;
}

.note-preview {
  font-size: 12px; color: #777; line-height: 2;
  max-height: 72px; overflow: hidden;
}

.note-body {
  display: none;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: #ccc; line-height: 2.2;
}

.note-item.open .note-body { display: block; }

.note-item.open .note-preview { display: none; }

.note-body b, .note-body strong { color: #eee; }
.note-body u { text-decoration: underline; }
.note-body s, .note-body strike { color: #666; }
.note-body i, .note-body em { font-style: italic; }

.note-toolbar {
  display: flex; gap: 4px; margin-bottom: 10px;
  flex-wrap: wrap;
}

.note-toolbar button {
  background: #0a0a0a; border: 1px solid #333;
  color: #999; cursor: pointer; padding: 5px 12px;
  font-size: 11px; transition: all 0.2s;
  font-family: inherit;
}

.note-toolbar button:hover { border-color: #666; color: #fff; }

.note-toolbar select {
  padding: 5px 8px; font-size: 11px;
}

.note-editor {
  min-height: 180px; padding: 14px;
  background: #0a0a0a; border: 1px solid #333;
  color: #aaa; font-size: 13px; line-height: 2.2;
  outline: none;
}

.note-editor:focus { border-color: #666; }

/* ============================================================
   GALLERY (gallery.html)
   ============================================================ */
.gallery-grid {
  column-count: 3;
  column-gap: 8px;
}

.gallery-item {
  break-inside: avoid;
  margin-bottom: 8px;
  position: relative;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  display: block;
  transition: opacity 0.3s;
}

.gallery-item:hover img { opacity: 0.85; }

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 10px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-light);
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .caption { opacity: 1; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.lightbox.active { display: flex; }

.lightbox img {
  max-width: 90%;
  max-height: 85vh;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.lightbox-close:hover { color: var(--text-white); }

/* ============================================================
   GUESTBOOK (guestbook.html)
   ============================================================ */

.msg-list { margin-bottom: 32px; }

.msg-item {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}

.msg-item .msg-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.msg-item .msg-name {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-light);
}

.msg-item .msg-name.is-admin { color: var(--text-white); }

.msg-item .msg-time {
  font-size: 10px;
  color: #444;
}

.msg-item .msg-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.8;
  word-break: break-word;
}

.msg-item .msg-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}

.msg-item .msg-actions button {
  background: none;
  border: 1px solid var(--border);
  color: #555;
  padding: 3px 10px;
  font-size: 10px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.msg-item .msg-actions button:hover { border-color: #444; color: var(--text); }

.msg-item.reply { margin-left: 32px; padding-left: 0; }
.msg-item.reply-admin { border-left: 1px solid #333; padding-left: 16px; }

.msg-item.pinned {
  border-left: 2px solid #888;
  padding-left: 14px;
}

/* Emoji selector */
.emoji-picker {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-bottom: 6px;
}
.emoji-picker span {
  font-size: 14px; cursor: pointer;
  padding: 2px 4px; border: 1px solid transparent;
  border-radius: 0; transition: all 0.15s;
}
.emoji-picker span:hover { border-color: #555; }
.emoji-picker span.active { background: rgba(255,255,255,0.1); border-color: #666; }
.emoji-toggle { color: #666; font-size: 18px !important; }
.emoji-hint {
  font-size: 9px; color: #555; letter-spacing: 1px;
  margin-bottom: 4px;
}

/* Char counter */
.char-counter {
  text-align: right; font-size: 10px; color: #444;
  font-family: monospace; margin-top: 2px;
}

/* Fade-in */
@keyframes msgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.msg-item.new { animation: msgFadeIn 0.4s ease; }

/* Reply form */
.reply-form {
  display: none;
  margin-top: 8px;
  margin-left: 32px;
}
.reply-form.active { display: block; }

.reply-form textarea {
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  outline: none;
  resize: vertical;
  min-height: 50px;
}

.reply-form textarea:focus { border-color: #333; }

.reply-form .reply-actions {
  margin-top: 6px;
  display: flex;
  gap: 8px;
}

.empty-msg {
  text-align: center;
  color: #444;
  padding: 60px 20px;
  font-size: 11px;
  letter-spacing: 2px;
}

.guestbook-compose { margin-top: 24px; }

.guestbook-compose textarea {
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  outline: none;
  resize: vertical;
  min-height: 50px;
  margin-bottom: 8px;
}

.guestbook-compose textarea:focus { border-color: #333; }

/* ============================================================
   ADMIN — edit buttons
   ============================================================ */
.admin-edit-btn,
.admin-add-btn {
  display: none;
  margin-top: 12px;
  background: none;
  border: 1px solid var(--border);
  color: #555;
  font-size: 10px;
  letter-spacing: 2px;
  padding: 5px 14px;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.admin-edit-btn:hover,
.admin-add-btn:hover { border-color: var(--text-white); color: var(--text-white); }

.admin-card-actions {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 5;
  gap: 4px;
}

.admin-card-actions button {
  background: rgba(0,0,0,0.85);
  border: 1px solid #333;
  color: var(--text);
  font-size: 10px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.admin-card-actions button:hover { border-color: var(--text-white); color: var(--text-white); }

.admin-gallery-delete {
  display: none;
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.8);
  border: none;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  width: 24px;
  height: 24px;
  z-index: 5;
}

body.is-admin .admin-edit-btn,
body.is-admin .admin-add-btn,
body.is-admin .admin-card-actions,
body.is-admin .admin-gallery-delete { display: flex; }

body.is-admin .show-card,
body.is-admin .merch-card { position: relative; }

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 10001;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 28px;
  width: 360px;
  max-width: 90vw;
  position: relative;
}

.modal h3 {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--text-white);
  margin-bottom: 24px;
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
}

.modal input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 2px;
  outline: none;
  transition: border-color 0.2s;
}

.modal input:focus { border-color: #333; }

.modal .btn { width: 100%; }

.modal .modal-error {
  color: #666;
  font-size: 10px;
  text-align: center;
  margin-top: 8px;
  display: none;
  letter-spacing: 2px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
}

.modal-close:hover { color: var(--text-white); }

/* Edit modal */
.edit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 10002;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 20px;
}

.edit-overlay.active { display: flex; }

.edit-modal {
  background: #0a0a0a;
  border: 1px solid var(--border);
  padding: 24px;
  width: 520px;
  max-width: 95vw;
  position: relative;
}

.edit-modal h3 {
  font-size: 12px;
  letter-spacing: 4px;
  color: var(--text-white);
  margin-bottom: 20px;
  font-weight: 400;
  text-transform: uppercase;
  text-align: center;
}

.edit-modal label {
  display: block;
  font-size: 10px;
  letter-spacing: 2px;
  color: #555;
  margin-bottom: 4px;
  margin-top: 12px;
  text-transform: uppercase;
}

.edit-modal input,
.edit-modal textarea {
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 1px;
  outline: none;
  transition: border-color 0.2s;
}

.edit-modal input:focus,
.edit-modal textarea:focus { border-color: #333; }

.edit-modal textarea { min-height: 70px; resize: vertical; }

.edit-modal .img-preview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin-top: 8px;
  display: none;
}

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

.edit-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.edit-modal-close:hover { color: var(--text-white); }

/* ============================================================
   GAME CANVAS
   ============================================================ */
.game-wrap {
  padding: 0 0 8px;
  background: #000;
  cursor: pointer;
}

.game-wrap canvas {
  display: block;
  width: 100%;
  margin: 0 auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  text-align: center;
}

footer p {
  font-size: 10px;
  letter-spacing: 2px;
  color: #333;
}

/* ============================================================
   MERCH GALLERY MODAL
   ============================================================ */
.merch-gal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 10010;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.merch-gal-overlay.active { display: flex; }

.merch-gal-close {
  position: absolute;
  top: 16px; right: 24px;
  background: none; border: none;
  color: var(--text); font-size: 28px;
  cursor: pointer; line-height: 1;
  z-index: 10011;
}
.merch-gal-close:hover { color: var(--text-white); }

.merch-gal-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5); border: none;
  color: rgba(255,255,255,0.5); font-size: 40px;
  cursor: pointer; line-height: 1;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.2s; font-family: serif; z-index: 10011;
}
.merch-gal-nav:hover { color: var(--text-white); }
.merch-gal-prev { left: 8px; }
.merch-gal-next { right: 8px; }

.merch-gal-stage {
  flex: 1; display: flex; align-items: center; justify-content: center;
  max-width: 100%; max-height: 70vh; padding: 0 60px;
}
.merch-gal-stage img {
  max-width: 100%; max-height: 100%; object-fit: contain;
}

.merch-gal-info {
  display: flex; gap: 16px; align-items: baseline;
  margin: 12px 0 8px;
  font-size: 12px; letter-spacing: 1px;
}
.merch-gal-info #merch-gal-counter { color: #555; }
.merch-gal-info #merch-gal-name { color: var(--text-white); }
.merch-gal-info #merch-gal-price { color: var(--text); }

.merch-gal-thumbs {
  display: flex; gap: 6px; overflow-x: auto;
  padding-bottom: 8px; max-width: 100%;
  scrollbar-width: none;
}
.merch-gal-thumbs::-webkit-scrollbar { display: none; }

.merch-gal-thumb {
  width: 52px; height: 52px; object-fit: cover;
  cursor: pointer; opacity: 0.4; transition: opacity 0.2s;
  flex-shrink: 0; border: 1px solid transparent;
}
.merch-gal-thumb:hover { opacity: 0.7; }
.merch-gal-thumb.active { opacity: 1; border-color: var(--text); }

/* ============================================================
   MOBILE CONTROLS (像素虚线风)
   ============================================================ */
.mobile-controls { display: none !important; }
.mobile-controls.show {
  display: flex !important;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px 6px;
}
.mobile-dpad { display: flex; gap: 6px; }
.mobile-dpad button {
  width: 44px; height: 32px;
  border: 2px dashed #888; border-radius: 0;
  background: transparent;
  color: #888; font-size: 16px; font-family: monospace;
  box-shadow: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mobile-dpad button:active { color: #fff; border-color: #fff; }
.mobile-jump {
  width: 52px; height: 52px;
  border: 2px dashed #888; border-radius: 0;
  background: transparent;
  color: #888; font-family: monospace; font-size: 12px;
  font-weight: bold; letter-spacing: 2px;
  box-shadow: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.mobile-jump:active { color: #fff; border-color: #fff; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .nav-inner {
    position: relative;
    justify-content: flex-start;
  }

  .nav-logo-wrap {
    margin-right: 8px;
  }

  .nav-logo-text {
    font-size: 10px;
    letter-spacing: 2px;
  }

  .nav-toggle { display: block; }

  .nav-links {
    display: block;
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.97);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--border);
    z-index: 999;
    margin: 0;
  }
  .nav-links.open { max-height: 360px; }

  .nav-links a {
    display: block;
    padding: 14px 0;
    width: 100%;
    text-align: center;
    font-size: 11px;
    border-bottom: none;
  }

  .nav-lock {
    margin-left: auto;
  }

  .carousel-slide img { max-height: 45vh; }
  .album-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { column-count: 2; }
  .show-card { flex: 0 0 200px; }
  .merch-card { flex: 0 0 170px; }
  .msg-item.reply { margin-left: 16px; }
}

@media (max-width: 480px) {
  .gallery-grid { column-count: 1; }
  .msg-item.reply { margin-left: 12px; }
}
