:root {
  color-scheme: dark;
  --bg: #060b10;
  --surface: #0c141c;
  --surface-soft: rgba(255, 255, 255, 0.035);
  --text: #f0f4f5;
  --soft: rgba(240, 244, 245, 0.74);
  --muted: rgba(240, 244, 245, 0.52);
  --line: rgba(240, 244, 245, 0.12);
  --line-strong: rgba(240, 244, 245, 0.22);
  --blue: #79b7ff;
  --blue-soft: rgba(121, 183, 255, 0.14);
  --amber: #d8bd7c;
  --danger: #e29898;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Noto Sans JP", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(76, 143, 207, 0.2), transparent 25rem),
    linear-gradient(180deg, #081019, var(--bg) 42rem);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(180deg, black, transparent 70%);
}

button,
input,
textarea {
  font: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.workshop-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 11, 16, 0.84);
  backdrop-filter: blur(20px);
}

.workshop-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.workshop-brand img {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-strong);
  object-fit: cover;
}

.save-state {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.experience-shell {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.28fr);
  min-height: calc(100svh - 60px);
}

.experience-rail {
  position: sticky;
  top: 60px;
  align-self: start;
  display: grid;
  align-content: space-between;
  min-height: calc(100svh - 60px);
  padding: clamp(36px, 6vw, 76px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(18, 37, 54, 0.55), rgba(6, 11, 16, 0.8)),
    url("assets/els30-logo.jpeg") center 86% / min(68%, 360px) auto no-repeat;
}

.experience-rail::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, transparent 52%, rgba(6, 11, 16, 0.88));
}

.experience-rail > * {
  position: relative;
  z-index: 1;
}

.rail-label {
  margin: 0 0 16px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 750;
}

.experience-rail h1 {
  margin: 0 0 20px;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  font-weight: 650;
  line-height: 1.04;
}

.experience-rail > div > p:last-child {
  max-width: 32ch;
  margin: 0;
  color: var(--soft);
}

.step-list {
  display: grid;
  gap: 4px;
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  min-height: 34px;
  color: var(--muted);
  font-size: 0.82rem;
  transition: color 160ms ease;
}

.step-list li span {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.step-list li.is-current {
  color: var(--text);
  font-weight: 700;
}

.step-list li.is-current span {
  color: var(--blue);
}

.step-list li.is-complete {
  color: var(--soft);
}

.workshop-main {
  width: min(100% - 40px, 780px);
  margin: 0 auto;
  padding: clamp(32px, 6vw, 76px) 0 48px;
}

.progress-bar {
  display: grid;
  gap: 8px;
  margin-bottom: 54px;
}

.progress-bar > div {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

progress {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border: 0;
  background: var(--line);
  color: var(--blue);
}

progress::-webkit-progress-bar {
  background: var(--line);
}

progress::-webkit-progress-value {
  background: var(--blue);
}

progress::-moz-progress-bar {
  background: var(--blue);
}

.announcement {
  min-height: 1px;
  color: var(--danger);
  font-size: 0.86rem;
}

.step-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 34px;
}

.step-heading > p:first-child {
  margin: 0;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 750;
}

.step-heading h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4.8vw, 3rem);
  font-weight: 680;
  line-height: 1.16;
}

.step-heading > p:last-child:not(:first-child) {
  max-width: 58ch;
  margin: 4px 0 0;
  color: var(--soft);
}

.opening-copy {
  max-width: 58ch;
  color: var(--soft);
}

.opening-copy .lead {
  color: var(--text);
  font-size: 1.22rem;
  font-weight: 700;
}

.privacy-note {
  margin-top: 36px;
  padding: 18px 20px;
  border-left: 3px solid var(--blue);
  background: var(--blue-soft);
}

.privacy-note strong {
  font-size: 0.88rem;
}

.privacy-note p {
  margin: 6px 0 0;
  color: var(--soft);
  font-size: 0.88rem;
}

.field,
.choice-field {
  min-width: 0;
  margin: 0 0 26px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field label,
.choice-field legend {
  display: block;
  margin-bottom: 9px;
  color: var(--text);
  font-weight: 680;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  transition: border-color 140ms ease, background 140ms ease;
}

.field input {
  min-height: 48px;
  padding: 11px 13px;
}

.field select {
  min-height: 48px;
  padding: 11px 38px 11px 13px;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 20px,
    calc(100% - 12px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field textarea {
  min-height: 112px;
  padding: 12px 13px;
  line-height: 1.65;
  resize: vertical;
}

.field input:hover,
.field textarea:hover {
  border-color: rgba(240, 244, 245, 0.34);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--blue);
  background: rgba(121, 183, 255, 0.06);
  outline: 0;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.field--primary {
  padding: 20px;
  border: 1px solid rgba(121, 183, 255, 0.28);
  background: var(--blue-soft);
}

.field-hint,
.field-error {
  margin: 7px 0 0;
  font-size: 0.8rem;
}

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

.field-error {
  min-height: 1px;
  color: var(--danger);
}

.choice-field {
  padding: 0;
  border: 0;
}

.choice-field > p {
  margin: -2px 0 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.choice-grid label {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  cursor: pointer;
}

.choice-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-grid span {
  color: var(--soft);
  font-size: 0.9rem;
}

.choice-grid label:has(input:checked) {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.choice-grid label:has(input:checked) span {
  color: var(--text);
  font-weight: 680;
}

.choice-grid label:focus-within,
.witness-check:focus-within,
.share-consent:focus-within {
  outline: 3px solid rgba(121, 183, 255, 0.5);
  outline-offset: 2px;
}

.commitment {
  display: grid;
  border-top: 1px solid var(--line);
}

.commitment > div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.commitment span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.commitment strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.witness-check {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  cursor: pointer;
}

.witness-check input {
  width: 21px;
  height: 21px;
  margin: 3px 0 0;
  accent-color: var(--blue);
}

.witness-check span {
  display: grid;
  gap: 3px;
}

.witness-check small {
  color: var(--muted);
}

.final-line {
  margin-top: 46px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

.final-line p {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 650;
}

.summary {
  display: grid;
  border-top: 1px solid var(--line);
}

.summary-section {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.summary-section span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.summary-section p {
  margin: 0;
  color: var(--soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.cloud-share {
  margin-top: 42px;
  padding: 22px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.cloud-share__heading {
  margin-bottom: 24px;
}

.cloud-share__heading > p:first-child {
  margin: 0 0 6px;
  color: var(--amber);
  font-size: 0.74rem;
  font-weight: 750;
}

.cloud-share__heading h3 {
  margin: 0 0 8px;
  font-size: 1.28rem;
}

.cloud-share__heading > p:last-child {
  margin: 0;
  color: var(--soft);
  font-size: 0.88rem;
}

.share-consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--soft);
  font-size: 0.88rem;
  cursor: pointer;
}

.share-consent input {
  width: 19px;
  height: 19px;
  margin: 2px 0 0;
  accent-color: var(--blue);
}

.cloud-share__actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.cloud-share__actions .button {
  justify-self: start;
}

.cloud-share__actions p {
  min-height: 1.4em;
  margin: 0;
  color: var(--soft);
  font-size: 0.86rem;
}

.cloud-share__actions p.is-error {
  color: var(--danger);
}

.cloud-share__actions p.is-success {
  color: #9ddbb8;
}

.form-actions,
.completion-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 42px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.completion-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  padding: 10px 17px;
  border-radius: 4px;
  font-weight: 700;
  cursor: pointer;
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(121, 183, 255, 0.62);
  outline-offset: 3px;
}

.button--primary {
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #06101a;
}

.button--primary:hover {
  background: #9acbff;
}

.button--secondary {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
}

.button--quiet {
  margin-right: auto;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
}

.button--quiet:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.button--danger {
  border: 1px solid rgba(226, 152, 152, 0.42);
  background: transparent;
  color: var(--danger);
}

@media (max-width: 840px) {
  .experience-shell {
    display: block;
  }

  .experience-rail {
    position: relative;
    top: auto;
    min-height: auto;
    padding: 32px 20px 26px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background:
      linear-gradient(90deg, rgba(18, 37, 54, 0.8), rgba(6, 11, 16, 0.88)),
      url("assets/els30-logo.jpeg") 92% 42% / 190px auto no-repeat;
  }

  .experience-rail h1 {
    font-size: 2.3rem;
  }

  .experience-rail > div > p:last-child {
    max-width: 28ch;
  }

  .step-list {
    display: none;
  }

  .workshop-main {
    width: min(100% - 32px, 780px);
    padding-top: 28px;
  }

  .progress-bar {
    margin-bottom: 38px;
  }
}

@media (max-width: 600px) {
  .save-state {
    max-width: 110px;
    text-align: right;
  }

  .field-grid,
  .choice-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .field-grid {
    gap: 0;
  }

  .field--primary {
    padding: 16px;
  }

  .cloud-share {
    padding: 16px;
  }

  .cloud-share__actions .button {
    width: 100%;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .button {
    flex: 1;
  }

  .form-actions .button--quiet {
    flex: 0 0 100%;
    order: -1;
  }
}

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