:root {
  --sc-lime: #98C001;
  --sc-blue: #004E68;
  --sc-blue-soft: #0b6b8d;
  --sc-ink: #18313a;
  --sc-bg: #f4f8f2;
  --sc-card: #ffffff;
  --sc-muted: #67818a;
  --sc-border: rgba(0, 78, 104, 0.12);
  --sc-shadow: 0 18px 45px rgba(0, 78, 104, 0.12);
}

.sc-front-wrap,
.sc-front-wrap * {
  box-sizing: border-box;
}

.sc-front-wrap {
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  color: var(--sc-ink);
  display: grid;
  gap: 20px;
  overflow-x: clip;
}

.sc-card {
  width: 100%;
  min-width: 0;
  background: var(--sc-card);
  border: 1px solid var(--sc-border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--sc-shadow);
}

.sc-hero {
  display: grid;
  gap: 18px;
  align-items: center;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  background: linear-gradient(135deg, rgba(152, 192, 1, 0.14), rgba(0, 78, 104, 0.08));
}

.sc-hero h2,
.sc-card h3 {
  margin: 8px 0 10px;
  color: var(--sc-blue);
  overflow-wrap: anywhere;
}

.sc-badge,
.sc-mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(152, 192, 1, 0.14);
  color: var(--sc-blue);
  font-weight: 700;
  font-size: 13px;
}

.sc-progress-shell {
  min-width: 0;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(0, 78, 104, 0.1);
  border-radius: 24px;
  padding: 20px;
}

.sc-progress-label,
.sc-muted,
.sc-progress-shell small,
.sc-card p,
.sc-inline-note span {
  color: var(--sc-muted);
}

.sc-progress-shell strong {
  display: block;
  font-size: clamp(24px, 4vw, 30px);
  line-height: 1.1;
  color: var(--sc-blue);
  margin: 8px 0 12px;
}

.sc-progress-bar {
  height: 14px;
  border-radius: 999px;
  background: rgba(0, 78, 104, 0.12);
  overflow: hidden;
}

.sc-progress-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--sc-lime), var(--sc-blue-soft));
  transition: width 0.25s ease;
}

.sc-form {
  display: grid;
  gap: 16px;
  width: 100%;
}

.sc-grid.two {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.sc-form label span,
.sc-start-url span {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--sc-blue);
}

.sc-form input[type="text"],
.sc-form input[type="email"] {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(0, 78, 104, 0.15);
  background: #fff;
  font-size: 16px;
}

.sc-checkbox {
  display: grid;
  gap: 12px;
  grid-template-columns: 20px 1fr;
  align-items: start;
}

.sc-checkbox input {
  margin-top: 2px;
}

.sc-button {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sc-blue), var(--sc-blue-soft));
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  min-height: 52px;
  padding: 10px 20px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  box-shadow: 0 12px 28px rgba(0, 78, 104, 0.2);
}

.sc-button:hover {
  transform: translateY(-1px);
}

.sc-button:disabled,
.sc-stamp-inner:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sc-form-message {
  min-height: 24px;
  font-size: 14px;
  font-weight: 600;
}

.sc-form-message.is-success {
  color: #2f7f08;
}

.sc-form-message.is-error {
  color: #b42318;
}

.sc-user-card {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
}

.sc-inline-note {
  background: rgba(152, 192, 1, 0.08);
  border-radius: 20px;
  padding: 16px;
}

.sc-card-header {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.sc-card-header > div:first-child,
.sc-help-card,
.sc-hero-copy {
  min-width: 0;
}

.sc-stamp-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  width: 100%;
}

.sc-stamp {
  min-width: 0;
}

.sc-stamp-inner {
  width: 100%;
  min-height: 176px;
  border-radius: 26px;
  border: 1px dashed rgba(0, 78, 104, 0.18);
  background: linear-gradient(180deg, #fff, #f7fbfc);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.sc-stamp-number {
  font-weight: 800;
  color: var(--sc-blue);
  font-size: 14px;
}

.sc-stamp-title {
  color: var(--sc-ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.sc-stamp-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  min-width: 72px;
  max-width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: 3px solid rgba(0, 78, 104, 0.2);
  color: rgba(0, 78, 104, 0.6);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.08em;
  align-self: end;
  transform: rotate(-14deg);
}

.sc-stamp.is-done .sc-stamp-inner {
  background: linear-gradient(180deg, rgba(152, 192, 1, 0.12), #fff);
  border-style: solid;
  border-color: rgba(152, 192, 1, 0.35);
}

.sc-stamp.is-done .sc-stamp-seal {
  border-color: var(--sc-lime);
  color: var(--sc-lime);
  box-shadow: inset 0 0 0 6px rgba(152, 192, 1, 0.12);
}

.sc-finish-card {
  display: none;
  background: linear-gradient(135deg, rgba(152, 192, 1, 0.18), rgba(255,255,255,0.9));
}

.sc-finish-card.is-visible {
  display: block;
}

.sc-start-url {
  margin-top: 16px;
  min-width: 0;
}

.sc-start-url code {
  display: block;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  padding: 12px 14px;
  border-radius: 16px;
  background: #f5f8fa;
  border: 1px solid rgba(0, 78, 104, 0.1);
}

.sc-empty-state {
  padding: 18px;
  border-radius: 18px;
  background: #f8fafb;
  border: 1px dashed rgba(0, 78, 104, 0.15);
}

.sc-modal[hidden] {
  display: none;
}

.sc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.sc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 35, 48, 0.65);
}

.sc-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 480px);
  margin: 10vh auto 0;
  background: #fff;
  border-radius: 28px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

.sc-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 0;
  background: rgba(0, 78, 104, 0.08);
  color: var(--sc-blue);
  font-size: 24px;
  cursor: pointer;
}

.sc-event-chooser {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
}

.sc-event-choice {
  display: grid;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--sc-border);
  background: linear-gradient(180deg, #fff, #f8fbfc);
}

.sc-event-choice strong,
.sc-event-choice small {
  overflow-wrap: anywhere;
}

@media (max-width: 768px) {
  .sc-hero,
  .sc-user-card,
  .sc-grid.two {
    grid-template-columns: 1fr;
  }

  .sc-card {
    padding: 18px;
    border-radius: 22px;
  }

  .sc-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sc-stamp-inner {
    min-height: 160px;
  }

  .sc-stamp-seal {
    transform: rotate(-10deg);
  }
}
