:root {
  color-scheme: light;
  --ink: #18202f;
  --muted: #687385;
  --line: #d9e1ea;
  --paper: #ffffff;
  --bg: #f5f7fb;
  --blue: #1d5fd1;
  --green: #167a4a;
  --yellow: #f4c542;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 28px 18px 48px;
}

.shell {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(20, 32, 50, 0.08);
  overflow: hidden;
}

.hero {
  padding: 28px;
  background: linear-gradient(135deg, #eaf2ff 0%, #ffffff 55%, #fff8df 100%);
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 9vw, 3.45rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.25rem;
}

p {
  margin: 0 0 14px;
  line-height: 1.55;
}

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

.content {
  padding: 24px 28px 30px;
}

.dropzone {
  display: grid;
  gap: 12px;
  place-items: center;
  min-height: 190px;
  padding: 24px;
  border: 2px dashed #9ab5dd;
  border-radius: 8px;
  background: #f8fbff;
  text-align: center;
}

input[type="file"] {
  width: 100%;
  max-width: 420px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: var(--blue);
  color: #fff;
  font-weight: 700;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}

.button.secondary {
  background: #edf2f8;
  color: var(--ink);
  border: 1px solid var(--line);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.notice {
  padding: 14px 16px;
  border-radius: 8px;
  background: #edf8f2;
  border: 1px solid #b8e1ca;
  color: #0f5f38;
}

.error {
  background: #fff2f2;
  border-color: #e7b6b6;
  color: #8d1f1f;
}

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

.photo {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.photo img,
.photo .file-icon {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #edf2f8;
}

.photo .file-icon {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 800;
}

.photo-meta {
  padding: 9px;
  font-size: 0.82rem;
  color: var(--muted);
  word-break: break-word;
}

.qr {
  display: grid;
  place-items: center;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.qr svg {
  width: min(72vw, 360px);
  height: auto;
}

@media (max-width: 520px) {
  .page {
    padding: 12px;
  }

  .hero,
  .content {
    padding: 22px 18px;
  }
}
