@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

:root {
  --bg: #EDECE7;
  --surface: #F5F4F0;
  --card: #FFFFFF;

  --text: #1A1A1A;
  --text-secondary: #555555;
  --text-muted: #999999;

  --accent: #FFE600;
  --accent-hover: #FFD700;

  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.12);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
}

body.dark {
  --bg: #141414;
  --surface: #1d1d1d;
  --card: #262626;

  --text: #f0f0f0;
  --text-secondary: #b0b0b0;
  --text-muted: #707070;

  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.18);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.6);
}

:root {

  --radius-pill: 999px;
  --radius-card: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-squircle: 30%;

  --font-sans: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;

  --max-width: 1100px;
  --container-padding: 20px;
}

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

html {
  scrollbar-gutter: stable;
}

/* ===== App-level loading / error ===== */
.app-loading,
.app-error {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  z-index: 9999;
  padding: 24px;
  text-align: center;
  font-size: 14px;
}

.app-error-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
}

.app-error-msg {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  max-width: 480px;
  line-height: 1.5;
}

.app-error-retry {
  background: var(--text);
  color: var(--bg);
  border: none;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.app-error-retry:hover {
  opacity: 0.85;
}

/* ===== Login modal ===== */
.login-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
}

.login-modal-card {
  position: relative;
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-card);
  padding: 32px 28px 24px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 380px;
  text-align: center;
}

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

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

.login-modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-modal-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.login-modal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong, #d0d0d0);
  border-radius: var(--radius-pill);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 12px;
  font-family: inherit;
  box-sizing: border-box;
}

.login-modal-input:focus {
  outline: none;
  border-color: var(--text);
}

.login-modal-input:disabled {
  opacity: 0.6;
}

.login-modal-submit {
  width: 100%;
  padding: 12px 16px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.login-modal-submit:hover:not(:disabled) {
  opacity: 0.9;
}

.login-modal-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.login-modal-status {
  margin-top: 14px;
  font-size: 12px;
  line-height: 1.5;
  min-height: 16px;
  word-break: keep-all;
}

.login-modal-status.is-success {
  color: var(--text);
}

.login-modal-status.is-error {
  color: #e53e3e;
}

/* ===== Toast ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  z-index: 11000;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  max-width: calc(100% - 48px);
  text-align: center;
}

.toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast-success { background: #16a34a; color: #fff; }
.toast-error   { background: #dc2626; color: #fff; }

/* ===== Admin edit forms (Contact, Gallery, etc.) ===== */
.admin-edit-card {
  text-align: left;
}

.admin-edit-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  text-align: center;
}

.admin-edit-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 12px 0 6px;
}

.admin-edit-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-strong, #d0d0d0);
  border-radius: 8px;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  box-sizing: border-box;
  resize: vertical;
}

.admin-edit-input:focus {
  outline: none;
  border-color: var(--text);
}

.admin-edit-buttons {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  justify-content: center;
}

.admin-edit-save,
.admin-edit-reset {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.admin-edit-save {
  background: var(--text);
  color: var(--bg);
}

.admin-edit-save:hover:not(:disabled) {
  opacity: 0.9;
}

.admin-edit-save:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-edit-reset {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong, #d0d0d0);
}

.admin-edit-reset:hover {
  background: var(--card);
}

/* ===== Admin add form (Gallery, etc.) ===== */
.admin-add-form {
  margin-top: 24px;
  padding: 16px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.admin-add-row {
  display: flex;
  gap: 8px;
}

.admin-add-row .admin-edit-input {
  flex: 1;
}

.admin-add-row .admin-edit-save {
  flex-shrink: 0;
  padding: 10px 16px;
}

/* ===== Gallery admin overlay ===== */
.gallery-item {
  position: relative;
}

.gallery-admin-overlay {
  position: absolute;
  top: 6px;
  right: 6px;
  display: none;
  gap: 4px;
  z-index: 5;
}

body.is-admin .gallery-admin-overlay {
  display: flex;
}

.gallery-admin-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-admin-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.9);
}

.gallery-admin-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.gallery-admin-btn.gallery-admin-del {
  background: rgba(220, 38, 38, 0.85);
}

.gallery-admin-btn.gallery-admin-del:hover {
  background: rgba(220, 38, 38, 1);
}

/* ===== Generic card admin overlay (Videos, Covers) ===== */
.video-card {
  position: relative;
}

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

body.is-admin .card-admin-overlay {
  display: flex;
}

.card-admin-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-admin-btn:hover:not(:disabled) {
  background: rgba(0, 0, 0, 0.9);
}

.card-admin-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.card-admin-btn.card-admin-del {
  background: rgba(220, 38, 38, 0.85);
}

.card-admin-btn.card-admin-del:hover {
  background: rgba(220, 38, 38, 1);
}

/* ===== Admin "Add" button (Videos, Covers) ===== */
.admin-add-btn {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px 24px;
  background: var(--card);
  color: var(--text);
  border: 2px dashed var(--border-strong, #d0d0d0);
  border-radius: var(--radius-card);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

.admin-add-btn:hover {
  background: var(--surface);
  border-color: var(--text);
}

/* ===== Generic edit modal ===== */
.edit-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10500;
  padding: 24px;
}

.edit-modal-card {
  position: relative;
  background: var(--card);
  color: var(--text);
  border-radius: var(--radius-card);
  padding: 28px 24px 20px;
  box-shadow: var(--shadow-md);
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}

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

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

.edit-modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.edit-modal-body {
  margin-bottom: 8px;
}

/* ===== File upload field ===== */
.admin-edit-file {
  margin-bottom: 4px;
}

.admin-edit-file-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.admin-edit-file-row .admin-edit-input {
  flex: 1;
  min-width: 0;
}

.admin-edit-upload-btn {
  flex-shrink: 0;
  padding: 0 14px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong, #d0d0d0);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.admin-edit-upload-btn:hover:not(:disabled) {
  background: var(--card);
}

.admin-edit-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.admin-upload-status {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 6px;
  min-height: 14px;
  word-break: keep-all;
}

.admin-upload-status.is-success {
  color: #16a34a;
}

.admin-upload-status.is-error {
  color: #dc2626;
}

/* ===== Discography admin: release header ===== */
.release-admin-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 16px 0 12px;
  flex-wrap: wrap;
}

.release-admin-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  background: #ddd;
  flex-shrink: 0;
}

.release-admin-info {
  flex: 1;
  min-width: 120px;
}

.release-admin-title {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.release-admin-meta {
  font-size: 12px;
  color: var(--text-secondary);
}

.release-admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.release-admin-btn {
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong, #d0d0d0);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.release-admin-btn:hover:not(:disabled) {
  background: var(--card);
}

.release-admin-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.release-admin-btn.release-admin-del {
  color: #dc2626;
  border-color: #fecaca;
}

.release-admin-btn.release-admin-del:hover {
  background: rgba(220, 38, 38, 0.08);
}

/* ===== Discography admin: add section at bottom ===== */
.admin-add-section {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ===== Nav admin: inline rename + visibility toggle ===== */
.nav-item-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

body.is-admin .nav-link {
  user-select: none;
}

.nav-link.is-hidden-by-admin {
  opacity: 0.4;
}

.nav-link-rename-input {
  background: transparent;
  border: none;
  outline: 1px solid var(--text);
  outline-offset: -1px;
  border-radius: 4px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: inherit;
  padding: 0;
  text-align: center;
  min-width: 60px;
}

.nav-link-rename-input:focus {
  outline: 2px solid var(--text);
}

.nav-visibility-toggle {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong, #d0d0d0);
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.nav-visibility-toggle:hover {
  background: var(--card);
}

/* ===== YouTube embed video card ===== */
.video-wrap-youtube {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  overflow: hidden;
}

.video-iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.video-muted-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  user-select: none;
  letter-spacing: 0.02em;
}

.video-muted-badge:hover {
  background: rgba(0, 0, 0, 0.95);
}

.video-card-youtube .card-admin-overlay {
  z-index: 11;
}

/* YouTube page uses the same slot-based layout as Videos/Covers (defined below). */

/* ===== Click-to-play self-host video (YouTube page) ===== */
.video-wrap-clickplay {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.video-wrap-clickplay video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

html, body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  padding-bottom: 80px;
}

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

img, video {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

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

.page-card {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 32px 24px 40px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}

/* ===== Top bar ===== */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  color: var(--text);
}

.icon-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* ===== Profile header ===== */
.profile-header {
  text-align: center;
  padding: 8px 0 24px;
}

.profile-image {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-squircle);
  object-fit: cover;
  margin: 0 auto 16px;
  box-shadow: var(--shadow-sm);
}

.profile-image-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto;
}
.profile-image-wrap .profile-image {
  margin: 0 0 16px;
}
.profile-image-edit-btn,
.profile-socials-edit-btn {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  line-height: 1;
}
.profile-image-edit-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  z-index: 2;
}
.profile-socials-edit-btn {
  width: 28px;
  height: 28px;
}
.profile-image-edit-btn:hover,
.profile-socials-edit-btn:hover {
  opacity: 0.7;
}

/* ===== Inline-editable text (dblclick) ===== */
.inline-editable {
  cursor: text;
}
.inline-edit-input {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
  color: var(--text);
  font: inherit;
  outline: none;
  box-sizing: border-box;
}
.inline-edit-input:focus {
  border-color: var(--text);
}

.edit-modal-card-wide {
  max-width: 640px;
}
.social-modal-hint {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.social-links-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.social-row {
  display: grid;
  grid-template-columns: auto auto auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.social-row-move-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.social-row-move-btn {
  width: 24px;
  height: 18px;
  font-size: 11px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 3px;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.social-row-move-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.social-row-icon {
  width: 22px;
  height: 22px;
}
.social-row-name {
  font-size: 13px;
  color: var(--text);
  min-width: 100px;
}
.social-row-visible {
  font-size: 12px;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.social-row-url {
  flex: 1;
  min-width: 0;
}
@media (max-width: 600px) {
  .social-row {
    grid-template-columns: auto auto 1fr;
  }
  .social-row-name { display: none; }
  .social-row-visible { grid-column: span 3; }
  .social-row-url { grid-column: span 3; }
}

.profile-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.profile-tagline {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 400;
}

/* ===== Profile social icons ===== */
.profile-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, opacity 0.15s;
}

.social-icon-link:hover {
  transform: translateY(-1px);
  opacity: 0.7;
}

.social-icon-img {
  width: 22px;
  height: 22px;
  display: none;
}

.social-icon-img.for-light { display: block; }
body.dark .social-icon-img.for-light { display: none; }
body.dark .social-icon-img.for-dark { display: block; }

.social-icon-placeholder {
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-icon-mask {
  display: inline-block;
  background-color: var(--text);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.social-icon-mask-melon {
  width: 22px;
  height: 22px;
  -webkit-mask-image: url('../assets/logo/melon.svg');
  mask-image: url('../assets/logo/melon.svg');
}

.social-icon-mask-genie {
  width: 22px;
  height: 22px;
  -webkit-mask-image: url('../assets/logo/genie-g.svg');
  mask-image: url('../assets/logo/genie-g.svg');
}

/* ===== Navigation (pill links) ===== */
.nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border-radius: var(--radius-pill);
  padding: 16px 24px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  text-align: center;
}

.nav-link:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.nav-link.is-active {
  background: var(--text);
  color: var(--bg);
}

.nav-link .icon {
  position: absolute;
  left: 24px;
  font-size: 18px;
}

/* horizontal nav (sub-pages) */
.nav-horizontal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 8px 0 24px;
}

.nav-horizontal .nav-link {
  flex: 0 0 auto;
  padding: 10px 18px;
  font-size: 13px;
}

/* ===== Section heading ===== */
.section-heading {
  font-size: 18px;
  font-weight: 700;
  margin: 32px 0 16px;
  letter-spacing: -0.01em;
}

.section-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 32px 0 16px;
}

.section-heading-row .section-heading {
  margin: 0;
}

.section-link {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
}

.section-link:hover {
  color: var(--text);
}

/* ===== Album / release card ===== */
.releases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.release-card-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
}

.release-card-wrapper > .release-card {
  flex: 1;
  transition: border-radius 0.15s, box-shadow 0.2s, transform 0.2s;
}

.release-card-wrapper:hover {
  z-index: 10;
}

.release-card-wrapper:hover > .release-card {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.release-link-list {
  position: absolute;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  background: var(--card);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding: 8px 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 5;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  box-shadow: var(--shadow-md);
  clip-path: inset(0 -40px -40px -40px);
}

.release-card-wrapper:hover .release-link-list {
  opacity: 1;
  visibility: visible;
}

.release-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--brand);
  color: var(--brand-text, #fff);
  text-align: center;
  letter-spacing: 0.01em;
  transition: padding 0.2s, background 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
  text-decoration: none;
  line-height: 1.1;
  border: 1.5px solid var(--brand);
  position: relative;
  overflow: hidden;
}

.release-link-btn::after {
  content: '→';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  font-weight: 700;
}

.release-link-btn:hover {
  background: var(--brand-text, #fff);
  color: var(--brand);
  padding-right: 30px;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.release-link-btn:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.release-card.is-muted .release-play-indicator {
  background: rgba(140, 140, 140, 0.85);
  color: #fff;
}

.release-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  overflow: hidden;
}

.release-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.release-cover {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #ddd;
  position: relative;
}

.release-cover-wrap {
  position: relative;
  margin-bottom: 12px;
}

.release-play-indicator {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  box-shadow: var(--shadow-md);
  font-size: 12px;
}

.release-card:hover .release-play-indicator {
  opacity: 1;
}

.release-play-indicator.is-playing {
  opacity: 1;
  background: var(--accent);
}

.release-meta {
  padding: 0 4px 4px;
  position: relative;
}

.release-lyrics {
  position: absolute;
  inset: 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease;
  overflow-y: auto;
  padding: 4px 6px;
  pointer-events: auto;
  z-index: 2;
}

.release-card-wrapper:hover .release-lyrics {
  opacity: 1;
  visibility: visible;
}

.release-card-wrapper:hover .release-lyrics.is-empty {
  opacity: 0;
  visibility: hidden;
}

.release-lyrics-content {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.lyrics-line {
  font-size: 11px;
  line-height: 1.55;
  color: var(--text-muted);
  word-break: keep-all;
  padding: 1px 2px;
  transition: color 0.18s ease, font-weight 0.18s ease, transform 0.2s ease;
  transform-origin: left center;
}

.lyrics-line.is-active {
  color: var(--text);
  font-weight: 700;
  transform: scale(1.02);
}

.release-lyrics::-webkit-scrollbar {
  width: 4px;
}
.release-lyrics::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 2px;
}

.release-type {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.release-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.release-year {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Track list ===== */
.tracklist {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--shadow-sm);
}

.track {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.track:hover {
  background: rgba(0, 0, 0, 0.03);
}

.track.is-playing {
  background: rgba(255, 230, 0, 0.15);
}

.track-num {
  width: 24px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  flex-shrink: 0;
}

.track-title {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.track-icon {
  font-size: 14px;
  color: var(--text-muted);
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* ===== Release detail (expanded view) ===== */
.release-detail {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 24px;
  box-shadow: var(--shadow-sm);
}

.release-detail-header {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.release-detail-cover {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.release-detail-info {
  flex: 1;
  min-width: 200px;
}

.release-detail-info .release-type {
  margin-bottom: 8px;
}

.release-detail-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.release-detail-year {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== Video grid (slot-based: each row = 1 horizontal OR 2 vertical paired) ===== */
.video-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.video-slot {
  display: grid;
  gap: 16px;
}
.video-slot[data-type="horizontal"] {
  grid-template-columns: 1fr;
}
.video-slot[data-type="vertical-pair"],
.video-slot[data-type="vertical-single"] {
  grid-template-columns: 1fr 1fr;
}

.video-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.video-wrap {
  position: relative;
  background: #000;
}

.video-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
  display: block;
}

.video-card.landscape video {
  aspect-ratio: 16 / 9;
}

.video-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  z-index: 2;
  transition: height 0.15s;
}

.video-progress:hover {
  height: 10px;
}

.video-progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  pointer-events: none;
  transition: width 0.05s linear;
}

.video-card-meta {
  padding: 12px 14px;
}

.video-card-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.video-card-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.gallery-item {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
  cursor: zoom-in;
}

.gallery-item:hover {
  transform: scale(1.02);
}

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

/* ===== Contact ===== */
.contact-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.contact-note {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.contact-button {
  display: block;
  background: var(--accent);
  color: #1A1A1A;
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  margin-bottom: 12px;
  transition: transform 0.15s, background 0.15s;
  font-size: 14px;
  text-align: center;
}

.contact-button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.contact-button.secondary {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.contact-button.secondary:hover {
  background: var(--surface);
}

/* ===== About (activity history) ===== */
.about-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}

.about-item-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.about-item-year {
  position: absolute;
  top: 14px;
  left: 18px;
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.about-item-cover {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin: 0 auto 20px;
  background: #ddd;
  display: block;
}

.about-item-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.4;
  word-break: keep-all;
}

.about-item-category {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.about-item-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  word-break: keep-all;
  white-space: pre-line;
}

.about-item-admin {
  display: none;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}

body.is-admin .about-item-admin {
  display: flex;
}

.about-reorder-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong, #d0d0d0);
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}

.about-reorder-btn:hover:not(:disabled) {
  background: var(--card);
}

.about-reorder-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ===== About profile card (bottom) ===== */
.about-card {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  margin-top: 16px;
}

.about-card .profile-image {
  width: 160px;
  height: 160px;
  margin-bottom: 20px;
}

.about-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.about-tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.about-bio {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  max-width: 480px;
  margin: 0 auto;
  text-align: left;
}

/* ===== Footer social ===== */
.footer-social {
  display: flex;
  gap: 24px;
  justify-content: center;
  padding: 32px 0 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.footer-social a {
  transition: color 0.15s;
}

.footer-social a:hover {
  color: var(--text);
}

.footer-credit {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 16px 0;
}

/* ===== Modal (song detail) ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--card);
  border-radius: var(--radius-card);
  padding: 32px 28px 24px;
  max-width: 380px;
  width: 100%;
  position: relative;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: modalRise 0.2s ease-out;
}

@keyframes modalRise {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

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

.modal-cover {
  width: 180px;
  height: 180px;
  border-radius: var(--radius-md);
  margin: 0 auto 16px;
  object-fit: cover;
  box-shadow: var(--shadow-md);
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.modal-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.modal-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 12px 20px;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s, transform 0.15s;
  position: relative;
}

.modal-link:hover {
  background: var(--bg);
  transform: translateY(-1px);
}

.modal-link.is-fallback {
  opacity: 0.6;
}

.modal-link.is-fallback:hover {
  opacity: 1;
}

.modal-link-emoji {
  font-size: 16px;
}

.modal-link-tag {
  position: absolute;
  right: 14px;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.modal-open {
  overflow: hidden;
}

/* ===== Preview editor (admin) ===== */
.modal.preview-editor {
  max-width: 480px;
}

.modal.preview-editor audio {
  width: 100%;
  margin: 12px 0 6px;
  outline: none;
}

.preview-test-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 14px;
  margin-bottom: 8px;
}

.modal.preview-editor audio + .preview-capture-row {
  margin-top: 18px;
}

/* Mini player (preview range custom controls) */
.mini-player {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  margin-bottom: 14px;
}

.mini-player audio {
  display: none;
}

.mini-play-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.mini-play-btn:hover {
  background: var(--border);
}

.mini-time {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  flex-shrink: 0;
  min-width: 80px;
}

.mini-progress {
  flex: 1;
  height: 16px;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.mini-progress::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--border);
  border-radius: 2px;
}

.mini-progress-bar {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 4px;
  background: var(--text);
  border-radius: 2px;
  width: 0%;
  pointer-events: none;
  transition: width 0.05s linear;
}

.mini-progress-bar::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
}

.mini-progress:hover .mini-progress-bar::after,
.mini-player.is-dragging .mini-progress-bar::after {
  opacity: 1;
}

.mini-player.is-dragging .mini-progress-bar {
  transition: none;
}

.preview-capture-row {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.preview-capture-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.preview-btn {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}

.preview-btn:hover {
  background: var(--bg);
  transform: translateY(-1px);
}

.preview-btn-test {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.preview-btn-test:hover {
  background: var(--text);
  opacity: 0.85;
}

.preview-btn-save {
  background: var(--accent);
  color: #1A1A1A;
  border-color: var(--accent);
}

.preview-btn-save:hover {
  background: var(--accent-hover);
}

.preview-time-label {
  font-size: 12px;
  color: var(--text-secondary);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.preview-time-value {
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.preview-time-input {
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 4px 8px;
  width: 80px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 0.15s;
}

.preview-time-input:focus {
  border-color: var(--accent);
}

.preview-actions {
  display: flex;
  gap: 8px;
}

.preview-actions .preview-btn {
  flex: 1;
}

.preview-section-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 18px;
  margin-bottom: 8px;
}

.lyrics-edit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding: 2px;
}

.lyrics-edit-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lyrics-capture-btn {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 11px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  transition: background 0.15s;
}

.lyrics-capture-btn:hover {
  background: var(--bg);
}

.lyrics-time-input {
  flex-shrink: 0;
  width: 78px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 5px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  outline: none;
  text-align: center;
  transition: border-color 0.15s;
}

.lyrics-time-input:focus {
  border-color: var(--accent);
}

.lyrics-text-input {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

.lyrics-text-input:focus {
  border-color: var(--accent);
}

.lyrics-remove-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: transparent;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.lyrics-remove-btn:hover {
  background: var(--surface);
  color: var(--text);
}

.lyrics-add-btn {
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  width: 100%;
  margin-bottom: 18px;
  transition: background 0.15s, color 0.15s;
}

.lyrics-add-btn:hover {
  background: var(--bg);
  color: var(--text);
}

/* ===== Theme toggle (fixed top-right, left of volume) ===== */
.theme-toggle {
  position: fixed;
  top: 16px;
  right: 64px;
  width: 40px;
  height: 40px;
  background: var(--card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 100;
  cursor: pointer;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s, color 0.2s;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 540px) {
  .theme-toggle {
    top: 12px;
    right: 60px;
  }
}

/* ===== Admin/Logout toggle (fixed top-left, temporary placeholder) ===== */
.admin-toggle {
  position: fixed;
  top: 20px;
  left: 24px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--text-secondary);
  text-decoration: none;
  cursor: pointer;
  z-index: 100;
  transition: color 0.15s;
  user-select: none;
}

.admin-toggle:hover {
  color: var(--text);
}

/* ===== Volume control (fixed top-right, expandable on hover) ===== */
.volume-control {
  position: fixed;
  top: 16px;
  right: 16px;
  background: var(--card);
  height: 40px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-md);
  z-index: 100;
  font-size: 12px;
  color: var(--text-secondary);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.volume-control:hover {
  box-shadow: var(--shadow-lg);
}

.volume-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text);
  cursor: pointer;
}

.volume-icon svg {
  width: 18px;
  height: 18px;
}

.volume-slider-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  padding-left: 0;
  transition: width 0.28s ease, opacity 0.2s ease, padding 0.28s ease;
}

.volume-control:hover .volume-slider-wrap,
.volume-control.is-open .volume-slider-wrap {
  width: 170px;
  opacity: 1;
  padding-left: 18px;
  padding-right: 8px;
}

.volume-control .volume-label {
  min-width: 38px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.volume-control input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 4px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: 2px solid var(--card);
  box-shadow: var(--shadow-sm);
}

.volume-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  cursor: pointer;
  border: 2px solid var(--card);
}

@media (max-width: 540px) {
  .volume-control {
    top: 12px;
    right: 12px;
  }
  .volume-control:hover .volume-slider-wrap,
  .volume-control.is-open .volume-slider-wrap {
    width: 130px;
    padding-left: 14px;
    padding-right: 4px;
  }
  .volume-control input[type="range"] {
    width: 90px;
  }
  .volume-control .volume-label {
    display: none;
  }
}

/* ===== Utility ===== */
.hidden { display: none !important; }

.text-center { text-align: center; }

@media (max-width: 540px) {
  .releases-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== Video thumbnail editor ===== */
.admin-edit-thumbnail {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.thumbnail-preview {
  display: block;
  max-width: 320px;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.1);
}
.thumbnail-placeholder {
  padding: 16px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
}
.thumbnail-editor {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.thumbnail-video {
  display: block;
  max-width: 320px;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
}
.thumbnail-slider {
  width: 100%;
}
.thumbnail-time {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.thumbnail-btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.thumbnail-action-btn {
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.thumbnail-action-btn:hover {
  background: var(--bg);
}
.thumbnail-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== Video orientation override field ===== */
.admin-edit-orientation {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.orientation-radio-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.orientation-radio-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.orientation-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.orientation-preview-label {
  font-size: 12px;
  color: var(--muted);
}
.orientation-preview-box {
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  cursor: grab;
  user-select: none;
  position: relative;
}
.orientation-preview-box:active {
  cursor: grabbing;
}
.orientation-preview-video {
  display: block;
  pointer-events: none;
}
.orientation-pos-label {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
