:root {
  color-scheme: light;
  --content-width: 1180px;
  --page-padding-x: 24px;
  --page-padding-y: 32px;
  --radius-card: 28px;
  --radius-panel: 24px;
  --radius-input: 20px;
  --radius-pill: 999px;
  --surface-blur: 26px;
  --shadow-card: 0 24px 70px rgba(42, 78, 142, 0.14);
  --shadow-soft: 0 14px 40px rgba(31, 46, 84, 0.12);
  --bg: #e3e8f1;
  --bg-alt: #d7deec;
  --fg: #16243c;
  --fg-soft: rgba(22, 36, 60, 0.78);
  --card: rgba(255, 255, 255, 0.42);
  --card-strong: rgba(255, 255, 255, 0.58);
  --card-soft: rgba(255, 255, 255, 0.32);
  --line: rgba(255, 255, 255, 0.5);
  --line-strong: rgba(121, 157, 212, 0.36);
  --text-muted: rgba(22, 36, 60, 0.62);
  --text-hint: rgba(22, 36, 60, 0.68);
  --flash: #355b96;
  --accent: linear-gradient(135deg, #4f95ff 0%, #78b0ff 45%, #9dc4ff 100%);
  --accent-secondary: rgba(255, 255, 255, 0.34);
  --accent-danger: linear-gradient(135deg, #d86f76 0%, #cb565f 100%);
  --accent-ghost: rgba(255, 255, 255, 0.24);
  --button-text: #f8fbff;
  --canvas-a: rgba(220, 205, 184, 0.62);
  --canvas-b: rgba(163, 198, 239, 0.62);
  --canvas-c: rgba(67, 126, 217, 0.3);
  --canvas-d: rgba(255, 255, 255, 0.2);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f131d;
  --bg-alt: #151b27;
  --fg: #f4f7ff;
  --fg-soft: rgba(244, 247, 255, 0.82);
  --card: rgba(32, 39, 58, 0.46);
  --card-strong: rgba(37, 47, 70, 0.62);
  --card-soft: rgba(28, 34, 50, 0.4);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(169, 192, 241, 0.24);
  --text-muted: rgba(244, 247, 255, 0.64);
  --text-hint: rgba(244, 247, 255, 0.74);
  --flash: #d5e4ff;
  --accent: linear-gradient(135deg, #255ec7 0%, #2f6fdf 46%, #4c86ef 100%);
  --accent-secondary: rgba(255, 255, 255, 0.08);
  --accent-danger: linear-gradient(135deg, #e18484 0%, #c85f67 100%);
  --accent-ghost: rgba(255, 255, 255, 0.08);
  --button-text: #f8fbff;
  --shadow-card: 0 32px 90px rgba(0, 0, 0, 0.42);
  --shadow-soft: 0 18px 60px rgba(0, 0, 0, 0.28);
  --canvas-a: rgba(14, 16, 22, 0.92);
  --canvas-b: rgba(24, 30, 44, 0.88);
  --canvas-c: rgba(36, 50, 84, 0.62);
  --canvas-d: rgba(87, 149, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background:
    radial-gradient(circle at 14% 18%, var(--canvas-a), transparent 34%),
    radial-gradient(circle at 82% 12%, var(--canvas-b), transparent 28%),
    radial-gradient(circle at 72% 76%, var(--canvas-c), transparent 36%),
    radial-gradient(circle at 26% 86%, var(--canvas-d), transparent 30%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  background-attachment: fixed;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  font-family: "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: transparent;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  pointer-events: none;
  z-index: 0;
  filter: blur(18px);
}

body::before {
  top: 5vh;
  left: -8vw;
  width: 34vw;
  height: 34vw;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 66%);
}

body::after {
  right: -12vw;
  bottom: -10vh;
  width: 42vw;
  height: 42vw;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 72%);
}

.page-shell {
  position: relative;
  z-index: 1;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--page-padding-y) var(--page-padding-x) 72px;
}

.site-nav {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  backdrop-filter: blur(var(--surface-blur)) saturate(1.15);
  -webkit-backdrop-filter: blur(var(--surface-blur)) saturate(1.15);
  box-shadow: var(--shadow-soft);
}

.nav-links,
.nav-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.nav-brand {
  margin-right: 8px;
  color: var(--fg);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.site-nav::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.22) 0,
    rgba(255, 255, 255, 0.11) 3px,
    rgba(255, 255, 255, 0.03) 5px,
    transparent 6px
  );
  pointer-events: none;
}

.nav-link,
.theme-toggle {
  text-decoration: none;
  color: var(--fg);
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 10px 15px;
  min-height: 44px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 8px 20px rgba(18, 28, 47, 0.08);
}

.theme-toggle {
  font: inherit;
  cursor: pointer;
}

.nav-logout-form {
  margin: 0;
}

.nav-logout-button {
  min-height: 44px;
  padding: 10px 15px;
  color: var(--fg);
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 8px 20px rgba(18, 28, 47, 0.08);
}

.theme-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-size: 1rem;
  line-height: 1;
}

.nav-link-strong {
  background: var(--accent);
  color: var(--button-text);
  border-color: rgba(255, 255, 255, 0.18);
}

.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(var(--surface-blur)) saturate(1.15);
  -webkit-backdrop-filter: blur(var(--surface-blur)) saturate(1.15);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.lede {
  max-width: 52rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: var(--fg-soft);
}

.stack {
  display: grid;
  gap: 20px;
}

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

.home-shell {
  gap: 24px;
}

.hero-greeting {
  margin-bottom: 4px;
}

.albums-shell {
  gap: 24px;
}

.albums-list-header {
  margin-bottom: 18px;
}

.dashboard-shell {
  gap: 24px;
}

.dashboard-hero {
  display: grid;
  gap: 18px;
  align-items: end;
}

.dashboard-hero-copy {
  display: grid;
  gap: 14px;
}

.dashboard-hero-actions {
  justify-content: flex-start;
}

.dashboard-usage-card {
  width: 100%;
}

.dashboard-recent-header {
  margin-bottom: 18px;
}

.dashboard-recent-footer {
  margin-top: 18px;
}

.albums-hero {
  display: grid;
  gap: 18px;
  align-items: end;
}

.albums-hero-copy {
  display: grid;
  gap: 14px;
}

.albums-hero-actions {
  justify-content: flex-start;
}

.summary-card {
  display: grid;
  gap: 12px;
}

.usage-meter {
  overflow: hidden;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
  border: 1px solid var(--line);
}

.usage-meter-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.albums-section-header {
  justify-content: space-between;
}

.albums-empty-state {
  display: grid;
  gap: 8px;
  padding: 24px;
  margin-top: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.16);
}

.album-workspace {
  display: grid;
  gap: 20px;
}

.album-detail-header {
  display: grid;
  gap: 10px;
}

.album-detail-heading {
  display: grid;
  gap: 4px;
}

.album-detail-title-editor {
  display: grid;
}

.album-detail-title-button {
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--fg);
  font-size: clamp(1.4rem, 2vw, 2.2rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-align: left;
 }

.album-detail-title-button:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.album-detail-title-editor input[type="text"] {
  max-width: min(100%, 720px);
}

.album-detail-actions {
  justify-content: flex-start;
}

.album-detail-footer-actions {
  justify-content: center;
}

.album-workspace-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.album-workspace-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.album-workspace h4 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.album-item-list {
  display: grid;
  gap: 14px;
}

.album-item {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.14);
}

.album-item-meta {
  display: grid;
  gap: 8px;
}

.album-item-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px 16px;
}

.album-item-title-row h3 {
  margin: 0;
  flex: 1 1 240px;
}

.album-detail-item-actions {
  justify-content: flex-start;
}

.album-item-meta .split-link-control {
  width: min(100%, 720px);
}

.album-detail-thumb {
  display: block;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.album-detail-thumb img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  background: rgba(255, 255, 255, 0.14);
}

.album-detail-item {
  transition: opacity 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.album-detail-item.is-dragging {
  opacity: 0.5;
}

.album-detail-item.drop-before {
  border-top-color: rgba(79, 149, 255, 0.82);
  box-shadow: inset 0 4px 0 rgba(79, 149, 255, 0.82);
}

.album-detail-item.drop-after {
  border-bottom-color: rgba(79, 149, 255, 0.82);
  box-shadow: inset 0 -4px 0 rgba(79, 149, 255, 0.82);
}

.album-detail-drag-handle {
  flex: 0 0 auto;
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
  cursor: grab;
  user-select: none;
}

.album-detail-drag-handle:active {
  cursor: grabbing;
}

body.lightbox-open {
  overflow: hidden;
}

body.upload-modal-open {
  overflow: hidden;
}

.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 18;
  display: grid;
  place-items: center;
  padding: 18px;
}

.upload-modal.hidden {
  display: none;
}

.upload-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(10, 14, 22, 0.78);
  box-shadow: none;
}

.upload-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
}

.upload-modal-header {
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.upload-modal-header h2 {
  margin-bottom: 0;
}

.album-detail-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  justify-items: center;
  align-items: start;
  padding-top: 8px;
  padding-bottom: 10px;
}

.album-detail-lightbox.hidden {
  display: none;
}

.album-detail-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  border-radius: 0;
  background: rgba(10, 14, 22, 0.78);
  box-shadow: none;
}

.album-detail-lightbox-dialog {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 4px;
  width: fit-content;
  max-width: calc(100vw - 4px);
  max-height: none;
  padding: 2px 2px 6px;
  margin-bottom: 12px;
}

.album-detail-lightbox-close {
  justify-self: end;
}

.album-detail-lightbox-image {
  display: block;
  width: auto;
  max-width: calc(100vw - 4px);
  max-height: calc(100vh - 76px);
  margin: 0 auto;
  border-radius: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
}

.album-danger-zone {
  justify-content: flex-end;
}

.album-list-card {
  display: grid;
  gap: 16px;
}

.dashboard-recent-album-card {
  grid-template-columns: minmax(0, 1fr) 160px;
  align-items: center;
  cursor: pointer;
}

.dashboard-recent-album-copy {
  display: grid;
  gap: 16px;
}

.dashboard-recent-album-copy > div:first-child {
  padding-left: 18px;
}

.dashboard-recent-album-card:focus-visible {
  outline: 2px solid rgba(79, 149, 255, 0.7);
  outline-offset: 2px;
}

.dashboard-recent-album-copy .row-actions {
  justify-content: flex-start;
}

.album-card-actions-stack {
  display: grid;
  justify-items: start;
}

.album-card-actions-stack > * {
  width: min(100%, 540px);
}

.dashboard-recent-album-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  text-decoration: none;
}

.dashboard-recent-album-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.dashboard-recent-album-thumb-placeholder {
  padding: 18px;
  color: var(--text-hint);
  text-align: center;
}

.status-panel {
  display: grid;
  gap: 12px;
}

.hero-actions {
  margin-top: 18px;
}

.upload-card {
  padding: 30px;
}

.upload-card-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.upload-note {
  max-width: 26rem;
}

.upload-form-modern {
  gap: 16px;
}

.upload-form-modern .row-actions {
  justify-content: flex-end;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 4vw, 4.6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

h2,
h3 {
  margin: 0 0 12px;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.4rem, 2vw, 2.2rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0;
  line-height: 1.6;
}

form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

input,
button,
textarea,
select {
  font: inherit;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="number"],
input[type="file"],
textarea,
select {
  width: 100%;
  padding: 14px 16px;
  color: var(--fg);
  background: var(--card-strong);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-input);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--accent);
  color: var(--button-text);
  text-decoration: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 14px 24px rgba(37, 90, 170, 0.24);
}

.button-link.secondary-link,
button.secondary,
button.ghost {
  color: var(--fg);
  background: var(--accent-secondary);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 10px 18px rgba(18, 28, 47, 0.08);
}

.split-link-control {
  display: inline-flex;
  align-items: stretch;
  min-width: min(100%, 540px);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: var(--card-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    0 10px 18px rgba(18, 28, 47, 0.08);
}

.split-link-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: var(--button-text);
  text-decoration: none;
  white-space: nowrap;
  background: var(--accent);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
}

input.split-link-value {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  border: 0;
  border-radius: 0 !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  border-top-right-radius: var(--radius-pill) !important;
  border-bottom-right-radius: var(--radius-pill) !important;
  padding: 12px 16px;
  background: var(--card-soft);
  box-shadow: none;
  color: var(--fg);
  clip-path: inset(0 round 0 var(--radius-pill) var(--radius-pill) 0);
}

input.split-link-value:focus {
  outline: none;
}

button.danger {
  background: var(--accent-danger);
  color: white;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.row > * {
  flex: 1 1 180px;
}

.row-actions > * {
  flex: 0 0 auto;
}

.hint {
  color: var(--text-hint);
  font-size: 0.95rem;
}

.form-error {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--radius-input);
  background: rgba(210, 66, 79, 0.14);
  border: 1px solid rgba(210, 66, 79, 0.26);
  color: #b42318;
  font-size: 0.94rem;
}

:root[data-theme="dark"] .form-error {
  background: rgba(209, 94, 103, 0.18);
  border-color: rgba(229, 132, 132, 0.3);
  color: #ffd5d9;
}

.flash {
  min-height: 1.4rem;
  margin-bottom: 10px;
  color: var(--flash);
}

.album-detail-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  padding: 12px 16px;
  border: 1px solid rgba(109, 214, 150, 0.34);
  border-radius: var(--radius-pill);
  background: rgba(34, 72, 48, 0.92);
  color: #f4fff7;
  box-shadow: 0 16px 40px rgba(10, 18, 14, 0.28);
}

.hidden {
  display: none !important;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
  color: var(--text-hint);
}

.check input {
  width: auto;
}

.upload-dropzone {
  position: relative;
  display: grid;
  overflow: visible;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: default;
}

.upload-dropzone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.upload-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 330px;
  padding: 18px 0 24px;
  cursor: pointer;
}

.upload-stage-frame {
  display: grid;
  gap: 10px;
  justify-items: center;
  width: min(100%, 560px);
  padding: 34px 24px;
  border: 5px dashed rgba(255, 255, 255, 0.42);
  border-radius: 22px;
  color: var(--fg);
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.upload-actions-panel {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px 0 0;
  background: transparent;
  color: var(--fg);
}

.upload-divider {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: var(--line);
}

.upload-title-wrap {
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
}

.upload-title-wrap input[type="text"] {
  background: rgba(255, 255, 255, 0.58);
  border-color: var(--line-strong);
  color: var(--fg);
}

.upload-picker {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 18px;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--button-text);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.44),
    0 14px 24px rgba(37, 90, 170, 0.24);
}

.upload-picker-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  color: #355b96;
  font-size: 1rem;
}

.upload-or {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  color: var(--fg);
  font-size: 1rem;
  font-weight: 700;
}

.upload-or::before,
.upload-or::after {
  content: "";
  width: 82px;
  height: 1px;
  background: var(--line-strong);
}

.upload-paste-box {
  display: grid;
  gap: 10px;
  width: min(100%, 560px);
}

.upload-paste-label {
  color: var(--text-hint);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.upload-paste-input {
  min-height: 46px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.4);
  border-color: var(--line-strong);
  color: var(--fg);
  resize: none;
  overflow: hidden;
}

.upload-file-summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(100%, 420px);
  min-height: 62px;
  padding: 16px 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.3);
  color: var(--fg);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  border: 1px solid var(--line);
}

.upload-file-summary[data-tone="success"] {
  background: rgba(60, 163, 101, 0.16);
  border-color: rgba(60, 163, 101, 0.38);
  color: #1d6b3e;
}

.upload-file-summary[data-tone="error"] {
  background: rgba(210, 66, 79, 0.14);
  border-color: rgba(210, 66, 79, 0.3);
  color: #b42318;
}

:root[data-theme="dark"] .upload-file-summary[data-tone="success"] {
  background: rgba(72, 182, 117, 0.18);
  border-color: rgba(109, 214, 150, 0.34);
  color: #c8f3d8;
}

:root[data-theme="dark"] .upload-file-summary[data-tone="error"] {
  background: rgba(209, 94, 103, 0.18);
  border-color: rgba(229, 132, 132, 0.3);
  color: #ffd5d9;
}

.upload-file-summary:empty {
  display: none;
}

.upload-form-fields {
  display: grid;
  gap: 12px;
  width: min(100%, 560px);
  margin-top: 4px;
}

.upload-form-fields input[type="text"] {
  background: rgba(255, 255, 255, 0.4);
  border-color: var(--line-strong);
  color: var(--fg);
}

.upload-dropzone-title {
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
}

.upload-dropzone-copy {
  max-width: 28rem;
  color: var(--fg-soft);
  font-size: 1.05rem;
}

.upload-dropzone.is-dragover .upload-stage-frame {
  transform: scale(1.02);
  border-color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.18);
}

.upload-dropzone.is-uploading .upload-stage-frame,
.upload-paste-input.is-uploading,
.upload-picker.is-uploading,
.upload-file-summary.is-uploading {
  opacity: 0.72;
}

.result,
pre {
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 16px;
  overflow: auto;
  color: var(--fg);
}

.album-card,
.user-card,
.admin-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-panel);
  padding: 18px;
  background: var(--card-soft);
}

.item-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.item {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.muted {
  color: var(--text-muted);
}

a.inline-link {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 0.18em;
}

.auth-layout {
  max-width: 620px;
  margin: 5vh auto 0;
}

.auth-card {
  padding: 32px;
}

.auth-footer {
  margin-top: 6px;
}

.inline-form {
  margin-top: 12px;
}

.inline-form-tight {
  justify-items: start;
}

@media (max-width: 900px) {
  .page-shell {
    padding-inline: 18px;
  }

  .site-nav {
    padding: 12px;
  }

  h1 {
    font-size: clamp(2rem, 13vw, 3.2rem);
  }

  .upload-card,
  .card,
  .auth-card {
    padding: 22px;
  }
}

@media (max-width: 640px) {
  .nav-links,
  .nav-actions,
  .row {
    width: 100%;
  }

  .nav-actions {
    justify-content: flex-end;
  }

  .upload-card-header {
    display: grid;
  }

  .upload-stage {
    min-height: 250px;
    padding: 18px 0 20px;
  }

  .upload-stage-frame {
    padding: 24px 18px;
    border-width: 4px;
  }

  .upload-actions-panel {
    padding-top: 24px;
  }

  .upload-picker {
    width: 100%;
    justify-content: center;
    font-size: 1.08rem;
  }

  .upload-or::before,
  .upload-or::after {
    width: 46px;
  }

  .upload-file-summary {
    min-width: 100%;
  }

  .album-workspace-header,
  .albums-section-header {
    align-items: stretch;
  }

  .dashboard-recent-album-card {
    grid-template-columns: 1fr;
  }

  .dashboard-recent-album-thumb {
    min-height: 180px;
  }

  .hero-notes {
    grid-template-columns: 1fr;
  }

  .split-link-control {
    min-width: 0;
    width: 100%;
    display: flex;
  }

  .split-link-action {
    width: 100%;
    border-right: 0;
    border-radius: var(--radius-pill);
  }

  input.split-link-value {
    display: none;
  }
}
