@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --bg-0: #e8eef5;
  --bg-1: #dce7f2;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #ffffff;
  --border: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --text-muted: #64748b;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.12);
  --success: #059669;
  --error: #dc2626;
  --warning: #d97706;
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 12px 40px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-glow: 0 0 0 3px var(--accent-soft);
}

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

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-0);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 100% 80% at 0% -20%, rgba(99, 102, 241, 0.18), transparent 50%),
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(236, 72, 153, 0.1), transparent 45%),
    radial-gradient(ellipse 60% 50% at 50% 100%, rgba(14, 165, 233, 0.12), transparent 50%),
    linear-gradient(165deg, var(--bg-0) 0%, var(--bg-1) 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2394a3b8' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
}

.container {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 40px);
  padding-top: max(clamp(16px, 4vw, 40px), env(safe-area-inset-top));
  padding-right: max(clamp(16px, 4vw, 40px), env(safe-area-inset-right));
  padding-bottom: max(clamp(16px, 4vw, 40px), env(safe-area-inset-bottom));
  padding-left: max(clamp(16px, 4vw, 40px), env(safe-area-inset-left));
}

.invite-page {
  background:
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(255, 255, 255, 0.55), transparent 55%),
    radial-gradient(ellipse 90% 70% at 15% 40%, rgba(239, 206, 225, 0.9), transparent 50%),
    radial-gradient(ellipse 85% 65% at 88% 35%, rgba(206, 222, 244, 0.85), transparent 48%),
    linear-gradient(180deg, #d9e5f4 0%, #ead5e5 42%, #f2e3cf 68%, #b8d3b6 100%);
}

.invite-page::before,
.invite-page::after {
  display: none;
}

.invite-page .scene {
  position: fixed;
  top: -20%;
  left: -20%;
  right: -20%;
  bottom: -20%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.invite-page .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.58;
  will-change: transform;
}

.invite-page .blob-1 {
  width: 55vmax;
  height: 55vmax;
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.75) 0%, rgba(99, 102, 241, 0.66) 100%);
  top: -20%;
  left: -15%;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.invite-page .blob-2 {
  width: 45vmax;
  height: 45vmax;
  background: linear-gradient(180deg, rgba(244, 114, 182, 0.7) 0%, rgba(236, 72, 153, 0.62) 100%);
  top: 10%;
  right: -10%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.invite-page .blob-3 {
  width: 50vmax;
  height: 50vmax;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.66) 0%, rgba(14, 165, 233, 0.58) 100%);
  bottom: -25%;
  left: 20%;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.invite-page.mobile .blob-1 {
  animation: drift1 12s linear infinite;
}

.invite-page.mobile .blob-2 {
  animation: drift2 15s linear infinite;
}

.invite-page.mobile .blob-3 {
  animation: drift3 18s linear infinite;
}

.invite-page .card {
  position: relative;
  z-index: 1;
  will-change: transform;
  transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.invite-page .card.upload-disabled {
  display: flex;
  flex-direction: column;
}

#upload-disabled-message {
  margin: 1.4rem 0 1.8rem;
  text-align: center;
  font-size: clamp(1rem, 2.7vw, 1.25rem);
  color: #334155;
}

.invite-page .card.upload-disabled .footer-links {
  margin-top: auto;
}

.invite-page.mobile .card {
  animation: cardFloat 8s linear infinite;
}

@keyframes drift1 {
  0% { transform: translate(0px, 0px) scale(1); }
  25% { transform: translate(120px, 80px) scale(1.15); }
  50% { transform: translate(-60px, 100px) scale(0.95); }
  75% { transform: translate(-100px, -50px) scale(1.1); }
  100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes drift2 {
  0% { transform: translate(0px, 0px) scale(1); }
  25% { transform: translate(-100px, 70px) scale(1.12); }
  50% { transform: translate(80px, 120px) scale(0.92); }
  75% { transform: translate(90px, -60px) scale(1.08); }
  100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes drift3 {
  0% { transform: translate(0px, 0px) scale(1); }
  25% { transform: translate(90px, -80px) scale(1.1); }
  50% { transform: translate(-80px, -60px) scale(1.18); }
  75% { transform: translate(-50px, 90px) scale(0.95); }
  100% { transform: translate(0px, 0px) scale(1); }
}

@keyframes cardFloat {
  0% { transform: translateY(0px) rotateX(0deg) rotateY(0deg); }
  20% { transform: translateY(-10px) rotateX(1.5deg) rotateY(-1.5deg); }
  40% { transform: translateY(-6px) rotateX(-1deg) rotateY(1deg); }
  60% { transform: translateY(-14px) rotateX(0.5deg) rotateY(1.5deg); }
  80% { transform: translateY(-4px) rotateX(-1.5deg) rotateY(-0.5deg); }
  100% { transform: translateY(0px) rotateX(0deg) rotateY(0deg); }
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(20px, 5vw, 36px);
  box-shadow: var(--shadow-md);
}

.card--wide {
  max-width: 800px;
}

@media (max-width: 480px) {
  .card {
    border-radius: 16px;
    padding: 20px 16px;
  }
  
  .card--wide {
    padding: 16px 14px;
  }
}

.card-header {
  margin-bottom: 1.5rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
}

h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.subtle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.form {
  display: grid;
  gap: 1rem;
}

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.password-input-wrap {
  position: relative;
}

.password-input-wrap input[type="password"],
.password-input-wrap input[type="text"] {
  padding-right: 5.6rem;
}

.password-input-wrap input[type="password"]::-ms-reveal,
.password-input-wrap input[type="password"]::-ms-clear {
  display: none;
  width: 0;
  height: 0;
}

.password-input-wrap input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
  width: 0;
  height: 0;
  margin: 0;
}

.password-input-wrap input[type="password"]::-webkit-textfield-decoration-container {
  display: none !important;
}

.password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-solid);
  color: var(--text-muted);
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: none;
}

.password-toggle:hover:not(:disabled) {
  transform: translateY(-50%);
  box-shadow: none;
  filter: none;
  background: rgba(15, 23, 42, 0.04);
}

.password-toggle.is-visible {
  color: var(--text);
}

input[type="text"]:hover,
input[type="password"]:hover {
  border-color: rgba(15, 23, 42, 0.14);
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

.file-field {
  display: grid;
  gap: 0.5rem;
}

.file-field-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.file-input-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-picker-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.file-picker-label[hidden] {
  display: none !important;
}

.file-picker-label:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.18);
}

.file-list-hint {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.upload-limits-hint {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.file-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
  margin-top: 0.1rem;
}

.file-preview-box {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 1 / 1;
  cursor: zoom-in;
}

.file-preview-remove {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 3;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.1s ease;
}

.file-preview-remove:hover {
  background: rgba(220, 38, 38, 0.92);
  transform: scale(1.05);
}

.file-preview-remove:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-preview-remove span {
  display: block;
  margin-top: -1px;
}

.file-preview-box img,
.file-preview-box video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-preview-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 0.28rem 0.38rem;
  font-size: 0.64rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.15));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

button {
  border: 0;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent) 0%, #6366f1 50%, #7c3aed 100%);
  color: #ffffff;
  padding: 0.85rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.35);
}

button:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  box-shadow: none;
  border: 1px solid var(--border);
  padding: 0.65rem 1rem;
  font-size: 0.875rem;
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text);
  filter: none;
  box-shadow: none;
}

label.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
}

label.btn-ghost input[type="checkbox"] {
  margin: 0;
  accent-color: var(--accent);
}

.upload-progress-wrap {
  margin: 0.75rem 0 0;
}

.upload-progress-wrap[hidden] {
  display: none !important;
}

.upload-progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border);
  overflow: hidden;
}

.upload-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent) 0%, #6366f1 50%, #7c3aed 100%);
  transition: width 0.12s ease-out;
}

.upload-progress-track.is-indeterminate .upload-progress-bar {
  width: 100%;
  opacity: 0.45;
  animation: uploadIndeterminatePulse 1s ease-in-out infinite;
}

.upload-progress-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 0.45rem;
  flex-wrap: wrap;
}

.upload-progress-spinner {
  box-sizing: border-box;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(15, 23, 42, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
  display: none;
  animation: uploadSpinnerRotate 0.65s linear infinite;
}

.upload-progress-wrap.is-awaiting-response .upload-progress-spinner {
  display: block;
}

.upload-progress-label {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  flex: 1 1 12rem;
}

@keyframes uploadSpinnerRotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes uploadIndeterminatePulse {
  0%,
  100% {
    opacity: 0.3;
  }
  50% {
    opacity: 0.65;
  }
}

.status {
  min-height: 1.5rem;
  margin: 1rem 0 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.status--success {
  color: var(--success);
}

.status--error {
  color: var(--error);
}

.status--info {
  color: var(--warning);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-solid);
  color: var(--text);
  padding: 0.75rem 1.15rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.03);
  border-color: rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 0.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.admin-toolbar .subtle {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.admin-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.entry-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.entry-head-text {
  min-width: 0;
}

.entry-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.btn-mini {
  padding: 0.45rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
  box-shadow: none;
}

.btn-mini:hover:not(:disabled) {
  box-shadow: none;
}

.btn-danger-ghost {
  background: transparent;
  color: var(--error);
  border: 1px solid rgba(220, 38, 38, 0.35);
  box-shadow: none;
}

.btn-danger-ghost:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.06);
  color: #b91c1c;
  filter: none;
  box-shadow: none;
}

.media-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.media-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.entries {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.5rem;
}

.entry {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  background: var(--surface-solid);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.entry:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.entry h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.meta {
  margin: 0 0 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.meta:last-of-type {
  margin-bottom: 0.75rem;
}

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

.media-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  border: 1px solid var(--border);
  cursor: zoom-in;
}

.media-item video {
  width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  background: var(--bg-0);
  border: 1px solid var(--border);
  cursor: zoom-in;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(12px, 4vw, 28px);
}

.media-modal[hidden] {
  display: none !important;
}

.media-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
}

.media-modal-content {
  position: relative;
  z-index: 1;
  width: min(94vw, 1040px);
  height: min(90vh, 820px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #0b1220;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.5);
  overflow: hidden;
}

.media-modal-media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 20px;
  background: #0b1220;
}

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

.media-modal-close {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(15, 23, 42, 0.76);
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.media-modal-close > span {
  display: none;
}

.media-modal-close::before,
.media-modal-close::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  left: 50%;
  top: 50%;
  transform-origin: center;
}

.media-modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.media-modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.media-modal-close:hover {
  background: rgba(30, 41, 59, 0.92);
  transform: scale(1.04);
}

.media-modal-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 1px;
}

body.modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  button:hover:not(:disabled),
  .btn-secondary:hover {
    transform: none;
  }
}

@media (max-width: 600px) {
  .admin-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .admin-toolbar .subtle {
    min-width: auto;
    text-align: center;
  }
  
  .admin-toolbar-actions {
    justify-content: center;
  }
  
  .entry-head {
    flex-direction: column;
    align-items: stretch;
  }
  
  .entry-actions {
    justify-content: flex-start;
  }
  
  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
  }
  
  .footer-links {
    justify-content: center;
  }
}

@media (max-width: 380px) {
  .container {
    padding: 12px;
  }
  
  h1 {
    font-size: 1.35rem;
  }
  
  .subtle {
    font-size: 0.875rem;
  }
  
  button {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  .btn-ghost {
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
  }
  
  .btn-mini {
    padding: 0.4rem 0.65rem;
    font-size: 0.75rem;
  }
  
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .entry {
    padding: 0.9rem;
  }
  
  .entry h3 {
    font-size: 1rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .container {
    align-items: flex-start;
    padding-top: 16px;
    padding-bottom: 16px;
  }
  
  .card {
    margin: auto 0;
  }
  
  .card-header {
    margin-bottom: 1rem;
  }
  
  h1 {
    font-size: 1.4rem;
    margin-bottom: 0.3rem;
  }
}

.welcome-body {
  --mx: 0px;
  --my: 0px;
  --ax: 0px;
  --ay: 0px;
  overflow: hidden;
}

.welcome-main {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 24px);
  padding-top: max(clamp(16px, 4vw, 24px), env(safe-area-inset-top));
  padding-right: max(clamp(16px, 4vw, 24px), env(safe-area-inset-right));
  padding-bottom: max(clamp(16px, 4vw, 24px), env(safe-area-inset-bottom));
  padding-left: max(clamp(16px, 4vw, 24px), env(safe-area-inset-left));
}

.welcome-bg {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  z-index: -1;
  filter: saturate(1.1);
}

.blob,
.halo {
  position: absolute;
  border-radius: 999px;
  will-change: transform;
  transition: transform 0.2s linear;
}

.blob-a {
  width: min(48vw, 560px);
  height: min(48vw, 560px);
  left: -8%;
  top: -10%;
  background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.55), rgba(79, 70, 229, 0.08) 70%);
  transform: translate(
    calc(var(--mx) * 0.45 + var(--ax) * 0.7),
    calc(var(--my) * 0.45 + var(--ay) * 0.7)
  );
  animation: blobFloatA 13s ease-in-out infinite alternate;
}

.blob-b {
  width: min(42vw, 500px);
  height: min(42vw, 500px);
  right: -6%;
  top: 12%;
  background: radial-gradient(circle at 45% 40%, rgba(236, 72, 153, 0.35), rgba(236, 72, 153, 0.05) 70%);
  transform: translate(
    calc(var(--mx) * -0.35 + var(--ax) * -0.5),
    calc(var(--my) * 0.4 + var(--ay) * 0.45)
  );
  animation: blobFloatB 16s ease-in-out infinite alternate;
}

.blob-c {
  width: min(52vw, 620px);
  height: min(52vw, 620px);
  left: 18%;
  bottom: -22%;
  background: radial-gradient(circle at 50% 30%, rgba(14, 165, 233, 0.28), rgba(14, 165, 233, 0.03) 72%);
  transform: translate(
    calc(var(--mx) * 0.25 + var(--ax) * 0.35),
    calc(var(--my) * -0.3 + var(--ay) * -0.35)
  );
  animation: blobFloatC 18s ease-in-out infinite alternate;
}

.halo {
  width: 360px;
  height: 360px;
  left: 50%;
  top: 50%;
  margin-left: -180px;
  margin-top: -180px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.05), 0 0 120px rgba(255, 255, 255, 0.18);
  transform: translate(
    calc(var(--mx) * -0.15 + var(--ax) * -0.2),
    calc(var(--my) * -0.15 + var(--ay) * -0.2)
  );
  animation: haloPulse 7s ease-in-out infinite alternate;
}

@keyframes blobFloatA {
  from {
    filter: blur(0px);
  }
  to {
    transform: translate(
      calc(var(--mx) * 0.45 + var(--ax) * 0.7 + 22px),
      calc(var(--my) * 0.45 + var(--ay) * 0.7 - 16px)
    );
    filter: blur(1px);
  }
}

@keyframes blobFloatB {
  from {
    filter: blur(0px);
  }
  to {
    transform: translate(
      calc(var(--mx) * -0.35 + var(--ax) * -0.5 - 24px),
      calc(var(--my) * 0.4 + var(--ay) * 0.45 + 18px)
    );
    filter: blur(1px);
  }
}

@keyframes blobFloatC {
  from {
    filter: blur(0px);
  }
  to {
    transform: translate(
      calc(var(--mx) * 0.25 + var(--ax) * 0.35 + 16px),
      calc(var(--my) * -0.3 + var(--ay) * -0.35 + 20px)
    );
    filter: blur(1px);
  }
}

@keyframes haloPulse {
  from {
    opacity: 0.78;
  }
  to {
    opacity: 1;
    transform: translate(
      calc(var(--mx) * -0.15 + var(--ax) * -0.2 + 8px),
      calc(var(--my) * -0.15 + var(--ay) * -0.2 - 8px)
    ) scale(1.03);
  }
}

.welcome-card {
  width: 100%;
  max-width: 680px;
  text-align: center;
  padding: clamp(28px, 6vw, 60px) clamp(20px, 5vw, 50px);
  border-radius: clamp(20px, 4vw, 28px);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 70px rgba(15, 23, 42, 0.18);
  transform: translate(
    calc(var(--mx) * -0.12 + var(--ax) * -0.08),
    calc(var(--my) * -0.12 + var(--ay) * -0.08)
  ) rotateX(calc(var(--my) * -0.02)) rotateY(calc(var(--mx) * 0.02));
  transform-style: preserve-3d;
  transition: transform 0.08s linear;
}

.welcome-card h1 {
  font-size: clamp(1.75rem, 6vw, 3.6rem);
  margin: 0.3rem 0 0.7rem;
  letter-spacing: -0.03em;
}

.welcome-card p {
  margin: 0;
  color: #334155;
  font-size: clamp(0.9rem, 2.3vw, 1.2rem);
}

@media (max-width: 380px) {
  .welcome-card {
    padding: 24px 18px;
    border-radius: 18px;
  }
  
  .welcome-card h1 {
    font-size: 1.6rem;
    margin-bottom: 0.5rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .welcome-main {
    align-content: center;
    padding: 12px 20px;
  }
  
  .welcome-card {
    padding: 20px 28px;
  }
  
  .welcome-card h1 {
    font-size: clamp(1.4rem, 4vw, 2rem);
    margin: 0.2rem 0 0.4rem;
  }
}
