:root {
  --ink: #2d2540;
  --muted: #665b75;
  --paper: #fffdf8;
  --cream: #fff7dc;
  --rose: #ff8faf;
  --peach: #ffc078;
  --sun: #ffe66d;
  --mint: #91e6c4;
  --sky: #8fd4ff;
  --lilac: #c5a3ff;
  --line: rgba(45, 37, 64, 0.14);
  --shadow: 0 18px 45px rgba(69, 47, 89, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 246, 225, 0.96), rgba(255, 253, 248, 0.98) 44%),
    repeating-linear-gradient(90deg, rgba(255, 143, 175, 0.14) 0 22px, rgba(143, 212, 255, 0.12) 22px 44px);
}

body.theme-junina {
  --ink: #2f2115;
  --muted: #6d563d;
  --paper: #fffaf0;
  --cream: #fff1c6;
  --rose: #d93636;
  --peach: #f29f3f;
  --sun: #ffd65a;
  --mint: #3faf6c;
  --sky: #2f83cc;
  --lilac: #7c4f9f;
  background:
    linear-gradient(180deg, rgba(255, 247, 226, 0.97), rgba(255, 252, 244, 0.98) 48%),
    repeating-linear-gradient(90deg, rgba(217, 54, 54, 0.13) 0 24px, rgba(255, 214, 90, 0.13) 24px 48px, rgba(47, 131, 204, 0.1) 48px 72px);
}

body.theme-butanta {
  --ink: #18312c;
  --muted: #52685f;
  --paper: #fbfff8;
  --cream: #edf8df;
  --rose: #bf4f3c;
  --peach: #d8963b;
  --sun: #f2cf5b;
  --mint: #67b87c;
  --sky: #3d8aa8;
  --lilac: #7b8fb8;
  background:
    linear-gradient(180deg, rgba(246, 253, 237, 0.97), rgba(252, 255, 248, 0.98) 48%),
    repeating-linear-gradient(90deg, rgba(103, 184, 124, 0.12) 0 26px, rgba(61, 138, 168, 0.1) 26px 52px, rgba(242, 207, 91, 0.12) 52px 78px);
}

body.album-index-page {
  background:
    linear-gradient(180deg, rgba(255, 247, 226, 0.96), rgba(255, 253, 248, 0.98) 48%),
    repeating-linear-gradient(90deg, rgba(217, 54, 54, 0.1) 0 22px, rgba(63, 175, 108, 0.1) 22px 44px, rgba(47, 131, 204, 0.09) 44px 66px);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  width: 1.1em;
  height: 1.1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(100%, 440px);
}

.login-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 34px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

.bear-mark {
  position: relative;
  width: 78px;
  height: 72px;
  margin-bottom: 16px;
}

.bear-ear,
.bear-face {
  position: absolute;
  background: #ffd4df;
  border: 3px solid rgba(45, 37, 64, 0.16);
}

.bear-ear {
  top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.bear-ear.left {
  left: 6px;
}

.bear-ear.right {
  right: 6px;
}

.bear-face {
  left: 7px;
  right: 7px;
  bottom: 0;
  height: 58px;
  border-radius: 32px 32px 26px 26px;
  box-shadow: 0 10px 18px rgba(255, 143, 175, 0.18);
}

.bear-eye,
.bear-nose {
  position: absolute;
  background: var(--ink);
}

.bear-eye {
  top: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.bear-eye.left {
  left: 18px;
}

.bear-eye.right {
  right: 18px;
}

.bear-nose {
  top: 28px;
  left: 50%;
  width: 11px;
  height: 8px;
  border-radius: 50% 50% 44% 44%;
  transform: translateX(-50%);
}

.bear-belly {
  position: absolute;
  left: 50%;
  bottom: 8px;
  display: flex;
  width: 34px;
  height: 18px;
  overflow: hidden;
  border-radius: 18px 18px 4px 4px;
  transform: translateX(-50%);
}

.bear-belly i {
  flex: 1;
}

.bear-belly i:nth-child(1) {
  background: var(--rose);
}

.bear-belly i:nth-child(2) {
  background: var(--sun);
}

.bear-belly i:nth-child(3) {
  background: var(--mint);
}

.bear-belly i:nth-child(4) {
  background: var(--sky);
}

.junina-mark {
  position: relative;
  width: 142px;
  height: 70px;
  margin-bottom: 18px;
}

.junina-flags {
  position: absolute;
  inset: 0 0 auto;
  display: flex;
  justify-content: space-between;
  height: 36px;
  border-top: 3px solid rgba(47, 33, 21, 0.26);
  transform: rotate(-3deg);
}

.junina-flags.second {
  top: 28px;
  left: 12px;
  right: 8px;
  height: 34px;
  transform: rotate(4deg);
}

.junina-flags i {
  width: 18px;
  height: 24px;
  clip-path: polygon(0 0, 100% 0, 100% 82%, 50% 100%, 0 82%);
  box-shadow: 0 8px 16px rgba(69, 47, 89, 0.12);
}

.junina-flags i:nth-child(1) {
  background: #d93636;
}

.junina-flags i:nth-child(2) {
  background: #ffd65a;
}

.junina-flags i:nth-child(3) {
  background: #3faf6c;
}

.junina-flags i:nth-child(4) {
  background: #2f83cc;
}

.junina-flags i:nth-child(5) {
  background: #f29f3f;
}

.butanta-mark {
  position: relative;
  width: 142px;
  height: 86px;
  margin-bottom: 16px;
}

.butanta-sun {
  position: absolute;
  top: 2px;
  right: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 10px 22px rgba(216, 150, 59, 0.2);
}

.butanta-leaf {
  position: absolute;
  bottom: 8px;
  width: 54px;
  height: 64px;
  border-radius: 54px 4px 54px 4px;
  background: linear-gradient(135deg, var(--mint), #2f7d55);
  box-shadow: 0 12px 22px rgba(24, 49, 44, 0.14);
}

.butanta-leaf.left {
  left: 14px;
  transform: rotate(-24deg);
}

.butanta-leaf.right {
  right: 20px;
  bottom: 0;
  background: linear-gradient(135deg, var(--sky), #225f70);
  transform: rotate(28deg);
}

.butanta-building {
  position: absolute;
  left: 42px;
  bottom: 4px;
  display: flex;
  align-items: end;
  gap: 7px;
  padding: 10px 12px 8px;
  border-radius: 8px 8px 4px 4px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(24, 49, 44, 0.16);
}

.butanta-building i {
  width: 10px;
  height: 28px;
  border-radius: 6px 6px 2px 2px;
  background: var(--ink);
  opacity: 0.72;
}

.butanta-building i:nth-child(2) {
  height: 38px;
  background: var(--rose);
}

.butanta-building i:nth-child(3) {
  height: 24px;
  background: var(--peach);
}

.album-header .bear-mark {
  margin-bottom: 18px;
}

.rainbow-mark {
  display: flex;
  gap: 7px;
  height: 34px;
  margin-bottom: 22px;
  align-items: end;
}

.rainbow-mark span {
  width: 48px;
  border: 5px solid currentColor;
  border-bottom: 0;
  border-radius: 48px 48px 0 0;
}

.rainbow-mark span:nth-child(1) {
  height: 34px;
  color: var(--rose);
}

.rainbow-mark span:nth-child(2) {
  height: 28px;
  color: var(--peach);
}

.rainbow-mark span:nth-child(3) {
  height: 22px;
  color: var(--mint);
}

.rainbow-mark span:nth-child(4) {
  height: 16px;
  color: var(--sky);
}

.eyebrow {
  margin: 0 0 8px;
  color: #8b4775;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.9rem, 6.4vw, 3.85rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.login-panel h1 {
  font-size: clamp(2rem, 10vw, 3.25rem);
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.login-form label {
  font-weight: 800;
}

.field-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
}

.field-row input {
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.field-row input:first-child {
  grid-column: 1 / -1;
}

.form-error {
  margin: 0;
  color: #a32348;
  font-weight: 700;
}

.primary-button,
.icon-button,
.logout-button,
.upload-button,
.delete-button,
.delete-selected-button,
.filter-chip,
.card-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid rgba(45, 37, 64, 0.16);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  padding: 0 18px;
  background: linear-gradient(90deg, var(--rose), var(--peach), var(--sun), var(--mint), var(--sky));
  box-shadow: 0 10px 22px rgba(255, 143, 175, 0.24);
}

.theme-junina .primary-button {
  background: linear-gradient(90deg, #d93636, #f29f3f, #ffd65a, #3faf6c, #2f83cc);
  box-shadow: 0 10px 22px rgba(217, 54, 54, 0.18);
}

.theme-butanta .primary-button {
  background: linear-gradient(90deg, #bf4f3c, #d8963b, #f2cf5b, #67b87c, #3d8aa8);
  box-shadow: 0 10px 22px rgba(61, 138, 168, 0.18);
}

.icon-button,
.logout-button,
.upload-button,
.delete-button,
.delete-selected-button,
.card-download,
.filter-chip {
  background: rgba(255, 255, 255, 0.72);
}

.primary-button:hover,
.icon-button:hover,
.logout-button:hover,
.upload-button:hover,
.delete-button:hover,
.delete-selected-button:hover:not(:disabled),
.filter-chip:hover,
.card-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(69, 47, 89, 0.12);
}

.album-header {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
}

.header-rainbow {
  height: 12px;
  background: linear-gradient(90deg, var(--rose), var(--peach), var(--sun), var(--mint), var(--sky), var(--lilac));
}

.theme-junina .header-rainbow {
  height: 16px;
  background:
    linear-gradient(135deg, transparent 0 42%, rgba(255, 255, 255, 0.28) 43% 56%, transparent 57%),
    repeating-linear-gradient(90deg, #d93636 0 42px, #ffd65a 42px 84px, #3faf6c 84px 126px, #2f83cc 126px 168px, #f29f3f 168px 210px);
}

.theme-butanta .header-rainbow {
  height: 14px;
  background:
    linear-gradient(90deg, #18312c, #3d8aa8, #67b87c, #f2cf5b, #d8963b, #bf4f3c);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: clamp(28px, 7vw, 64px) 0 28px;
  align-items: end;
}

.public-header-inner {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.admin-header-inner {
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.public-header-inner h1,
.admin-header-inner h1,
.public-header-inner .subtitle,
.admin-header-inner .subtitle {
  max-width: 100%;
}

.public-header-inner .public-actions {
  justify-content: start;
}

.admin-header-inner .header-actions {
  justify-content: start;
}

.admin-header-copy {
  min-width: 0;
}

.header-top-action {
  position: absolute;
  z-index: 4;
  top: 28px;
  right: max(16px, calc((100vw - 1180px) / 2));
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-top-action form {
  margin: 0;
}

.admin-actions {
  width: 100%;
  margin-top: 24px;
  gap: 14px;
}

.admin-actions .public-link,
.admin-actions .upload-button,
.admin-actions .primary-button {
  min-height: 44px;
  padding-inline: 16px;
}

.admin-actions .public-link {
  min-width: min(100%, 300px);
  justify-content: center;
}

.subtitle {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.28rem);
  line-height: 1.45;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
}

.header-actions form {
  margin: 0;
}

.public-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.84rem;
  font-weight: 850;
  text-decoration: none;
}

.upload-form {
  margin: 0;
}

.upload-button,
.logout-button,
.delete-button,
.delete-selected-button {
  min-height: 38px;
  padding: 0 12px;
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.upload-button.is-uploading {
  opacity: 0.72;
  cursor: progress;
}

.public-actions {
  align-self: start;
}

.public-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: #8b4775;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 850;
}

.upload-feedback {
  margin: 14px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  font-weight: 760;
}

.upload-feedback.success {
  color: #2d5c4d;
  background: rgba(145, 230, 196, 0.24);
}

.upload-feedback.warning {
  color: #8b4775;
  background: rgba(255, 230, 109, 0.22);
}

.upload-progress-card {
  position: fixed;
  right: max(16px, calc((100vw - 1180px) / 2));
  bottom: 16px;
  z-index: 1200;
  width: min(430px, calc(100vw - 32px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--shadow);
}

.upload-progress-card[hidden] {
  display: none;
}

.upload-progress-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.upload-progress-head strong,
.upload-progress-head span {
  display: block;
}

.upload-progress-head strong {
  font-size: 0.98rem;
}

.upload-progress-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 720;
}

.upload-cancel-button {
  min-height: 34px;
  border: 1px solid rgba(45, 37, 64, 0.16);
  border-radius: 8px;
  padding: 0 10px;
  color: #a32348;
  background: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
}

.upload-cancel-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.upload-progress-track {
  height: 10px;
  overflow: hidden;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(45, 37, 64, 0.12);
}

.upload-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--peach), var(--sun), var(--mint), var(--sky));
  transition: width 160ms ease;
}

.upload-progress-card.is-indeterminate .upload-progress-track span {
  width: 42%;
  animation: upload-indeterminate 1.15s ease-in-out infinite;
}

.upload-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 820;
}

.upload-file-list {
  display: grid;
  gap: 6px;
  max-height: 132px;
  overflow: auto;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.upload-file-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  border: 1px solid rgba(45, 37, 64, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 760;
}

.upload-file-list span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-file-list small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 820;
}

.upload-progress-card.is-success .upload-progress-track span {
  background: linear-gradient(90deg, var(--mint), var(--sky));
}

.upload-progress-card.is-error .upload-progress-track span,
.upload-progress-card.is-canceled .upload-progress-track span {
  background: linear-gradient(90deg, #ff8faf, #ffc078);
}

@keyframes upload-indeterminate {
  0% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(250%);
  }
}

.album-main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 52px;
}

.index-mark {
  display: flex;
  align-items: end;
  gap: 8px;
  width: 120px;
  height: 70px;
  margin-bottom: 18px;
}

.index-mark span {
  flex: 1;
  border-radius: 8px 8px 2px 2px;
}

.index-mark span:nth-child(1) {
  height: 42px;
  background: var(--rose);
}

.index-mark span:nth-child(2) {
  height: 62px;
  background: var(--sun);
}

.index-mark span:nth-child(3) {
  height: 50px;
  background: var(--sky);
}

.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.event-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  box-shadow: 0 14px 32px rgba(69, 47, 89, 0.1);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(69, 47, 89, 0.15);
}

.event-card.theme-junina {
  background:
    linear-gradient(180deg, rgba(255, 241, 198, 0.42), rgba(255, 255, 255, 0.84)),
    #fffaf0;
}

.event-card.theme-butanta {
  background:
    linear-gradient(180deg, rgba(237, 248, 223, 0.48), rgba(255, 255, 255, 0.86)),
    #fbfff8;
}

.event-cover {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 143, 175, 0.2), rgba(143, 212, 255, 0.18)),
    #fffaf1;
}

.event-card.theme-junina .event-cover {
  background:
    linear-gradient(135deg, rgba(217, 54, 54, 0.18), rgba(255, 214, 90, 0.22), rgba(63, 175, 108, 0.16)),
    #fff1c6;
}

.event-card.theme-butanta .event-cover {
  background:
    linear-gradient(135deg, rgba(24, 49, 44, 0.16), rgba(103, 184, 124, 0.18), rgba(61, 138, 168, 0.14), rgba(242, 207, 91, 0.14)),
    #edf8df;
}

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

.event-cover.event-cover-contain {
  padding: 10px;
}

.event-cover.event-cover-contain img {
  object-fit: contain;
}

.event-copy {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.event-copy h2 {
  margin: 0;
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  line-height: 1;
}

.event-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
  font-weight: 680;
}

.event-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.event-stats span {
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 850;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.68);
}

.summary-strip div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
}

.summary-strip div:last-child {
  border-right: 0;
}

.summary-strip strong,
.summary-strip span {
  display: block;
}

.summary-strip strong {
  font-size: clamp(1.5rem, 5vw, 2.35rem);
  line-height: 1;
}

.summary-strip span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.filter-bar {
  display: flex;
  gap: 8px;
  margin: 18px 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.bulk-toolbar span,
.bulk-select {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.bulk-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.delete-selected-button {
  margin-left: auto;
  color: #a32348;
  background: rgba(255, 255, 255, 0.84);
}

.delete-selected-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.filter-chip {
  min-width: 84px;
  padding: 0 14px;
}

.filter-chip.active {
  background: var(--ink);
  color: #fff;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 14px;
}

.media-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 12px 26px rgba(69, 47, 89, 0.08);
}

.media-open {
  display: grid;
  width: 100%;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.media-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 143, 175, 0.2), rgba(145, 230, 196, 0.18)),
    #fffaf1;
}

.theme-junina .media-frame {
  background:
    linear-gradient(135deg, rgba(217, 54, 54, 0.16), rgba(255, 214, 90, 0.2), rgba(47, 131, 204, 0.12)),
    #fff1c6;
}

.theme-butanta .media-frame {
  background:
    linear-gradient(135deg, rgba(103, 184, 124, 0.18), rgba(61, 138, 168, 0.16), rgba(242, 207, 91, 0.14)),
    #edf8df;
}

.media-frame img,
.lightbox-media img,
.lightbox-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.media-frame img {
  object-fit: cover;
}

.media-frame img.is-portrait-media {
  object-position: 50% 32%;
}

.media-frame img.is-tall-portrait-media {
  object-position: 50% 24%;
}

.video-thumb {
  display: grid;
  place-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
}

.video-thumb svg {
  width: 42px;
  height: 42px;
  color: #8b4775;
}

.video-preview {
  position: relative;
  width: 100%;
  height: 100%;
}

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

.video-play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: radial-gradient(circle, rgba(45, 37, 64, 0.36), rgba(45, 37, 64, 0) 42%);
}

.video-play-badge svg {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 999px;
  color: #fff;
  background: rgba(45, 37, 64, 0.62);
  box-shadow: 0 12px 24px rgba(45, 37, 64, 0.22);
}

.media-meta {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 14px;
}

.media-tool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
}

.media-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.media-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: #8b4775;
  font-size: 0.78rem;
  font-weight: 850;
}

.theme-junina .media-type {
  color: #9b2f1d;
}

.theme-butanta .media-type {
  color: #276d58;
}

.media-meta strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 0.95rem;
}

.media-meta time {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 860;
}

.upload-status-badge {
  color: #665b75;
  background: rgba(255, 255, 255, 0.82);
}

.pending-status-badge {
  color: #8b4775;
  background: rgba(255, 230, 109, 0.3);
}

.card-download {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 40px;
  min-height: 40px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
}

.public-toggle {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  margin: 0;
}

.approval-actions {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  right: 58px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.public-toggle-button {
  min-height: 32px;
  border: 1px solid rgba(45, 37, 64, 0.16);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 850;
}

.public-toggle-button.active {
  color: var(--ink);
  background: linear-gradient(90deg, var(--mint), var(--sky));
}

.delete-form {
  margin: 0;
}

.delete-button {
  min-height: 34px;
  color: #a32348;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.76rem;
}

.select-box {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(45, 37, 64, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.select-box input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.select-box span {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(45, 37, 64, 0.36);
  border-radius: 5px;
}

.select-box input:checked + span {
  border-color: var(--ink);
  background:
    linear-gradient(135deg, transparent 0 38%, var(--ink) 38% 48%, transparent 48%),
    linear-gradient(45deg, transparent 0 52%, var(--ink) 52% 62%, transparent 62%),
    linear-gradient(90deg, var(--mint), var(--sky));
}

.empty-state {
  margin: 0;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.lightbox {
  width: auto;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.lightbox[open],
.lightbox.is-open {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 1000;
  transform: translate(-50%, -50%);
}

.lightbox::backdrop {
  background: rgba(45, 37, 64, 0.58);
}

.lightbox-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  min-height: 64px;
}

.lightbox-bar strong,
.lightbox-bar span {
  display: block;
  overflow-wrap: anywhere;
}

.lightbox-bar span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.lightbox-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.lightbox .icon-button {
  width: 42px;
  min-height: 42px;
}

.video-quality-select {
  min-height: 42px;
  max-width: 138px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(45, 37, 64, 0.08);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
}

.lightbox-media {
  display: grid;
  place-items: center;
  width: min(1040px, calc(100vw - 24px));
  height: min(74dvh, 720px);
  max-height: calc(100dvh - 96px);
  min-height: 0;
  padding: 0;
  overflow: hidden;
  touch-action: pan-y;
  background:
    linear-gradient(90deg, rgba(255, 143, 175, 0.09), rgba(255, 230, 109, 0.09), rgba(143, 212, 255, 0.09)),
    #fff;
}

.lightbox-media img,
.lightbox-media video {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .header-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .header-actions {
    justify-content: start;
  }

  .admin-header-inner .header-actions {
    justify-content: start;
  }

  .header-top-action {
    position: static;
    display: flex;
    justify-content: start;
    width: min(1180px, calc(100% - 32px));
    margin: 12px auto 0;
  }

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

  .summary-strip div:nth-child(2) {
    border-right: 0;
  }

  .summary-strip div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 520px) {
  .login-panel {
    padding: 26px 20px;
  }

  .lightbox {
    width: auto;
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  .lightbox-bar {
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    min-height: 58px;
  }

  .lightbox-bar strong {
    font-size: 0.9rem;
  }

  .lightbox-bar span {
    font-size: 0.78rem;
  }

  .lightbox .icon-button {
    width: 38px;
    min-height: 38px;
  }

  .video-quality-select {
    min-height: 38px;
    max-width: 112px;
    padding: 0 8px;
    font-size: 0.78rem;
  }

  .lightbox-media {
    width: calc(100vw - 12px);
    height: min(78dvh, 680px);
    max-height: calc(100dvh - 82px);
    padding: 0;
  }

  .album-main,
  .header-inner {
    width: min(100% - 20px, 1180px);
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .primary-button {
    width: 100%;
  }

  .header-actions {
    width: 100%;
  }

  .header-actions form {
    flex: 0 0 auto;
  }

  .upload-progress-card {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .upload-progress-head {
    align-items: stretch;
  }
}
