* { box-sizing: border-box; }

body {
  margin: 0 auto;
  padding: 20px 16px 60px;
  max-width: 640px;
  background: #fff;
  color: #111;
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

h1 {
  font-size: clamp(28px, 8vw, 46px);
  font-weight: 800;
  text-align: center;
  margin: 10px 0 12px;
}

.sub {
  margin: 0 auto 24px;
  max-width: 480px;
  text-align: center;
  font-size: 16px;
  color: #555;
}

.go {
  display: block;
  width: 100%;
  padding: 40px 12px;
  border: 0;
  border-radius: 12px;
  background: #ffd400;
  color: #111;
  font: inherit;
  font-size: clamp(26px, 7vw, 44px);
  font-weight: 800;
  cursor: pointer;
}
.go:active { background: #f0c600; }
.go[disabled] { opacity: .5; cursor: progress; }

.label {
  margin: 24px 0 6px;
  font-size: 14px;
  color: #777;
}

.reel {
  border: 2px solid #111;
  border-radius: 10px;
  padding: 20px;
  min-height: 130px;
  display: flex;
  align-items: center;
  font-size: clamp(18px, 4.5vw, 22px);
  font-weight: 600;
}
.spinning { opacity: .5; }

.bar { height: 6px; background: #eee; margin-top: 10px; border-radius: 3px; }
.bar > i { display: block; height: 100%; width: 0; background: #ffd400; border-radius: 3px; transition: width .3s linear; }

pre {
  margin: 24px 0 0;
  font: inherit;
  white-space: pre-wrap;
}
#draft { color: #777; }
#post pre { padding: 20px; border: 2px solid #111; border-radius: 10px; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn {
  flex: 1 1 160px;
  padding: 16px 10px;
  border: 2px solid #111;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.btn:active { background: #f2f2f2; }

.hint { font-size: 15px; color: #555; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  background: #111;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 15px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; }

@media (max-width: 520px) {
  .btn { flex: 1 1 100%; }
}
