:root {
  --page: #050b10;
  --page-soft: #09151b;
  --surface: rgba(12, 23, 29, 0.82);
  --surface-solid: #0d171d;
  --surface-light: rgba(255, 255, 255, 0.08);
  --ink: #f4fbf8;
  --muted: #9fb5b5;
  --line: rgba(180, 230, 223, 0.18);
  --line-strong: rgba(213, 255, 250, 0.34);
  --logo-blue: #204050;
  --logo-blue-bright: #54b9df;
  --logo-green: #74d39b;
  --logo-green-deep: #2b765e;
  --focus: rgba(84, 185, 223, 0.72);
  --clay: #ff8b72;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
  --shadow-border: 0 0 0 1px rgba(255, 255, 255, 0.08);
  --shadow-border-hover: 0 0 0 1px rgba(255, 255, 255, 0.13);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 16% 9%, rgba(84, 185, 223, 0.18), transparent 28%),
    radial-gradient(circle at 84% 4%, rgba(116, 211, 155, 0.13), transparent 26%),
    radial-gradient(circle at 50% 104%, rgba(32, 64, 80, 0.68), transparent 42%),
    linear-gradient(160deg, #03070a 0%, var(--page) 48%, #06110f 100%);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
}

button {
  cursor: pointer;
}

button,
a,
input {
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease, opacity 160ms ease, filter 160ms ease;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.is-hidden {
  display: none !important;
}

.login-screen {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background: #000;
}

.login-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("alaska_main.png") center / cover no-repeat;
  opacity: 0.5;
  pointer-events: none;
}

.login-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 25%, rgba(84, 185, 223, 0.18), transparent 34%),
    radial-gradient(circle at 50% 55%, rgba(116, 211, 155, 0.12), transparent 28%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.16), rgba(0, 0, 0, 0.44) 68%, rgba(0, 0, 0, 0.78));
  pointer-events: none;
}

.login-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(20px, 4vw, 52px);
}

.animated-logo {
  position: absolute;
  inset: 0;
  width: min(70vw, 600px);
  height: min(68vh, 760px);
  margin: auto;
  opacity: 0.96;
  transform: translateY(-14vh);
  filter:
    drop-shadow(0 0 42px rgba(84, 185, 223, 0.32))
    drop-shadow(0 0 68px rgba(116, 211, 155, 0.14))
    drop-shadow(0 42px 72px rgba(0, 0, 0, 0.52));
}

.animated-logo img,
.mini-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-base {
  animation: crestBreathe 8s ease-in-out infinite;
}

.logo-shine {
  animation: crestShimmer 2.4s ease-in-out infinite alternate, crestLift 4.6s ease-in-out infinite;
}

@keyframes crestShimmer {
  from {
    filter: hue-rotate(0deg) brightness(104%);
    opacity: 0.82;
  }
  to {
    filter: hue-rotate(38deg) contrast(128%) brightness(138%);
    opacity: 1;
  }
}

@keyframes crestLift {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-5px) scale(1.014);
  }
}

@keyframes crestBreathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.018);
  }
}

.login-panel {
  position: absolute;
  left: 50%;
  bottom: clamp(24px, 6.4vh, 68px);
  width: min(calc(100vw - 32px), 452px);
  transform: translateX(-50%);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.085) 42%, rgba(84, 185, 223, 0.13)),
    linear-gradient(180deg, rgba(116, 211, 155, 0.09), transparent 44%),
    rgba(9, 19, 25, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.1),
    0 22px 70px rgba(0, 0, 0, 0.56),
    0 0 48px rgba(84, 185, 223, 0.14);
  padding: 24px 24px 22px;
  backdrop-filter: blur(32px) saturate(180%);
  -webkit-backdrop-filter: blur(32px) saturate(180%);
  animation: panelEnter 520ms cubic-bezier(0.2, 0, 0, 1) 120ms both;
}

.login-panel::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 24px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.28), transparent 32%, rgba(116, 211, 155, 0.16) 76%, transparent);
  pointer-events: none;
}

.login-panel::after {
  content: "";
  position: absolute;
  top: -58%;
  left: -18%;
  width: 70%;
  height: 120%;
  transform: rotate(22deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  pointer-events: none;
}

.login-panel > * {
  position: relative;
  z-index: 1;
}

.login-kicker {
  margin: 0 0 8px;
  color: var(--logo-green);
  font-size: 0.76rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  animation: fieldEnter 420ms cubic-bezier(0.2, 0, 0, 1) 220ms both;
}

.login-panel h1 {
  margin: 0 0 20px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 7vw, 3.6rem);
  line-height: 0.9;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.55);
  text-wrap: balance;
  animation: fieldEnter 420ms cubic-bezier(0.2, 0, 0, 1) 320ms both;
}

label {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
  margin-bottom: 8px;
  text-transform: uppercase;
  text-wrap: pretty;
}

input {
  min-height: 46px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 10, 14, 0.68);
  color: var(--ink);
  padding: 0 13px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

input::placeholder {
  color: rgba(244, 251, 248, 0.45);
}

input:focus {
  border-color: rgba(84, 185, 223, 0.78);
  box-shadow: 0 0 0 3px rgba(84, 185, 223, 0.18), 0 0 30px rgba(116, 211, 155, 0.12);
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p,
button,
input,
figcaption {
  text-wrap: pretty;
}

.password-row,
.name-entry {
  display: flex;
  gap: 10px;
}

.login-panel label {
  animation: fieldEnter 420ms cubic-bezier(0.2, 0, 0, 1) 420ms both;
}

.login-panel .password-row {
  animation: fieldEnter 420ms cubic-bezier(0.2, 0, 0, 1) 520ms both;
}

.password-row input,
.name-entry input {
  min-width: 0;
}

.primary-button,
.quiet-button,
.text-button,
.danger-button,
.icon-button {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 760;
  white-space: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
}

.primary-button {
  background: linear-gradient(135deg, var(--logo-blue-bright), var(--logo-green));
  color: #031015;
  box-shadow: 0 12px 32px rgba(84, 185, 223, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.primary-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.primary-button:active,
.quiet-button:active,
.danger-button:active,
.icon-button:active,
.nav-link:active,
.tag-pill:active {
  transform: scale(0.96);
}

.quiet-button {
  background: rgba(255, 255, 255, 0.075);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.quiet-button:hover,
.icon-button:hover {
  border-color: rgba(116, 211, 155, 0.62);
  background: rgba(116, 211, 155, 0.12);
}

.text-button {
  min-height: 44px;
  padding: 0 4px;
  background: transparent;
  color: var(--logo-green);
  border-radius: 10px;
}

.danger-button {
  background: rgba(255, 139, 114, 0.11);
  border-color: rgba(255, 139, 114, 0.34);
  color: #ffc8bc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.danger-button:hover,
.danger-button:focus-visible {
  background: rgba(255, 139, 114, 0.18);
  border-color: rgba(255, 139, 114, 0.56);
  color: #ffe3dc;
  box-shadow: var(--shadow-border-hover), 0 14px 28px rgba(0, 0, 0, 0.28);
}

.icon-button {
  width: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--line);
  color: var(--muted);
}

.form-error {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--clay);
  font-weight: 760;
}

.app-shell {
  min-height: 100vh;
  position: relative;
  background:
    radial-gradient(circle at 12% 0%, rgba(84, 185, 223, 0.13), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(116, 211, 155, 0.1), transparent 28%);
}

.gallery-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 16px clamp(18px, 4vw, 54px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent),
    rgba(3, 10, 14, 0.76);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.header-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-brand {
  color: inherit;
  text-decoration: none;
}

.mini-logo {
  position: relative;
  width: 50px;
  height: 66px;
  flex: 0 0 auto;
  filter: drop-shadow(0 0 16px rgba(84, 185, 223, 0.25));
}

.header-brand p,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.header-brand h1 {
  margin: 2px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
  letter-spacing: 0;
}

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

.owner-status {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 139, 114, 0.12);
  color: #ffc8bc;
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: uppercase;
  box-shadow: 0 0 0 1px rgba(255, 139, 114, 0.26);
}

.song-shell {
  overflow: hidden;
}

.song-page {
  min-height: calc(100vh - 99px);
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 76px) clamp(18px, 5vw, 64px);
}

.song-card {
  width: min(100%, 900px);
  display: grid;
  grid-template-columns: minmax(190px, 0.48fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 48px);
  align-items: center;
  padding: clamp(22px, 5vw, 44px);
  border-radius: 24px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.035)),
    rgba(3, 10, 14, 0.5);
  box-shadow: var(--shadow-border), 0 28px 80px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

.song-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 22%, rgba(84, 185, 223, 0.24), transparent 52%),
    radial-gradient(circle at 50% 78%, rgba(116, 211, 155, 0.18), transparent 48%),
    rgba(255, 255, 255, 0.055);
  box-shadow: var(--shadow-border), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.song-art img {
  width: min(62%, 210px);
  height: auto;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.36));
}

.song-copy {
  min-width: 0;
}

.song-copy h2 {
  margin: 6px 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.5rem, 8vw, 5rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.song-copy p:not(.eyebrow) {
  max-width: 52ch;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

.song-player {
  display: block;
  width: 100%;
  margin: 0 0 24px;
  border-radius: 999px;
  box-shadow: var(--shadow-border), 0 14px 36px rgba(0, 0, 0, 0.24);
}

.song-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.upload-status {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 30;
  width: min(calc(100% - 28px), 520px);
  transform: translateX(-50%);
  display: grid;
  gap: 12px;
  padding: 15px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045)),
    rgba(3, 10, 14, 0.86);
  box-shadow: var(--shadow-border), 0 22px 70px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.upload-status-copy {
  display: grid;
  gap: 4px;
}

.upload-status-copy p {
  margin: 0;
  color: var(--ink);
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.upload-status-copy span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.upload-meter {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.upload-meter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  transform: scaleX(0.04);
  transform-origin: left center;
  background: linear-gradient(135deg, var(--logo-blue-bright), var(--logo-green));
  transition: transform 220ms ease;
}

.upload-status.is-complete .upload-meter span {
  background: linear-gradient(135deg, var(--logo-green), #d3f4df);
}

.upload-status.is-error .upload-meter span {
  background: linear-gradient(135deg, var(--clay), #ffc8bc);
}

.upload-status.is-error .upload-status-copy p {
  color: #ffc8bc;
}

.today-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(calc(100% - 36px), 1180px);
  min-height: 56px;
  margin: 24px auto 0;
  padding: 10px 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(84, 185, 223, 0.15), rgba(116, 211, 155, 0.1)),
    rgba(3, 10, 14, 0.54);
  box-shadow: var(--shadow-border), 0 18px 42px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: var(--ink);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.today-alert-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--logo-blue-bright), var(--logo-green));
  color: #031015;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38);
}

.today-alert-icon svg {
  width: 19px;
  height: 19px;
}

.photo-action svg {
  width: 17px;
  height: 17px;
}

.today-alert p {
  margin: 0;
  color: var(--ink);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.tool-strip {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  width: min(calc(100% - 36px), 1180px);
  margin: 0 auto;
  padding: 30px 0 12px;
}

.search-box {
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035)),
    rgba(3, 10, 14, 0.42);
  box-shadow: var(--shadow-border), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tag-rail {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px;
  border-radius: 16px;
  background: rgba(3, 10, 14, 0.26);
  box-shadow: var(--shadow-border);
}

.tag-pill {
  min-height: 30px;
  border: 1px solid var(--tag-border, var(--line));
  border-radius: 999px;
  background: var(--tag-bg, rgba(255, 255, 255, 0.06));
  color: var(--tag-ink, var(--ink));
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 760;
}

.tag-pill.is-active {
  background:
    linear-gradient(135deg, rgba(84, 185, 223, 0.28), rgba(116, 211, 155, 0.2)),
    var(--tag-bg, rgba(255, 255, 255, 0.06));
  border-color: rgba(213, 255, 250, 0.5);
  color: var(--ink);
  box-shadow: 0 10px 26px rgba(84, 185, 223, 0.22);
}

.gallery-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 36px), 1180px);
  margin: 0 auto;
  padding: 0 0 18px;
  color: var(--muted);
}

.gallery-meta p {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  width: min(100% - 36px, 620px);
  margin: 62px auto;
  padding: 34px 26px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.035)),
    rgba(3, 10, 14, 0.36);
  text-align: center;
  box-shadow: var(--shadow-border), 0 22px 70px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.empty-logo {
  width: min(46vw, 190px);
  aspect-ratio: 876 / 1281;
  margin: 0 auto 18px;
  opacity: 0.34;
  filter: drop-shadow(0 0 22px rgba(84, 185, 223, 0.18));
}

.empty-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.empty-state h2 {
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  align-items: start;
  gap: 16px;
  width: min(calc(100% - 36px), 1180px);
  margin: 0 auto;
  padding: 0 0 28px;
}

.gallery-pagination {
  display: flex;
  justify-content: center;
  width: min(calc(100% - 36px), 1180px);
  margin: -4px auto 28px;
}

.gallery-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: min(calc(100% - 36px), 1180px);
  margin: 0 auto 64px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)),
    rgba(3, 10, 14, 0.42);
  box-shadow: var(--shadow-border), 0 18px 44px rgba(0, 0, 0, 0.2);
}

.gallery-footer p {
  margin: 0;
  color: var(--muted);
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.4);
  opacity: 0.46;
  transform: none;
}

.photo-card {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: var(--surface-solid);
  break-inside: avoid;
  box-shadow: var(--shadow-border), 0 18px 42px rgba(0, 0, 0, 0.22);
  transition: none;
}

.photo-open {
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  line-height: 0;
  text-align: left;
  transition: none;
}

.photo-open:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
  transition: none;
}

.photo-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.photo-card:hover .photo-actions,
.photo-card:focus-within .photo-actions {
  opacity: 1;
  pointer-events: auto;
}

.photo-action {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 13px;
  background: rgba(3, 10, 14, 0.59);
  color: var(--ink);
  box-shadow: var(--shadow-border), 0 12px 24px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.photo-action:hover,
.photo-action:focus-visible {
  background: rgba(116, 211, 155, 0.18);
  color: var(--logo-green);
  box-shadow: var(--shadow-border-hover), 0 14px 28px rgba(0, 0, 0, 0.34);
}

.photo-action:active {
  transform: scale(0.96);
}

.photo-card.is-favorite .favorite-action {
  background: linear-gradient(135deg, rgba(84, 185, 223, 0.74), rgba(116, 211, 155, 0.74));
  color: #031015;
}

.delete-action:hover,
.delete-action:focus-visible {
  background: rgba(255, 139, 114, 0.2);
  color: #ffc8bc;
  box-shadow: var(--shadow-border-hover), 0 14px 28px rgba(0, 0, 0, 0.34);
}

.dialog-tags span,
.selected-tags button {
  border: 1px solid var(--tag-border, rgba(116, 211, 155, 0.32));
  border-radius: 999px;
  background: var(--tag-bg, rgba(7, 21, 25, 0.86));
  color: var(--tag-ink, var(--ink));
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 800;
}

dialog {
  border: 1px solid var(--line);
  padding: 0;
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.photo-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-height: min(860px, calc(100vh - 28px));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 38%),
    var(--surface-solid);
}

.dialog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  max-height: min(860px, calc(100vh - 28px));
}

#dialog-image {
  width: 100%;
  height: 100%;
  max-height: min(860px, calc(100vh - 28px));
  object-fit: contain;
  background: #020405;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

.dialog-sidebar {
  padding: 28px;
  min-width: 0;
  overflow: auto;
  border-left: 1px solid var(--line);
}

.dialog-sidebar h2,
.review-copy h2 {
  margin: 5px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dialog-tags,
.selected-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 22px;
}

.dialog-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  line-height: 1;
}

#download-photo-button {
  width: 100%;
  margin-top: 18px;
}

#delete-photo-button {
  width: 100%;
  margin-top: 10px;
}

.selected-tags button {
  min-height: 32px;
}

.suggestion-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 10px 0 0;
}

.suggestion-pill {
  min-height: 30px;
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(3, 10, 14, 0.72);
  color: var(--ink);
  font-weight: 900;
  backdrop-filter: blur(14px);
}

.review-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent 38%),
    var(--surface-solid);
}

.review-frame {
  display: grid;
  gap: 18px;
  padding: 26px;
  max-height: calc(100vh - 28px);
  overflow: auto;
}

#review-image {
  width: 100%;
  max-height: 330px;
  object-fit: contain;
  background: #020405;
  border-radius: 8px;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

.face-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.face-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.face-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

.manual-tags {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.review-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
}

.slideshow-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  background: #010405;
  color: white;
  border-radius: 0;
}

#slide-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  outline: 1px solid rgba(255, 255, 255, 0.1);
  outline-offset: -1px;
}

.slide-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 72px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 2rem;
  backdrop-filter: blur(14px);
}

.slide-nav.prev {
  left: 20px;
}

.slide-nav.next {
  right: 20px;
}

.slide-caption {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  max-width: min(90vw, 760px);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(3, 10, 14, 0.62);
  color: white;
  font-weight: 700;
  text-align: center;
  backdrop-filter: blur(14px);
}

@keyframes panelEnter {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    filter: blur(0);
  }
}

@keyframes fieldEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}

@media (max-width: 980px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .photo-dialog {
    overflow: auto;
    max-height: calc(100dvh - 28px);
  }

  .dialog-layout {
    grid-template-columns: 1fr;
    max-height: none;
  }

  #dialog-image {
    height: auto;
    max-height: min(62dvh, 620px);
  }

  .dialog-sidebar {
    overflow: visible;
    max-height: none;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .tool-strip {
    grid-template-columns: 1fr;
    gap: 12px;
    padding-top: 18px;
  }

  .animated-logo {
    width: min(84vw, 420px);
    height: min(56vh, 560px);
    transform: translateY(-16vh);
  }

  .login-panel {
    bottom: 18px;
    padding: 20px;
    border-radius: 20px;
  }

  .gallery-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .today-alert {
    margin-top: 18px;
  }

  .search-box,
  .tag-rail {
    padding: 12px;
    border-radius: 14px;
  }

  .tag-rail {
    min-height: 52px;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }

  .gallery-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-card {
    margin: 0;
  }

  .password-row,
  .name-entry {
    flex-direction: column;
  }

  .song-page {
    min-height: auto;
    display: block;
    padding-top: 28px;
  }

  .song-card {
    grid-template-columns: 1fr;
    border-radius: 20px;
  }

  .song-art {
    width: min(100%, 260px);
    margin: 0 auto;
  }

  .song-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (hover: none) {
  .photo-actions {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 430px) {
  .login-panel h1 {
    font-size: 2rem;
  }

  .login-kicker {
    font-size: 0.7rem;
  }

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

  .header-actions .quiet-button,
  .header-actions .primary-button {
    flex: 1 1 120px;
  }
}
