:root {
  --vulcan-orange: #f04b23;
  --text: #111827;
  --muted: #6b7280;
  --line: #d1d5db;
  --background: #f9fafb;
  --card: #ffffff;
  --success-bg: #dcfce7;
  --success-text: #166534;
  --error-bg: #fee2e2;
  --error-text: #991b1b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--background);
  color: var(--text);
}

.app {
  width: min(1100px, calc(100% - 32px));
  margin: 32px auto;
  background: var(--card);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
}

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--vulcan-orange);
  color: white;
  display: grid;
  place-items: center;
  font-size: 28px;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 4px;
  font-size: 32px;
}

.site-header p,
.hint {
  color: var(--muted);
}

.progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}

.step {
  padding: 10px 12px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  font-weight: 700;
}

.step.active {
  background: var(--vulcan-orange);
  color: white;
}

.form-step {
  display: none;
}

.form-step.active {
  display: block;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

label {
  display: block;
  font-weight: 700;
  margin-bottom: 16px;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
}

textarea {
  resize: vertical;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.option-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  cursor: pointer;
}

.option-card input {
  width: auto;
  margin-right: 8px;
}

.repeat-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.repeat-card {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  background: #f3f4f6;
}

td input {
  margin-top: 0;
}

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

button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.primary-button {
  background: var(--vulcan-orange);
  color: white;
}

.secondary-button {
  background: #f3f4f6;
  color: var(--text);
}

.danger-button {
  background: var(--error-bg);
  color: var(--error-text);
}

.hidden {
  display: none;
}

.order-summary {
  display: grid;
  gap: 14px;
}

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

.summary-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: #f9fafb;
  border-bottom: 1px solid var(--line);
}

.summary-card-header h3 {
  margin: 0;
  font-size: 18px;
}

.summary-edit-button {
  padding: 8px 14px;
}

.summary-list {
  display: grid;
  grid-template-columns: minmax(160px, 0.35fr) 1fr;
  gap: 0;
  margin: 0;
}

.summary-list dt,
.summary-list dd {
  padding: 11px 16px;
  border-bottom: 1px solid #edf0f3;
}

.summary-list dt {
  color: var(--muted);
  font-weight: 700;
}

.summary-list dd {
  margin: 0;
}

.summary-list dt:nth-last-child(2),
.summary-list dd:last-child {
  border-bottom: 0;
}

.submit-status {
  display: none;
  margin-top: 14px;
  margin-bottom: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.submit-status.success,
.submit-status.error {
  display: block;
}

.submit-status.success {
  background: var(--success-bg);
  color: var(--success-text);
}

.submit-status.error {
  background: var(--error-bg);
  color: var(--error-text);
}

@media (max-width: 800px) {
  .app {
    width: min(100% - 20px, 1100px);
    padding: 18px;
  }

  .grid,
  .option-grid,
  .progress {
    grid-template-columns: 1fr;
  }

  .repeat-card {
    grid-template-columns: 1fr;
  }

  .summary-card-header {
    align-items: flex-start;
  }

  .summary-list {
    grid-template-columns: 1fr;
  }

  .summary-list dt {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  .summary-list dd {
    padding-top: 2px;
  }

  h1 {
    font-size: 24px;
  }
}
