*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background: #e8e8e8;
  color: #222;
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
}

.page {
  width: 100%;
  max-width: 36rem;
}

.brand {
  margin-bottom: 1rem;
}

.brand-name {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  color: #555;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1.3;
  color: #111;
}

.lead {
  margin: 0 0 1.25rem;
  font-size: 1.02rem;
  color: #333;
}

.status {
  min-height: 1.25rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: #444;
}

.status[data-kind='error'] {
  color: #8a1f1f;
}

.step {
  margin-bottom: 1rem;
}

.step-label {
  margin: 0 0 0.75rem;
  font-weight: 600;
}

.session-line {
  margin: 0 0 1rem;
  font-size: 0.92rem;
}

.form label {
  display: block;
  margin: 0.75rem 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.form input,
.form select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  border: 1px solid #999;
  border-radius: 4px;
  font: inherit;
  background: #fff;
}

.form input:focus,
.form select:focus {
  outline: 2px solid #1a4a7a;
  outline-offset: 1px;
}

.hint,
.preview,
.name-status {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: #555;
}

.name-status[data-kind='ok'] {
  color: #1b5e20;
}

.name-status[data-kind='error'] {
  color: #8a1f1f;
}

.preview-card {
  margin: 1rem 0;
  padding: 0.85rem 1rem;
  border: 1px dashed #888;
  border-radius: 8px;
  background: #f7f7f7;
  text-align: center;
}

.preview-card code {
  font-size: 1rem;
  word-break: break-all;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.chip {
  padding: 0.25rem 0.65rem;
  border: 1px solid #888;
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}

.chip:hover,
.chip:focus-visible {
  background: #f0f0f0;
}

.avatar-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0;
}

.avatar-canvas {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 2px solid #666;
}

.avatar-meta {
  font-size: 0.88rem;
  color: #444;
}

.avatar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.upload-label {
  display: inline-block;
  padding: 0.45rem 0.85rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.upload-label input {
  display: none;
}

.pay-card {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #666;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.pay-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  object-fit: cover;
}

.pay-price {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  color: #444;
}

.actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.6rem 1.1rem;
  border: 1px solid #333;
  border-radius: 4px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: #111;
  color: #fff;
  border-color: #111;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn:hover:not(:disabled),
.btn:focus-visible:not(:disabled) {
  filter: brightness(0.95);
}

.link-btn {
  margin-left: 0.35rem;
  padding: 0;
  border: 0;
  background: none;
  color: #1a4a7a;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.done {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.site-footer {
  margin-top: auto;
  padding-top: 2rem;
  font-size: 0.8rem;
  color: #666;
}

.site-footer a {
  color: #1a4a7a;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #1a4a7a;
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
