:root {
  color-scheme: light;
  --sky: #43b5e5;
  --sky-dark: #178dbd;
  --sky-pale: #eaf8fe;
  --accent: #c22e55;
  --accent-dark: #9f1f43;
  --ink: #152631;
  --muted: #64737c;
  --line: #dce8ed;
  --paper: #ffffff;
  --surface: #f5f9fb;
  --success: #17845d;
  --error: #ad273e;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  background: #edf6fa;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(67, 181, 229, 0.2), transparent 30rem),
    radial-gradient(circle at 90% 25%, rgba(194, 46, 85, 0.1), transparent 24rem),
    linear-gradient(180deg, #f9fcfd 0%, #edf6fa 100%);
}

button,
input {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
label:focus-visible {
  outline: 3px solid rgba(67, 181, 229, 0.42);
  outline-offset: 3px;
}

.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;
}

.page-shell {
  width: min(100% - 32px, 820px);
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
}

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

.brand__logo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  box-shadow: 0 10px 28px rgba(24, 79, 112, 0.14);
}

.week-pill {
  padding: 8px 13px;
  border: 1px solid rgba(67, 181, 229, 0.36);
  border-radius: 999px;
  color: var(--sky-dark);
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

main {
  padding: 28px 0 56px;
}

.intro {
  max-width: 650px;
  margin-bottom: 30px;
}

.step-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.intro h1 {
  max-width: 600px;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.upload-card {
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(23, 69, 91, 0.12), 0 2px 8px rgba(23, 69, 91, 0.05);
  backdrop-filter: blur(14px);
}

.card-heading,
.selection__heading,
.progress-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.card-heading h2,
.progress-heading h3 {
  margin: 0;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  letter-spacing: -0.025em;
}

.drop-zone {
  display: grid;
  justify-items: center;
  margin-top: 26px;
  padding: 34px 20px 30px;
  border: 2px dashed #b9d9e6;
  border-radius: 20px;
  cursor: pointer;
  background: linear-gradient(145deg, #fbfeff, var(--sky-pale));
  text-align: center;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--sky);
  background: #e3f6fd;
  transform: translateY(-2px);
}

.drop-zone.is-disabled {
  opacity: 0.58;
  transform: none;
}

.drop-zone.is-disabled:not(.is-unavailable) {
  cursor: wait;
}

.drop-zone.is-unavailable {
  cursor: not-allowed;
}

.drop-zone__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 12px;
  border-radius: 18px;
  color: #fff;
  background: var(--sky);
  box-shadow: 0 10px 22px rgba(67, 181, 229, 0.3);
}

.drop-zone__icon svg {
  width: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.drop-zone strong {
  font-size: 1.05rem;
}

.drop-zone > span:not(.drop-zone__icon) {
  margin-top: 3px;
  color: var(--muted);
}

.drop-zone small {
  margin-top: 14px;
  color: #84939b;
  font-size: 0.72rem;
}

.availability-message,
.form-error,
.success-message {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.availability-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #cbdde5;
  color: #385565;
  background: #f1f8fb;
}

.availability-message[hidden] {
  display: none;
}

.availability-message.is-unavailable {
  border-color: #f1c4cc;
  color: var(--error);
  background: #fff2f4;
}

.availability-message__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: #7594a3;
  font-weight: 800;
}

.availability-message.is-unavailable .availability-message__icon {
  background: var(--error);
}

.availability-message p {
  margin: 3px 0 0;
}

.form-error {
  border: 1px solid #f1c4cc;
  color: var(--error);
  background: #fff2f4;
}

.selection {
  margin-top: 28px;
}

.selection__heading {
  align-items: center;
  margin-bottom: 12px;
}

.selection h3,
.upload-progress h3 {
  margin: 0;
  font-size: 1rem;
}

.text-button,
.remove-button {
  border: 0;
  cursor: pointer;
  color: var(--muted);
  background: transparent;
}

.text-button {
  padding: 4px;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.file-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.file-item__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--sky-dark);
  background: #dcf3fc;
  font-size: 0.76rem;
  font-weight: 800;
}

.file-item.is-done .file-item__icon {
  color: var(--success);
  background: #def5ec;
}

.file-item.is-failed .file-item__icon,
.file-item.is-invalid .file-item__icon {
  color: var(--error);
  background: #fde8ec;
}

.file-item.is-invalid .file-item__body span {
  color: var(--error);
}

.file-item__body {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.file-item__body strong {
  overflow: hidden;
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item__body span {
  color: var(--muted);
  font-size: 0.72rem;
}

.file-item progress {
  height: 5px;
  margin-top: 5px;
}

.remove-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.35rem;
}

.remove-button:hover {
  color: var(--error);
  background: #fdecef;
}

.category-fieldset {
  padding: 0;
  margin: 24px 0 0;
  border: 0;
}

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  cursor: pointer;
  background: var(--surface);
}

.switch-row strong {
  font-size: 0.94rem;
}

.switch {
  position: relative;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch__track {
  display: block;
  width: 50px;
  height: 29px;
  padding: 3px;
  border-radius: 999px;
  background: #b9c5ca;
  transition: background 160ms ease;
}

.switch__thumb {
  display: block;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(21, 38, 49, 0.22);
  transition: transform 160ms ease;
}

.switch input:checked + .switch__track {
  background: var(--accent);
}

.switch input:checked + .switch__track .switch__thumb {
  transform: translateX(21px);
}

.switch input:focus-visible + .switch__track {
  outline: 3px solid rgba(67, 181, 229, 0.42);
  outline-offset: 3px;
}

.upload-progress {
  margin-top: 26px;
  padding: 20px;
  border-radius: 16px;
  background: #eef8fc;
}

.progress-heading strong {
  color: var(--sky-dark);
  font-size: 1.25rem;
}

progress {
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  accent-color: var(--sky);
  background: #d6e9f0;
}

.upload-progress > progress {
  height: 10px;
  margin-top: 16px;
}

progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #d6e9f0;
}

progress::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), var(--sky-dark));
}

progress::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sky), var(--sky-dark));
}

#progress-detail {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.success-message {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #bce5d6;
  color: #126044;
  background: #eaf8f2;
}

.success-message[hidden] {
  display: none;
}

.success-message > span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  background: var(--success);
  font-weight: 800;
}

.success-message p {
  margin: 3px 0 0;
}

.submit-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 56px;
  margin-top: 28px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 12px 24px rgba(194, 46, 85, 0.22);
  font-weight: 800;
  transition: background 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.submit-button:hover:not(:disabled) {
  background: var(--accent-dark);
  box-shadow: 0 15px 28px rgba(194, 46, 85, 0.3);
  transform: translateY(-1px);
}

.submit-button:disabled {
  cursor: not-allowed;
  color: #8c999f;
  background: #dce4e7;
  box-shadow: none;
}

.submit-button svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 0 0 38px;
  color: var(--muted);
  font-size: 0.72rem;
}

footer span:first-child {
  color: var(--ink);
  font-weight: 750;
}

@media (max-width: 600px) {
  .page-shell {
    width: min(100% - 22px, 820px);
  }

  .site-header {
    min-height: 92px;
  }

  .brand__logo {
    width: 60px;
    height: 60px;
  }

  .week-pill {
    padding: 7px 10px;
    font-size: 0.66rem;
  }

  main {
    padding-top: 22px;
  }

  .intro {
    margin-bottom: 28px;
  }

  .upload-card {
    border-radius: 22px;
  }

  .drop-zone {
    padding-block: 28px 25px;
  }

  footer {
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
