:root {
  --bg: #050506;
  --card: #141418;
  --panel: #1a1a20;
  --panel-border: #2a2a34;
  --text: #f4f2f6;
  --muted: #8b8794;
  --accent: #ff2d8a;
  --accent-end: #ff4d6d;
  --accent-glow: rgba(255, 45, 138, 0.4);
  --success: #3ddc84;
  --cyan: #00d4ff;
  --orange: #ff8c42;
  --radius-card: 20px;
  --radius-panel: 16px;
  --radius-btn: 12px;
  --font: "Inter", system-ui, sans-serif;
}

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

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

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
}

.page {
  min-height: 100vh;
  padding: 1.5rem 1rem 3rem;
}

.brand {
  max-width: 1280px;
  margin: 0 auto 1.25rem;
  padding: 0 0.5rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand-logo-img {
  display: block;
  width: auto;
  height: 24px;
  max-width: min(161px, 55vw);
}

.shell {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.28fr);
  grid-template-rows: 528px;
  align-items: stretch;
  width: 100%;
  max-width: 1248px;
  height: 528px;
  max-height: 528px;
  margin: 0 auto;
  background: #1c1c22;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.65);
}

.card-art {
  position: relative;
  min-height: 0;
  height: 100%;
  background: #101014;
  overflow: hidden;
}

.card-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 55% center;
  display: block;
}

.card-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  max-height: 528px;
  overflow: hidden;
  padding: 1.5rem 1.5rem 1.5rem 1.15rem;
  background: #1a1a20;
}

.card-panel-results,
.card-panel-upload {
  padding-top: 1.5rem;
}

.panel-inner {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  padding: 1.5rem 1.35rem 1.35rem;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: #24242c;
}

.panel-screen {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
}

.panel-screen[hidden] {
  display: none !important;
}

.list-scroll {
  flex: 1 1 0;
  min-height: 0;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0.35rem 0 1rem;
  padding-right: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.list-scroll::-webkit-scrollbar {
  width: 6px;
}

.list-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 4px;
}

.panel {
  width: 100%;
}

.panel-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}

.panel-title.inline {
  text-align: left;
  font-size: 1.35rem;
  font-weight: 700;
}

.panel-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.panel-hint {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

.upload-status {
  margin: 0 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  background: rgba(255, 45, 138, 0.12);
  color: var(--accent);
  font-size: 0.85rem;
  text-align: center;
}

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

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

.panel-hint code {
  color: var(--accent);
  font-size: 0.85em;
}

.upload-status.is-error {
  background: rgba(255, 68, 68, 0.12);
  color: #ff6b6b;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.panel-head-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.panel-head-left .panel-title.inline {
  margin: 0;
}

.panel-meta {
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.55rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #4a4a54;
  color: #e4e2ea;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

.dropzone {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-panel);
  background: #1e1e26;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 1.5rem;
}

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

.dropzone.dragover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 0 40px var(--accent-glow);
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: radial-gradient(circle at 30% 30%, var(--accent), #a020f0);
  box-shadow: 0 0 32px var(--accent-glow);
}

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
  min-width: 0;
}

.panel-actions-secondary {
  margin-top: 0.75rem;
}

.btn {
  flex: 1 1 8rem;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.12s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-end) 100%);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn-outline {
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-small {
  flex: 0 0 auto;
  padding: 0.55rem 0.85rem;
  font-size: 0.8rem;
}

.btn-icon {
  flex-shrink: 0;
}

.file-list,
.queue-list,
.links-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-list[hidden],
.panel-actions[hidden],
#after-upload-actions[hidden] {
  display: none !important;
}

.queue-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.queue-item:last-child {
  border-bottom: none;
}

.ext-badge {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #0a0a0c;
  flex-shrink: 0;
}

.ext-badge.jpg,
.ext-badge.jpeg {
  background: var(--accent);
}

.ext-badge.png {
  background: var(--cyan);
}

.ext-badge.gif,
.ext-badge.webp {
  background: var(--orange);
}

.ext-badge.default {
  background: #6b6b78;
  color: #fff;
}

.queue-body {
  min-width: 0;
}

.queue-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-size {
  font-size: 0.78rem;
  color: var(--muted);
}

.progress-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  margin-top: 0.4rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-end));
  border-radius: 2px;
  transition: width 0.15s;
}

.progress-fill.done {
  background: var(--success);
}

.queue-status {
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 4.5rem;
  text-align: right;
}

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

.queue-remove {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #7a7585;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.queue-remove:hover {
  color: #b8b3c0;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.queue-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 4.25rem;
}

.queue-copy {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(255, 45, 138, 0.42);
  background: rgba(255, 45, 138, 0.14);
  color: #ff4d7a;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.queue-copy:hover {
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 77, 122, 0.55) 0%, rgba(233, 30, 99, 0.5) 100%);
  border-color: rgba(255, 77, 138, 0.75);
  box-shadow: 0 0 14px rgba(255, 45, 138, 0.28);
}

.queue-copy-icon {
  display: block;
  stroke: currentColor;
}

.queue-item-link {
  grid-template-columns: 52px minmax(0, 1fr) auto;
  column-gap: 0.85rem;
}

.queue-item-link .queue-name {
  cursor: default;
}

.queue-item-link .queue-name:hover {
  color: inherit;
}

.queue-item-album .queue-copy {
  background: rgba(255, 45, 138, 0.22);
  border-color: rgba(255, 45, 138, 0.55);
}

.queue-thumb {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1a1a20;
}

.queue-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.queue-thumb .ext-badge {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  font-size: 0.68rem;
}

.panel-head-queue {
  flex-shrink: 0;
  margin-bottom: 0.5rem;
}

.panel-head-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.panel-head-top .panel-title.inline {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.25;
}

.panel-head-top .badge {
  flex-shrink: 0;
  min-width: 1.75rem;
  height: 1.75rem;
  border-radius: 10px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e8e6ee;
  font-size: 0.8rem;
}

.panel-weight-block {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.panel-weight-label {
  font-size: 0.72rem;
  color: var(--muted);
}

.panel-weight-value {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.queue-progress-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 0.4rem;
}

.queue-progress-row .progress-bar {
  flex: 1;
  margin: 0;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.queue-progress-row .progress-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, #ff4d7a, #e91e63);
}

.queue-progress-pct {
  font-size: 0.75rem;
  color: var(--muted);
  min-width: 2.4rem;
  text-align: right;
  flex-shrink: 0;
}

.queue-done-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.queue-done-icon {
  color: var(--success);
  font-size: 0.85rem;
  line-height: 1;
}

.queue-done-text {
  color: var(--success);
  font-size: 0.78rem;
  font-weight: 500;
}

.queue-error-row {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #ff6b6b;
}

.queue-link {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.queue-link:hover {
  color: #fff;
}

.queue-item-empty {
  grid-template-columns: 1fr;
}

.queue-item-empty .queue-name {
  color: var(--muted);
  font-weight: 400;
}

.panel-actions-queue .btn {
  flex: 1 1 0;
  min-width: 0;
}

.panel-screen .panel-head {
  flex-shrink: 0;
  margin-bottom: 0.35rem;
}

.panel-screen .panel-actions {
  flex-shrink: 0;
  margin-top: auto;
}

.panel-screen .panel-hint {
  flex-shrink: 0;
  margin-top: auto;
}

#panel-select .dropzone {
  flex-shrink: 0;
}

#panel-select .panel-actions {
  margin-top: 0;
}

#panel-select .panel-hint {
  margin-top: 0.75rem;
}

.upload-select-head {
  display: none;
}

.btn-label-full {
  display: none;
}

.btn-label-short {
  display: inline;
}

.links-list li {
  padding: 0.55rem 0;
  border-bottom: none;
}

.links-list a {
  color: #f0eef3;
  font-size: 0.92rem;
  font-weight: 400;
  word-break: break-all;
  text-decoration: none;
  line-height: 1.4;
}

.links-list a:hover {
  color: #fff;
}

.link-row {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.link-field {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.65rem 0.75rem;
  font-family: inherit;
  font-size: 0.85rem;
}

.media-frame {
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: #000;
  margin: 0.75rem 0 0;
}

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

.media-frame iframe {
  width: 100%;
  height: 50vh;
  border: none;
}

.media-frame audio {
  display: block;
  width: 100%;
  padding: 1rem;
}

.media-frame-empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--muted);
}

.file-title {
  text-align: left;
  word-break: break-word;
}

.file-meta-line {
  text-align: left;
  margin-bottom: 0.5rem;
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-end));
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  z-index: 100;
  box-shadow: 0 8px 32px var(--accent-glow);
}

.toast[hidden] {
  display: none;
}

/* ——— Страница просмотра файла ——— */
.body-file {
  background: #000;
}

.shell-file {
  max-width: 1020px;
}

.file-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.file-promo {
  background: #1a1a20;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  max-width: 100%;
}

.file-promo-banner {
  position: relative;
  height: auto;
  overflow: hidden;
  aspect-ratio: 2024 / 299;
}

.file-promo-banner picture {
  display: block;
  width: 100%;
  height: 100%;
}

.file-promo-banner-img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}

.file-promo-text {
  padding: 1.35rem 1.5rem 1.5rem;
  text-align: center;
}

.file-promo-text p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: #e8e6ec;
  white-space: pre-line;
}

.file-promo-text p:last-child {
  margin-bottom: 0;
}

.file-showcase {
  margin-bottom: 1rem;
  max-width: 100%;
  min-width: 0;
}

.file-showcase-frame {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  background: #0a0a0c;
  line-height: 0;
  max-width: 100%;
  min-width: 0;
}

.file-showcase-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
}

.file-showcase-iframe {
  width: 100%;
  height: 70vh;
  border: none;
  display: block;
}

.file-showcase-fallback,
.file-showcase-frame-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  line-height: 1.5;
  color: var(--muted);
}

.file-showcase-meta {
  margin: 0.5rem 0 1rem;
  font-size: 0.85rem;
}

.file-gps-overlay {
  position: absolute;
  left: 10px;
  bottom: 10px;
  right: auto;
  max-width: min(92%, 320px);
  padding: 0.5rem 0.65rem;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 4px;
  line-height: 1.4;
  pointer-events: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.file-gps-overlay p {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  color: #1a1a1a;
  text-shadow: none;
}

.file-gps-overlay p:last-child {
  margin-bottom: 0;
}

.file-gps-label {
  font-weight: 600;
}

.file-gps-desc {
  margin-top: 0.35rem !important;
}

.file-page-actions {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
}

.btn-compact {
  flex: 0 0 auto;
  padding: 0.6rem 1rem;
  font-size: 0.82rem;
}

/* ——— Авторизация ——— */
.body-login {
  background: #000;
}

.page-login {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-login .brand {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 1.25rem 1.25rem 0;
  align-self: flex-start;
  text-align: left;
}

.login-shell {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2.5rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #242428;
  border-radius: 28px;
  padding: 2rem 1.35rem 2.25rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
}

.login-title {
  margin: 0 0 1.5rem;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.login-error {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(255, 77, 109, 0.12);
  color: #ff8ca8;
  font-size: 0.88rem;
  text-align: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.login-form .field {
  width: 100%;
  margin: 0;
}

.field-input {
  width: 100%;
  padding: 1rem 1.1rem;
  border: none;
  border-radius: 14px;
  background: #141418;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  box-sizing: border-box;
}

.field-input::placeholder {
  color: #6f6a78;
}

.field-input:focus {
  outline: 2px solid rgba(255, 45, 138, 0.45);
  outline-offset: 0;
}

.btn-login {
  align-self: stretch;
  width: 100%;
  min-width: 0;
  flex: 0 0 auto;
  margin-top: 0.75rem;
  padding: 1rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(180deg, #ff4d7a 0%, #e91e63 100%);
  box-shadow: none;
}

.btn-login:hover:not(:disabled) {
  background: linear-gradient(180deg, #ff5f87 0%, #f0236b 100%);
  transform: none;
}

@media (min-width: 641px) {
  .page-login .brand {
    max-width: none;
    margin: 0;
    padding: 1.25rem 1.5rem 0;
    text-align: left;
  }

  .login-shell {
    padding: 2rem 1rem 4rem;
  }

  .login-card {
    background: #1a1a20;
    border-radius: 20px;
    padding: 2rem 1.75rem 1.75rem;
  }

  .login-title {
    font-size: 1.35rem;
    margin-bottom: 1.25rem;
  }

  .login-form {
    gap: 0.85rem;
  }

  .field-input {
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #25212b;
    font-size: inherit;
  }

  .btn-login {
    align-self: center;
    width: auto;
    min-width: 9.5rem;
    margin-top: 0.5rem;
    padding: 0.9rem 2.5rem;
    font-size: 0.95rem;
    background: #ff3366;
  }

  .btn-login:hover:not(:disabled) {
    background: #ff4d7a;
  }
}

.brand-with-logout,
.brand-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logout-form {
  margin: 0;
}

/* ——— Админка ——— */
.body-admin {
  background: #050506;
}

.shell-admin {
  max-width: 1020px;
}

.admin-panel {
  background: #1a1a20;
  border-radius: 20px;
  padding: 1.5rem;
}

.admin-title {
  margin: 0 0 1rem;
  font-size: 1.4rem;
}

.admin-subtitle {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.admin-hint {
  margin: -0.5rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-promo-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.admin-promo-form .btn {
  flex: 0 0 auto;
  align-self: flex-start;
}

.admin-textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  line-height: 1.5;
  font-family: inherit;
}

.shell-admin .admin-panel + .admin-panel {
  margin-top: 1.25rem;
}

.admin-flash {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: rgba(61, 220, 132, 0.12);
  color: #8ef0b8;
}

.admin-back {
  margin: 0 0 1rem;
}

.admin-back a {
  color: var(--muted);
  text-decoration: none;
}

.admin-back a:hover {
  color: var(--text);
}

.admin-create-form {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #2a2a34;
}

.admin-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.admin-form-row .field-input {
  flex: 1 1 180px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 0.5rem;
  text-align: left;
  border-bottom: 1px solid #2a2a34;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.admin-link {
  color: var(--accent);
  text-decoration: none;
}

.admin-link:hover {
  text-decoration: underline;
}

.admin-empty {
  color: var(--muted);
}

.status-active {
  color: #8ef0b8;
}

.status-inactive {
  color: #ff8ca8;
}

.admin-courier-head {
  margin-bottom: 1.25rem;
}

.admin-meta {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.admin-actions-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #2a2a34;
}

.admin-inline-form {
  flex: 1 1 320px;
}

.btn-danger {
  border-color: rgba(255, 77, 109, 0.45);
  color: #ff8ca8;
}

.admin-photos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.admin-photo-card {
  background: #141418;
  border-radius: 12px;
  padding: 0.75rem;
}

.admin-photo-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #0a0a0c;
}

.admin-photo-file {
  display: block;
  padding: 1rem 0.5rem;
  color: var(--text);
  text-decoration: none;
  word-break: break-all;
}

.admin-photo-meta {
  margin: 0.5rem 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.album-showcase {
  margin-bottom: 1rem;
}

.album-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.album-item {
  margin: 0;
}

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

.album-item-img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 8px;
  background: #0a0a0c;
}

.album-item-fallback {
  padding: 1.5rem 0.75rem;
  text-align: center;
}

.album-item-meta {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  word-break: break-all;
}

@media (max-width: 900px) {
  .body-upload {
    background: #000;
  }

  .body-upload .page {
    padding: 0 0 2rem;
  }

  .body-upload .brand {
    max-width: none;
    margin: 0;
    padding: 1.25rem 1.25rem 0;
  }

  .body-upload .shell {
    padding: 0 1rem;
  }

  .body-upload .card {
    display: block;
    height: auto;
    max-height: none;
    min-height: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .body-upload .card-art {
    display: none;
  }

  .body-upload .card-panel {
    padding: 0.75rem 0 0;
    background: transparent;
    max-height: none;
    min-height: 0;
  }

  .body-upload .panel-inner {
    border: none;
    background: #242428;
    border-radius: 28px;
    padding: 2rem 1.25rem 2.25rem;
    min-height: calc(100vh - 7.5rem);
    max-height: none;
    overflow: visible;
  }

  .body-upload #panel-select {
    justify-content: flex-start;
    min-height: 100%;
  }

  .upload-select-head {
    display: block;
    text-align: center;
    margin-bottom: 1.75rem;
  }

  .upload-select-title {
    margin: 0 0 1rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.01em;
  }

  .upload-select-desc {
    margin: 0;
    color: #8b8794;
    font-size: 0.82rem;
    line-height: 1.55;
  }

  .body-upload .dropzone-desktop {
    display: none !important;
  }

  .upload-select-actions {
    flex-direction: column;
    gap: 0.85rem;
    margin-top: auto;
    padding-top: 1.5rem;
  }

  .upload-select-actions .btn {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    padding: 1rem 1.25rem;
    border-radius: 999px;
    font-size: 0.92rem;
  }

  .upload-select-actions .btn-primary {
    background: linear-gradient(180deg, #ff4d7a 0%, #e91e63 100%);
    box-shadow: none;
  }

  .upload-select-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.22);
    background: transparent;
  }

  .btn-label-full {
    display: inline;
  }

  .btn-label-short {
    display: none;
  }

  .body-upload .panel-head-top .panel-title.inline,
  .body-results .panel-head-top .panel-title.inline {
    font-size: 1.15rem;
  }

  .body-upload #panel-queue,
  .body-results .panel-results {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }

  .body-upload #panel-queue .list-scroll,
  .body-results .panel-results .list-scroll {
    flex: 1 1 auto;
    max-height: none;
    min-height: 0;
    margin-bottom: 1.25rem;
  }

  .body-upload .panel-actions-queue,
  .body-results .panel-actions-queue {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.65rem;
    margin-top: auto;
    padding-top: 0.25rem;
  }

  .body-upload .panel-actions-queue .btn,
  .body-results .panel-actions-queue .btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    padding: 0.95rem 0.65rem;
    border-radius: 999px;
    font-size: 0.86rem;
    white-space: nowrap;
  }

  .body-upload .panel-actions-queue .btn-primary,
  .body-results .panel-actions-queue .btn-primary {
    background: linear-gradient(180deg, #ff4d7a 0%, #e91e63 100%);
    box-shadow: none;
  }

  .body-upload .panel-actions-queue .btn-outline,
  .body-results .panel-actions-queue .btn-outline {
    border-color: rgba(255, 255, 255, 0.22);
    background: transparent;
  }

  .body-results {
    background: #000;
  }

  .body-results .page {
    padding: 0 0 2rem;
  }

  .body-results .brand {
    max-width: none;
    margin: 0;
    padding: 1.25rem 1.25rem 0;
  }

  .body-results .shell {
    padding: 0 1rem;
  }

  .body-results .card {
    display: block;
    height: auto;
    max-height: none;
    min-height: 0;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
  }

  .body-results .card-art {
    display: none;
  }

  .body-results .card-panel {
    padding: 0.75rem 0 0;
    background: transparent;
    max-height: none;
    min-height: 0;
  }

  .body-results .panel-inner {
    border: none;
    background: #242428;
    border-radius: 28px;
    padding: 2rem 1.25rem 2.25rem;
    min-height: calc(100vh - 7.5rem);
    max-height: none;
    overflow: visible;
  }

  .body-file {
    background: #000;
    overflow-x: hidden;
  }

  .body-file .page {
    padding: 0 0 2.5rem;
    overflow-x: hidden;
  }

  .body-file .brand {
    max-width: none;
    margin: 0;
    padding: 1.25rem 1.25rem 0.75rem;
  }

  .body-file .shell-file {
    max-width: 100%;
    width: 100%;
    min-width: 0;
    padding: 0 1rem;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .body-file .file-page,
  .body-file .file-promo,
  .body-file .file-showcase,
  .body-file .file-showcase-frame,
  .body-file .album-item,
  .body-file .album-stack {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .body-file .file-promo {
    background: #242428;
    border-radius: 28px;
    margin-bottom: 1rem;
    overflow: hidden;
  }

  .body-file .file-promo-banner {
    width: 100%;
    max-width: 100%;
    aspect-ratio: auto;
    height: auto;
    overflow: hidden;
  }

  .body-file .file-promo-banner picture {
    display: block;
    width: 100%;
    height: auto;
  }

  .body-file .file-promo-banner-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center center;
  }

  .body-file .file-promo-text {
    padding: 1.25rem 1.15rem 1.35rem;
    text-align: left;
  }

  .body-file .file-promo-text p {
    font-size: 0.82rem;
    line-height: 1.55;
    color: #f0eef4;
    margin-bottom: 0.85rem;
  }

  .body-file .file-showcase {
    margin-bottom: 0.75rem;
  }

  .body-file .file-showcase-frame {
    border-radius: 0;
    background: transparent;
    overflow: hidden;
  }

  .body-file .file-showcase-img,
  .body-file video.file-showcase-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: 0;
  }

  .body-file .album-stack {
    gap: 0.85rem;
  }

  .body-file .file-gps-overlay {
    left: 8px;
    bottom: 8px;
    padding: 0.45rem 0.55rem;
    max-width: calc(100% - 16px);
  }

  .body-file .file-gps-overlay p {
    font-size: 0.65rem;
    line-height: 1.35;
  }

  .body-file .file-page-actions {
    display: none;
  }
}

@media (max-width: 900px) {
  body:not(.body-upload) .card {
    grid-template-columns: 1fr;
    grid-template-rows: 320px auto;
    height: auto;
    max-height: none;
    min-height: 0;
    max-width: 100%;
  }

  body:not(.body-upload) .card-art {
    min-height: 320px;
    height: 320px;
  }

  .card-panel {
    max-height: none;
    height: auto;
    min-height: 420px;
  }

  .list-scroll {
    max-height: 280px;
    flex: none;
  }

  .card-panel {
    padding: 1.5rem 1.25rem 1.75rem;
  }

  .panel-actions {
    flex-direction: column;
  }

}
