.page-public {
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(34, 197, 94, 0.12), transparent 62%),
    radial-gradient(900px 520px at 5% 8%, rgba(16, 185, 129, 0.09), transparent 60%),
    var(--bg);
}

[data-theme="dark"] .page-public {
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(52, 211, 153, 0.08), transparent 62%),
    radial-gradient(900px 520px at 5% 8%, rgba(16, 185, 129, 0.06), transparent 60%),
    var(--bg);
}

.page-public .main-content {
  position: relative;
  z-index: 1;
}

.hero {
  padding-block: clamp(26px, 5vw, 58px) clamp(20px, 3vw, 34px);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 16px;
  animation: rise-in 0.55s ease both;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.eyebrow svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--primary-soft);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 4px var(--primary-soft);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0.08);
  }
}

.hero h1 {
  font-size: clamp(2rem, 5.6vw, 3.35rem);
  font-weight: 900;
  line-height: 1.28;
  letter-spacing: -0.015em;
  max-width: 18ch;
  text-wrap: balance;
}

.hero h1 .grad {
  background: linear-gradient(100deg, var(--primary), #0d9f5f 55%, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  white-space: nowrap;
}

.hero-sub {
  max-width: 54ch;
  color: var(--muted);
  font-size: clamp(0.95rem, 2.3vw, 1.08rem);
  font-weight: 500;
  line-height: 1.8;
  text-wrap: pretty;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-block-start: 6px;
}

.trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.trust-chip svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.upload-wrap {
  display: grid;
  gap: 18px;
  animation: rise-in 0.6s 0.06s ease both;
}

.upload-card {
  padding: clamp(18px, 3.6vw, 30px);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.upload-card::before {
  content: "";
  position: absolute;
  inset-block-start: -80px;
  inset-inline-end: -60px;
  width: 210px;
  height: 210px;
  background: radial-gradient(circle, var(--primary-soft), transparent 68%);
  pointer-events: none;
}

.upload-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block-end: 16px;
  position: relative;
}

.upload-card-head h2 {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.upload-card-head .pill svg {
  width: 13px;
  height: 13px;
}

#storageFullAlert {
  margin-block-end: 14px;
}

.dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: clamp(26px, 5vw, 44px) clamp(16px, 4vw, 32px);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(480px 220px at 50% 0%, var(--primary-tint), transparent 70%),
    var(--surface-soft);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.dropzone:hover {
  border-color: var(--primary);
  background-color: var(--primary-tint);
}

.dropzone.is-dragging {
  border-color: var(--primary);
  background-color: var(--primary-soft);
  transform: scale(1.008);
  box-shadow: inset 0 0 0 1px var(--primary), var(--shadow-md);
}

.dropzone.is-disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.upload-glyph {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 18px 34px -22px rgba(21, 128, 61, 0.55);
  color: var(--primary);
  margin-block-end: 4px;
  position: relative;
}

.upload-glyph::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 30px;
  border: 1px solid var(--primary-soft);
  opacity: 0.8;
}

.upload-glyph svg {
  width: 34px;
  height: 34px;
}

.drop-title {
  font-size: clamp(1.02rem, 2.6vw, 1.16rem);
  font-weight: 800;
  color: var(--text);
}

.drop-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.drop-hint .sep {
  margin-inline: 5px;
  opacity: 0.55;
}

.dropzone .btn {
  margin-block-start: 12px;
  min-height: 52px;
  padding-inline: 30px;
  font-size: 1rem;
  border-radius: 16px;
}

.drop-note {
  margin-block-start: 6px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}

.selection-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-block: 18px 4px;
}

.selection-count {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-soft);
}

.selection-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
}

.file-list {
  display: grid;
  gap: 10px;
  margin-block-start: 16px;
}

.file-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface-soft);
  animation: rise-in 0.25s ease both;
}

.file-item.is-done {
  background: linear-gradient(180deg, var(--primary-tint), var(--surface-soft));
  border-color: var(--border-strong);
}

.file-item.is-error {
  background: var(--danger-soft);
  border-color: var(--danger-border);
}

.file-type-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  flex: none;
}

.file-type-icon svg {
  width: 22px;
  height: 22px;
}

.file-type-icon.kind-image {
  color: #0e9f6e;
}
.file-type-icon.kind-doc {
  color: #2563eb;
}
.file-type-icon.kind-sheet {
  color: #0f766e;
}
.file-type-icon.kind-slides {
  color: #d97706;
}
.file-type-icon.kind-pdf {
  color: #dc2626;
}
.file-type-icon.kind-text {
  color: #64748b;
}

[data-theme="dark"] .file-type-icon.kind-doc {
  color: #60a5fa;
}
[data-theme="dark"] .file-type-icon.kind-slides {
  color: #fbbf24;
}
[data-theme="dark"] .file-type-icon.kind-pdf {
  color: #f87171;
}

.file-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.file-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.file-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 0.73rem;
  color: var(--muted);
  font-weight: 600;
}

.file-meta .dot {
  width: 3px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.6;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-block-start: 3px;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.18s ease;
}

.file-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

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

.file-status.is-error {
  color: var(--danger-strong);
}

.file-status svg {
  width: 14px;
  height: 14px;
}

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

.file-side .icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: none;
}

.file-side .icon-btn svg {
  width: 17px;
  height: 17px;
}

.file-side .btn {
  min-height: 36px;
  font-size: 0.76rem;
  padding-inline: 11px;
  border-radius: 10px;
}

.copy-btn.is-copied {
  color: var(--primary);
  border-color: var(--primary);
}

.expiry-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-soft);
}

.expiry-inline svg {
  width: 13px;
  height: 13px;
  opacity: 0.7;
}

.expiry-inline.is-soon {
  color: var(--warning);
}

.expiry-inline.is-urgent {
  color: var(--danger-strong);
}

.ttl-notice {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-block-start: 18px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--primary-tint);
  border: 1px solid var(--border);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 600;
}

.ttl-notice svg {
  width: 17px;
  height: 17px;
  color: var(--primary);
  flex: none;
}

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-align: center;
}

.secure-note svg {
  width: 15px;
  height: 15px;
  color: var(--primary);
  flex: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-block-start: 26px;
  animation: rise-in 0.65s 0.12s ease both;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  backdrop-filter: blur(8px);
}

.step-num {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.86rem;
}

.step-card h3 {
  font-size: 0.86rem;
  font-weight: 800;
  margin-block-end: 2px;
}

.step-card p {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.6;
}

.page-public .site-footer {
  margin-block-start: 60px;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 760px) {
  .steps {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .step-card {
    padding: 13px 14px;
    align-items: center;
  }
  .hero {
    padding-block-start: 18px;
  }
  .hero h1 {
    max-width: 22ch;
  }
  .trust-row {
    gap: 6px;
  }
  .trust-chip {
    padding: 7px 11px;
    font-size: 0.72rem;
  }
  .upload-card {
    border-radius: 26px;
  }
  .file-item {
    grid-template-columns: 40px minmax(0, 1fr);
    padding: 11px;
  }
  .file-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
  .file-side {
    grid-column: 1 / -1;
    justify-content: flex-end;
    flex-wrap: wrap;
    padding-block-start: 4px;
  }
  .file-side .icon-btn {
    width: 40px;
    height: 40px;
  }
  .file-side .btn {
    min-height: 40px;
  }
  .dropzone {
    border-width: 2px;
    padding-block: 30px;
  }
  .dropzone .btn {
    width: 100%;
    max-width: 320px;
    font-size: 1.02rem;
    min-height: 54px;
  }
  .upload-glyph {
    width: 64px;
    height: 64px;
    border-radius: 20px;
  }
  .upload-glyph svg {
    width: 30px;
    height: 30px;
  }
  .selection-bar {
    align-items: stretch;
  }
  .selection-actions {
    width: 100%;
  }
  .selection-actions .btn {
    flex: 1;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .hero h1 .grad {
    white-space: normal;
  }
  .header-actions {
    gap: 6px;
  }
  .lang-switch {
    padding: 3px;
  }
  .lang-switch button {
    padding: 6px 7px;
  }
}
