:root {
  --ink: #17181b;
  --muted: #5f6670;
  --line: #d4d7dc;
  --paper: #eef0f2;
  --card: #fff;
  --accent: #123a8c;
  --accent-dark: #0c2d6e;
  --danger: #9f1d16;
  --ok: #1b6b3a;
  --shadow: 0 1px 2px rgba(23, 24, 27, 0.06);
  --hover: #f4f5f6;
  --input-bg: #fff;
  --input-border: #c9ced4;
  --track: #dfe3e8;
  --drop-bg: #f7f8f9;
  --drop-over: #eef2f8;
  --icon-bg: #f1f3f5;
  --icon-image: #f3efe6;
  --icon-pdf: #f3eaea;
  --icon-archive: #e8eef4;
  --flash-error-bg: #f8eaea;
  --flash-error-border: #ebcfcf;
  --flash-ok-bg: #e8f3ec;
  --flash-ok-border: #c4ddcd;
  --flash-info-bg: #eef2f8;
  --flash-info-border: #d3dbe8;
  --danger-border: #e3c5c3;
  --badge-bg: #eef2f8;
  --dialog-dim: rgba(23, 24, 27, 0.4);
  --dialog-shadow: 0 12px 40px rgba(23, 24, 27, 0.18);
  --menu-shadow: 0 8px 24px rgba(23, 24, 27, 0.12);
  --focus-ring: 0 0 0 2px rgba(18, 58, 140, 0.15);
  --google-bg: #fff;
  color-scheme: light;
}

html[data-theme="dark"],
html.theme-dark {
  --ink: #e8eaed;
  --muted: #9aa0a6;
  --line: #3c4043;
  --paper: #1a1b1e;
  --card: #2a2b2e;
  --accent: #8ab4f8;
  --accent-dark: #aecbfa;
  --danger: #f28b82;
  --ok: #81c995;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  --hover: #3c4043;
  --input-bg: #1a1b1e;
  --input-border: #5f6368;
  --track: #3c4043;
  --drop-bg: #1f2023;
  --drop-over: #243044;
  --icon-bg: #3c4043;
  --icon-image: #3d382c;
  --icon-pdf: #3d2f2f;
  --icon-archive: #2f3843;
  --flash-error-bg: #3d2a2a;
  --flash-error-border: #5c3a3a;
  --flash-ok-bg: #24362c;
  --flash-ok-border: #3d5c48;
  --flash-info-bg: #273246;
  --flash-info-border: #3d4d68;
  --danger-border: #5c3a3a;
  --badge-bg: #273246;
  --dialog-dim: rgba(0, 0, 0, 0.62);
  --dialog-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --focus-ring: 0 0 0 2px rgba(138, 180, 248, 0.28);
  --google-bg: #2a2b2e;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not(.theme-light) {
    --ink: #e8eaed;
    --muted: #9aa0a6;
    --line: #3c4043;
    --paper: #1a1b1e;
    --card: #2a2b2e;
    --accent: #8ab4f8;
    --accent-dark: #aecbfa;
    --danger: #f28b82;
    --ok: #81c995;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    --hover: #3c4043;
    --input-bg: #1a1b1e;
    --input-border: #5f6368;
    --track: #3c4043;
    --drop-bg: #1f2023;
    --drop-over: #243044;
    --icon-bg: #3c4043;
    --icon-image: #3d382c;
    --icon-pdf: #3d2f2f;
    --icon-archive: #2f3843;
    --flash-error-bg: #3d2a2a;
    --flash-error-border: #5c3a3a;
    --flash-ok-bg: #24362c;
    --flash-ok-border: #3d5c48;
    --flash-info-bg: #273246;
    --flash-info-border: #3d4d68;
    --danger-border: #5c3a3a;
    --badge-bg: #273246;
    --dialog-dim: rgba(0, 0, 0, 0.62);
    --dialog-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
    --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --focus-ring: 0 0 0 2px rgba(138, 180, 248, 0.28);
    --google-bg: #2a2b2e;
    color-scheme: dark;
  }
}

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

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

body {
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.beta-only { display: none; }

.files-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.files-search { flex: 1; min-width: 160px; }
.files-search input,
.files-sort select {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  padding: 8px 10px;
  font: inherit;
  background: var(--input-bg);
  color: var(--ink);
}

.files-sort { min-width: 140px; }

.files-filter-empty {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13.5px;
}

.upload-progress {
  display: grid;
  gap: 6px;
}

.upload-progress__track {
  height: 8px;
  border-radius: 99px;
  overflow: hidden;
  background: var(--track);
}

.upload-progress__fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
}

.upload-progress__label {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.pixr-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 70;
  transform: translateX(-50%);
  max-width: min(420px, calc(100% - 24px));
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--menu-shadow);
  color: var(--ink);
  font-size: 13.5px;
}

.auth-body,
.app-body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
}

.auth-bg { display: none; }

.app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 8px 20px;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
}

.app-brand strong {
  font-weight: 400;
}

.app-logo,
.auth-logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  background: #111;
}

.auth-logo { width: 36px; height: 36px; }

.app-user {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.theme-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.theme-pills {
  display: flex;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--card);
}

.theme-pill {
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 650;
  color: var(--muted);
  text-decoration: none;
  border-right: 1px solid var(--line);
  background: transparent;
}

.theme-pill:last-child { border-right: 0; }
.theme-pill:hover { text-decoration: none; color: var(--ink); background: var(--hover); }

.theme-pill--active {
  color: var(--ink);
  background: var(--hover);
}

.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: calc(100dvh - 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 16px 40px;
}

.auth-card {
  width: min(400px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 24px 24px 20px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.auth-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 650;
}

.auth-brand h1,
.auth-brand h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.2;
}

.auth-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-tabs {
  display: flex;
  gap: 18px;
  margin: 0 0 18px;
  border-bottom: 1px solid var(--line);
}

.auth-tab {
  text-align: center;
  padding: 8px 0 10px;
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.auth-tab:hover { text-decoration: none; color: var(--ink); }

.auth-tab.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  background: none;
  box-shadow: none;
}

.auth-form { display: grid; gap: 12px; }

.field { display: grid; gap: 5px; font-size: 13px; font-weight: 650; }
.field input {
  width: 100%;
  border: 1px solid var(--input-border);
  border-radius: 4px;
  padding: 10px 11px;
  font: inherit;
  font-weight: 400;
  background: var(--input-bg);
  color: var(--ink);
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.code-input {
  letter-spacing: 0.28em;
  font-size: 20px !important;
  font-weight: 700 !important;
  text-align: center;
}

.auth-forgot, .auth-alt, .auth-hint, .auth-foot {
  color: var(--muted);
  font-size: 13px;
}

.auth-forgot { margin: -2px 0 4px; text-align: right; }
.auth-alt { margin: 14px 0 0; text-align: center; }
.auth-hint { margin: 10px 0 0; text-align: center; line-height: 1.45; }
.auth-foot { margin: 18px 0 0; }

.pixr-family {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 0;
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.pixr-family a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pixr-family a:hover {
  color: var(--ink);
}
.pixr-family__current {
  color: var(--ink);
  font-weight: 650;
}

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

.lang-switch {
  display: flex;
  justify-content: center;
  margin: 16px 0 0;
}

.lang-switch select {
  max-width: 100%;
  min-width: 160px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.app-user .lang-switch { margin: 0; }

html[dir="rtl"] .auth-forgot { text-align: left; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 10px 14px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }

html[data-theme="dark"] .btn-primary,
html.theme-dark .btn-primary {
  color: #0b1a33;
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not(.theme-light) .btn-primary {
    color: #0b1a33;
  }
}

.btn-google {
  background: var(--google-bg);
  color: var(--ink);
  border-color: var(--line);
}
.btn-google:hover { background: var(--hover); text-decoration: none; }
.btn-google.is-disabled { opacity: 0.78; cursor: default; pointer-events: none; }

.btn-ghost {
  width: auto;
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  padding: 6px 10px;
  font-size: 13px;
}
.btn-ghost:hover { background: var(--hover); text-decoration: none; }

.google-icon { display: flex; }

.auth-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

.flash {
  margin: 0 0 14px;
  padding: 9px 11px;
  border-radius: 4px;
  border: 1px solid transparent;
  font-size: 13.5px;
  line-height: 1.45;
}
.flash--error { background: var(--flash-error-bg); color: var(--danger); border-color: var(--flash-error-border); }
.flash--success { background: var(--flash-ok-bg); color: var(--ok); border-color: var(--flash-ok-border); }
.flash--info { background: var(--flash-info-bg); color: var(--accent); word-break: break-all; border-color: var(--flash-info-border); }

.cloud-shell {
  width: min(880px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.cloud-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.cloud-hero h1 {
  margin: 0 0 4px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: 0;
}

.cloud-hero p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
}

.storage-meter {
  min-width: 180px;
  max-width: 240px;
  flex: 1;
}

.storage-meter__track {
  height: 6px;
  background: var(--track);
  border-radius: 99px;
  overflow: hidden;
}

.storage-meter__fill {
  height: 100%;
  background: var(--accent);
}

.cloud-choices {
  display: flex;
  gap: 0;
  margin: 0 0 16px;
  border-bottom: 1px solid var(--line);
}

.cloud-choices.has-admin { display: flex; }

.choice-card {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px 16px 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  box-shadow: none;
  margin-bottom: -1px;
}

.choice-card:hover {
  text-decoration: none;
  transform: none;
  color: var(--ink);
  border-color: transparent;
}

.choice-card.is-active {
  color: var(--ink);
  border-bottom-color: var(--ink);
  box-shadow: none;
}

.choice-icon { display: none; }

.choice-card strong {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}

.choice-card span { display: none; }

.cloud-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--card);
  padding: 18px 18px 16px;
}

.cloud-panel h2 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.cloud-limit {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 32px 16px;
  border: 1px dashed var(--input-border);
  border-radius: 4px;
  background: var(--drop-bg);
  color: var(--ink);
  cursor: pointer;
  text-align: center;
}

.dropzone.is-over {
  background: var(--drop-over);
  border-color: var(--accent);
}

.dropzone-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.dropzone strong { font-size: 15px; }
.dropzone span { color: var(--muted); font-size: 13px; }

.upload-form {
  display: grid;
  gap: 12px;
  position: relative;
}

.upload-error {
  margin: 0;
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 700;
}

.btn-inline { width: auto; justify-self: start; padding-left: 16px; padding-right: 16px; }

.empty-files {
  display: grid;
  gap: 12px;
  justify-items: start;
  color: var(--muted);
}

.file-grid {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.file-card {
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--card);
}

.file-card:first-child { border-top: 0; }

.file-card.is-downloading {
  padding-bottom: 16px;
}

.file-card.is-downloading::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 3px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 42%, var(--accent) 58%, transparent 100%);
  background-size: 42% 100%;
  background-repeat: no-repeat;
  animation: pixr-download-bar 1.05s ease-in-out infinite;
}

@keyframes pixr-download-bar {
  from { background-position: -45% 0; }
  to { background-position: 145% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .file-card.is-downloading::after {
    animation: none;
    background: var(--accent);
    background-size: 100% 100%;
  }
}

.file-card__icon {
  width: 32px;
  height: 32px;
  border-radius: 3px;
  background: var(--icon-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2348505a' stroke-width='1.8'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E") center / 18px no-repeat;
}

html[data-theme="dark"] .file-card__icon,
html.theme-dark .file-card__icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='1.8'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]):not(.theme-light) .file-card__icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%239aa0a6' stroke-width='1.8'%3E%3Cpath d='M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 3v5h5'/%3E%3C/svg%3E");
  }
}

.file-card[data-kind="image"] .file-card__icon { background-color: var(--icon-image); }
.file-card[data-kind="pdf"] .file-card__icon { background-color: var(--icon-pdf); }
.file-card[data-kind="archive"] .file-card__icon { background-color: var(--icon-archive); }

.file-card__name {
  display: block;
  font-size: 14px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-card__meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.file-card__actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.file-card__actions form { margin: 0; }

.btn-tiny {
  width: auto;
  padding: 6px 9px;
  font-size: 12.5px;
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-tiny:hover { background: var(--hover); text-decoration: none; }

.btn-danger {
  background: var(--card);
  color: var(--danger);
  border-color: var(--danger-border);
}
.btn-danger:hover { background: var(--flash-error-bg); }

.admin-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0 0 14px;
}

.admin-toolbar form { margin: 0; }

.admin-subtitle {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

.admin-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 6px;
  border-radius: 3px;
  background: var(--badge-bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  vertical-align: middle;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.dots-menu {
  position: relative;
  display: inline-block;
}

.dots-menu__btn {
  list-style: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  color: var(--ink);
  font-size: 16px;
  line-height: 1;
  letter-spacing: 1px;
}

.dots-menu__btn::-webkit-details-marker { display: none; }
.dots-menu > summary { list-style: none; }

.dots-menu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  min-width: 230px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--card);
  box-shadow: var(--menu-shadow);
}

.dots-menu__panel form {
  display: grid;
  gap: 6px;
  margin: 0 0 10px;
}

.dots-menu__panel form:last-child { margin-bottom: 0; }

.dots-menu__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.dots-menu__panel select {
  width: 100%;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
  font-size: 13px;
  background: var(--input-bg);
  color: var(--ink);
}

.pixr-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pixr-dialog[hidden] { display: none; }

.pixr-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: var(--dialog-dim);
}

.pixr-dialog__card {
  position: relative;
  z-index: 1;
  width: min(400px, 100%);
  padding: 18px 18px 14px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--dialog-shadow);
}

.pixr-dialog__card h2 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 400;
}

.pixr-dialog__card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.pixr-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

body.pixr-dialog-open { overflow: hidden; }

.cookie-dialog { z-index: 90; }

.cookie-dialog__card {
  width: min(500px, 100%);
}

.cookie-dialog__list {
  margin: 0 0 16px;
  padding-left: 1.15em;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.cookie-dialog__list li + li { margin-top: 8px; }

.cookie-dialog__actions {
  justify-content: space-between;
}

.cookie-dialog__actions form { margin: 0; }

@media (max-width: 720px) {
  .cloud-hero { flex-direction: column; align-items: stretch; }
  .storage-meter { max-width: none; }
  .file-card {
    grid-template-columns: 32px 1fr;
  }
  .file-card__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 520px) {
  .auth-card { padding: 18px 16px 16px; }
  .app-user span { display: none; }
  .app-bar { padding: 8px 12px; }
  .theme-pill { padding: 5px 7px; }
}

html:is(.look-beta, [data-look="beta"]) {
  scroll-behavior: smooth;
  --ink: #1a2330;
  --muted: #5c6774;
  --line: #d7dee7;
  --paper: #e7edf4;
  --card: #fff;
  --accent: #123a8c;
  --accent-dark: #0c2d6e;
  --bar: #123a8c;
  --bar-ink: #fff;
  --hover: #eef3fa;
  --shadow: 0 1px 2px rgba(18, 58, 140, 0.05), 0 10px 28px rgba(18, 58, 140, 0.09);
  --dialog-shadow: 0 8px 30px rgba(18, 58, 140, 0.16);
  --menu-shadow: 0 8px 24px rgba(18, 58, 140, 0.14);
  --focus-ring: 0 0 0 3px rgba(18, 58, 140, 0.18);
  --badge-bg: #e8eef8;
  --drop-bg: #f5f8fc;
  --drop-over: #e7eef8;
  --track: #d7dee7;
  --radius: 14px;
  --radius-sm: 10px;
}

html:is(.look-beta, [data-look="beta"]):is(.theme-dark, [data-theme="dark"]) {
  --ink: #e8edf4;
  --muted: #9aa6b4;
  --line: #313a48;
  --paper: #121722;
  --card: #1c2330;
  --accent: #8ab4f8;
  --accent-dark: #aecbfa;
  --bar: #0d2458;
  --bar-ink: #f3f6fb;
  --hover: #263044;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.28);
  --dialog-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
  --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --focus-ring: 0 0 0 3px rgba(138, 180, 248, 0.28);
  --badge-bg: #243044;
  --drop-bg: #161c28;
  --drop-over: #1b2a40;
  --track: #313a48;
  --input-bg: #151b26;
  --input-border: #3d4754;
  --google-bg: #1c2330;
}

@media (prefers-color-scheme: dark) {
  html:is(.look-beta, [data-look="beta"]):not(.theme-light):not([data-theme="light"]) {
    --ink: #e8edf4;
    --muted: #9aa6b4;
    --line: #313a48;
    --paper: #121722;
    --card: #1c2330;
    --accent: #8ab4f8;
    --accent-dark: #aecbfa;
    --bar: #0d2458;
    --bar-ink: #f3f6fb;
    --hover: #263044;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 12px 28px rgba(0, 0, 0, 0.28);
    --dialog-shadow: 0 10px 32px rgba(0, 0, 0, 0.45);
    --menu-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    --focus-ring: 0 0 0 3px rgba(138, 180, 248, 0.28);
    --badge-bg: #243044;
    --drop-bg: #161c28;
    --drop-over: #1b2a40;
    --track: #313a48;
    --input-bg: #151b26;
    --input-border: #3d4754;
    --google-bg: #1c2330;
  }
}

@keyframes pixr-beta-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pixr-beta-wash {
  0%, 100% { background-position: 0% 0%, 0 0; }
  50% { background-position: 100% 0%, 0 0; }
}

@keyframes pixr-beta-grain {
  from { background-position: 0 0; }
  to { background-position: 160px 120px; }
}

@keyframes pixr-beta-shine {
  0%, 72% { transform: translateX(-130%) skewX(-18deg); opacity: 0; }
  78% { opacity: 0.7; }
  88%, 100% { transform: translateX(280%) skewX(-18deg); opacity: 0; }
}

html:is(.look-beta, [data-look="beta"]) body {
  isolation: isolate;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 14.5px;
  line-height: 1.5;
  background-color: var(--paper);
  background-image:
    radial-gradient(ellipse 55% 42% at 50% 0%, rgba(255, 255, 255, 0.38), transparent 72%),
    linear-gradient(180deg, rgba(18, 58, 140, 0.1), rgba(18, 58, 140, 0) 170px);
  background-repeat: no-repeat, no-repeat;
  background-size: 170% 70%, auto;
  background-position: 0% 0%, 0 0;
  animation: pixr-beta-wash 22s ease-in-out infinite;
}

html:is(.look-beta, [data-look="beta"]) body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  animation: pixr-beta-grain 42s linear infinite;
}

html:is(.look-beta, [data-look="beta"]):is(.theme-dark, [data-theme="dark"]) body {
  background-image:
    radial-gradient(ellipse 55% 42% at 50% 0%, rgba(138, 180, 248, 0.18), transparent 72%),
    linear-gradient(180deg, rgba(18, 58, 140, 0.28), rgba(18, 58, 140, 0) 180px);
}

@media (prefers-color-scheme: dark) {
  html:is(.look-beta, [data-look="beta"]):not(.theme-light):not([data-theme="light"]) body {
    background-image:
      radial-gradient(ellipse 55% 42% at 50% 0%, rgba(138, 180, 248, 0.18), transparent 72%),
      linear-gradient(180deg, rgba(18, 58, 140, 0.28), rgba(18, 58, 140, 0) 180px);
  }
}

html:is(.look-beta, [data-look="beta"]) .btn,
html:is(.look-beta, [data-look="beta"]) .btn-tiny,
html:is(.look-beta, [data-look="beta"]) .theme-pill,
html:is(.look-beta, [data-look="beta"]) .choice-card,
html:is(.look-beta, [data-look="beta"]) .auth-tab,
html:is(.look-beta, [data-look="beta"]) .file-card,
html:is(.look-beta, [data-look="beta"]) .dropzone,
html:is(.look-beta, [data-look="beta"]) .field input,
html:is(.look-beta, [data-look="beta"]) .lang-switch select {
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

html:is(.look-beta, [data-look="beta"]) .auth-card,
html:is(.look-beta, [data-look="beta"]) .cloud-choices,
html:is(.look-beta, [data-look="beta"]) .cloud-panel {
  animation: pixr-beta-in 0.28s ease;
}

@media (prefers-reduced-motion: reduce) {
  html:is(.look-beta, [data-look="beta"]) body,
  html:is(.look-beta, [data-look="beta"]) body::before,
  html:is(.look-beta, [data-look="beta"]) .app-brand::before,
  html:is(.look-beta, [data-look="beta"]) .auth-card,
  html:is(.look-beta, [data-look="beta"]) .cloud-choices,
  html:is(.look-beta, [data-look="beta"]) .cloud-panel {
    animation: none;
  }
  html:is(.look-beta, [data-look="beta"]) .btn,
  html:is(.look-beta, [data-look="beta"]) .btn-tiny,
  html:is(.look-beta, [data-look="beta"]) .theme-pill,
  html:is(.look-beta, [data-look="beta"]) .choice-card,
  html:is(.look-beta, [data-look="beta"]) .auth-tab,
  html:is(.look-beta, [data-look="beta"]) .file-card,
  html:is(.look-beta, [data-look="beta"]) .dropzone,
  html:is(.look-beta, [data-look="beta"]) .field input,
  html:is(.look-beta, [data-look="beta"]) .lang-switch select {
    transition: none;
  }
}

html:is(.look-beta, [data-look="beta"]) .app-bar {
  min-height: 58px;
  padding: 8px 22px;
  background: var(--bar);
  border-bottom: 0;
  color: var(--bar-ink);
  box-shadow: 0 8px 22px rgba(18, 58, 140, 0.18);
}

html:is(.look-beta, [data-look="beta"]) .app-brand {
  position: relative;
  overflow: hidden;
  color: var(--bar-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 18px;
  font-weight: 400;
}

html:is(.look-beta, [data-look="beta"]) .app-brand::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  pointer-events: none;
  animation: pixr-beta-shine 9s ease-in-out infinite;
}

html:is(.look-beta, [data-look="beta"]) .app-brand strong {
  font-weight: 400;
}

html:is(.look-beta, [data-look="beta"]) .app-brand::after {
  content: "Bêta";
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

html[lang="en"]:is(.look-beta, [data-look="beta"]) .app-brand::after {
  content: "Beta";
}

html:is(.look-beta, [data-look="beta"]) .app-logo {
  border-radius: 8px;
  width: 28px;
  height: 28px;
}

html:is(.look-beta, [data-look="beta"]) .app-user {
  color: rgba(255, 255, 255, 0.86);
}

html:is(.look-beta, [data-look="beta"]) .app-user .lang-switch select {
  background: rgba(255, 255, 255, 0.1);
  color: var(--bar-ink);
  border-color: rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
}

html:is(.look-beta, [data-look="beta"]) .app-user .lang-switch select option {
  color: #1a2330;
  background: #fff;
}

html:is(.look-beta, [data-look="beta"]) .app-bar .btn-ghost {
  color: var(--bar-ink);
  border-color: rgba(255, 255, 255, 0.32);
  border-radius: var(--radius-sm);
}

html:is(.look-beta, [data-look="beta"]) .app-bar .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

html:is(.look-beta, [data-look="beta"]) .theme-pills {
  border-color: rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

html:is(.look-beta, [data-look="beta"]) .theme-pill {
  color: rgba(255, 255, 255, 0.82);
  border-right-color: rgba(255, 255, 255, 0.18);
}

html:is(.look-beta, [data-look="beta"]) .theme-pill:hover {
  color: var(--bar-ink);
  background: rgba(255, 255, 255, 0.12);
}

html:is(.look-beta, [data-look="beta"]) .theme-pill--active {
  color: var(--bar);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

html:is(.look-beta, [data-look="beta"]) .auth-wrap {
  min-height: calc(100dvh - 58px);
  padding: 36px 18px 40px;
}

html:is(.look-beta, [data-look="beta"]) .auth-card {
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card);
  padding: 28px 28px 22px;
}

html:is(.look-beta, [data-look="beta"]) .auth-kicker {
  color: var(--accent);
}

html:is(.look-beta, [data-look="beta"]) .auth-brand h1,
html:is(.look-beta, [data-look="beta"]) .auth-brand h2,
html:is(.look-beta, [data-look="beta"]) .cloud-hero h1,
html:is(.look-beta, [data-look="beta"]) .cloud-panel h2,
html:is(.look-beta, [data-look="beta"]) .pixr-dialog__card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

html:is(.look-beta, [data-look="beta"]) .auth-brand h1,
html:is(.look-beta, [data-look="beta"]) .auth-brand h2 {
  font-size: 26px;
}

html:is(.look-beta, [data-look="beta"]) .auth-tabs {
  gap: 6px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--drop-bg);
}

html:is(.look-beta, [data-look="beta"]) .auth-tab {
  flex: 1;
  padding: 8px 10px;
  margin: 0;
  border: 0;
  border-radius: 9px;
  text-align: center;
}

html:is(.look-beta, [data-look="beta"]) .auth-tab.is-active {
  color: var(--accent);
  background: var(--card);
  box-shadow: 0 1px 3px rgba(18, 58, 140, 0.12);
  border-bottom: 0;
}

html:is(.look-beta, [data-look="beta"]) .field input,
html:is(.look-beta, [data-look="beta"]) .lang-switch select {
  border-radius: var(--radius-sm);
  padding: 11px 12px;
}

html:is(.look-beta, [data-look="beta"]) .field input:focus {
  box-shadow: var(--focus-ring);
}

html:is(.look-beta, [data-look="beta"]) .btn,
html:is(.look-beta, [data-look="beta"]) .btn-tiny,
html:is(.look-beta, [data-look="beta"]) .flash,
html:is(.look-beta, [data-look="beta"]) .dropzone,
html:is(.look-beta, [data-look="beta"]) .dots-menu__btn,
html:is(.look-beta, [data-look="beta"]) .dots-menu__panel,
html:is(.look-beta, [data-look="beta"]) .dots-menu__panel select,
html:is(.look-beta, [data-look="beta"]) .admin-badge,
html:is(.look-beta, [data-look="beta"]) .pixr-dialog__card {
  border-radius: var(--radius-sm);
}

html:is(.look-beta, [data-look="beta"]) .btn {
  padding: 11px 16px;
  box-shadow: 0 1px 2px rgba(18, 58, 140, 0.08);
}

html:is(.look-beta, [data-look="beta"]) .btn-primary {
  background: var(--accent);
  color: #fff;
}

html:is(.look-beta, [data-look="beta"]) .btn-primary:hover {
  box-shadow: 0 4px 12px rgba(18, 58, 140, 0.22);
}

html:is(.look-beta, [data-look="beta"]):is(.theme-dark, [data-theme="dark"]) .btn-primary {
  color: #0b1a33;
}

@media (prefers-color-scheme: dark) {
  html:is(.look-beta, [data-look="beta"]):not(.theme-light):not([data-theme="light"]) .btn-primary {
    color: #0b1a33;
  }
}

html:is(.look-beta, [data-look="beta"]) .cloud-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  gap: 18px 20px;
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

html:is(.look-beta, [data-look="beta"]) .cloud-shell > .flash {
  grid-column: 1 / -1;
  grid-row: 1;
  margin: 0;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}

html:is(.look-beta, [data-look="beta"]) .cloud-choices {
  grid-column: 1;
  grid-row: 2 / 4;
  align-self: start;
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 12px;
  min-height: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

html:is(.look-beta, [data-look="beta"]) .choice-card {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--ink);
}

html:is(.look-beta, [data-look="beta"]) .choice-card:hover {
  background: var(--hover);
  color: var(--ink);
}

html:is(.look-beta, [data-look="beta"]) .choice-card.is-active {
  background: var(--badge-bg);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(18, 58, 140, 0.12);
}

html:is(.look-beta, [data-look="beta"]) .choice-icon {
  display: flex;
  flex-shrink: 0;
  color: inherit;
}

html:is(.look-beta, [data-look="beta"]) .choice-icon svg {
  width: 18px;
  height: 18px;
}

html:is(.look-beta, [data-look="beta"]) .choice-card span {
  display: none;
}

html:is(.look-beta, [data-look="beta"]) .choice-card strong {
  font-size: 13.5px;
  font-weight: 700;
}

html:is(.look-beta, [data-look="beta"]) .cloud-hero {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  padding: 4px 4px 0;
  align-items: center;
}

html:is(.look-beta, [data-look="beta"]) .cloud-hero h1 {
  font-size: 28px;
}

html:is(.look-beta, [data-look="beta"]) .storage-meter__track {
  height: 8px;
  border-radius: 999px;
  box-shadow: inset 0 1px 2px rgba(18, 58, 140, 0.08);
}

html:is(.look-beta, [data-look="beta"]) .cloud-panel {
  grid-column: 2;
  grid-row: 3;
  margin: 0;
  padding: 22px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

html:is(.look-beta, [data-look="beta"]) .cloud-panel h2 {
  font-size: 20px;
  color: var(--ink);
}

html:is(.look-beta, [data-look="beta"]) .file-grid {
  gap: 8px;
  margin-top: 14px;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
}

html:is(.look-beta, [data-look="beta"]) .file-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  box-shadow: 0 1px 2px rgba(18, 58, 140, 0.04);
}

html:is(.look-beta, [data-look="beta"]) .file-card:first-child {
  border-top: 1px solid var(--line);
}

html:is(.look-beta, [data-look="beta"]) .file-card:hover {
  background: var(--hover);
  box-shadow: 0 4px 14px rgba(18, 58, 140, 0.08);
}

html:is(.look-beta, [data-look="beta"]) .file-card__icon {
  border-radius: 8px;
}

html:is(.look-beta, [data-look="beta"]) .dropzone {
  border-radius: var(--radius);
  padding: 36px 16px;
}

html:is(.look-beta, [data-look="beta"]) .app-body > .auth-foot {
  text-align: center;
  padding: 8px 20px 28px;
}

@media (max-width: 860px) {
  html:is(.look-beta, [data-look="beta"]) .cloud-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    width: min(1080px, calc(100% - 24px));
    gap: 14px;
  }
  html:is(.look-beta, [data-look="beta"]) .cloud-choices {
    grid-column: 1;
    grid-row: auto;
    position: static;
    flex-direction: row;
    overflow-x: auto;
  }
  html:is(.look-beta, [data-look="beta"]) .choice-card {
    min-width: max-content;
  }
  html:is(.look-beta, [data-look="beta"]) .choice-icon {
    display: none;
  }
  html:is(.look-beta, [data-look="beta"]) .cloud-shell > .flash,
  html:is(.look-beta, [data-look="beta"]) .cloud-hero,
  html:is(.look-beta, [data-look="beta"]) .cloud-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

html:is(.look-beta, [data-look="beta"]) .beta-only.files-toolbar {
  display: flex;
}

html:is(.look-beta, [data-look="beta"]) .beta-only[hidden] {
  display: none !important;
}

html:is(.look-beta, [data-look="beta"]) .files-search input,
html:is(.look-beta, [data-look="beta"]) .files-sort select {
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

html:is(.look-beta, [data-look="beta"]) .upload-progress__track,
html:is(.look-beta, [data-look="beta"]) .upload-progress__fill {
  border-radius: 99px;
}

html:is(.look-beta, [data-look="beta"]) .upload-progress__fill {
  transition: width 0.18s ease;
}

html:is(.look-beta, [data-look="beta"]) .storage-meter__fill {
  transition: width 0.7s ease;
}

html:is(.look-beta, [data-look="beta"]) .file-card {
  animation: pixr-beta-in 0.32s ease both;
}

html:is(.look-beta, [data-look="beta"]) .file-card:nth-child(1) { animation-delay: 0.02s; }
html:is(.look-beta, [data-look="beta"]) .file-card:nth-child(2) { animation-delay: 0.05s; }
html:is(.look-beta, [data-look="beta"]) .file-card:nth-child(3) { animation-delay: 0.08s; }
html:is(.look-beta, [data-look="beta"]) .file-card:nth-child(4) { animation-delay: 0.11s; }
html:is(.look-beta, [data-look="beta"]) .file-card:nth-child(5) { animation-delay: 0.14s; }
html:is(.look-beta, [data-look="beta"]) .file-card:nth-child(6) { animation-delay: 0.17s; }
html:is(.look-beta, [data-look="beta"]) .file-card:nth-child(n+7) { animation-delay: 0.2s; }

html:is(.look-beta, [data-look="beta"]) .file-card.is-hidden {
  display: none;
}

html:is(.look-beta, [data-look="beta"]) .cloud-shell > .flash {
  animation: pixr-beta-in 0.28s ease;
}

html:is(.look-beta, [data-look="beta"]) .pixr-toast:not([hidden]) {
  display: block;
  animation: pixr-beta-in 0.2s ease;
}

html:is(.look-beta, [data-look="beta"]) .upload-progress:not([hidden]) {
  display: grid;
}

html:is(.look-beta, [data-look="beta"]) .files-filter-empty:not([hidden]) {
  display: block;
}

html:is(.look-beta, [data-look="beta"]) .dropzone.is-over {
  box-shadow: 0 0 0 2px var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  html:is(.look-beta, [data-look="beta"]) {
    scroll-behavior: auto;
  }
  html:is(.look-beta, [data-look="beta"]) .file-card,
  html:is(.look-beta, [data-look="beta"]) .cloud-shell > .flash,
  html:is(.look-beta, [data-look="beta"]) .pixr-toast:not([hidden]) {
    animation: none;
  }
  html:is(.look-beta, [data-look="beta"]) .storage-meter__fill,
  html:is(.look-beta, [data-look="beta"]) .upload-progress__fill {
    transition: none;
  }
}
