:root {
  color: #172033;
  background: #f7f9fc;
  font-family:
    "Segoe UI",
    "Hiragino Sans",
    "Yu Gothic",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(56, 112, 255, 0.14), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #edf3ff 100%);
}

body.center-page {
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(440px, 100%);
  padding: 36px;
  border: 1px solid #dfe7f5;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 64px rgba(40, 57, 92, 0.14);
}

.wide-panel {
  width: min(720px, 100%);
}

.label {
  margin: 0 0 14px;
  color: #3564d4;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  color: #172033;
  font-size: 32px;
  line-height: 1.22;
}

.description {
  margin: 16px 0 0;
  color: #526070;
  font-size: 15px;
  line-height: 1.8;
}

.form {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 8px;
}

label {
  color: #263449;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #cdd8ea;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  font: inherit;
  outline: none;
}

input:focus {
  border-color: #3564d4;
  box-shadow: 0 0 0 4px rgba(53, 100, 212, 0.14);
}

.button-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  background: #2458db;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  border: 1px solid #cdd8ea;
  background: #ffffff;
  color: #263449;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.message {
  min-height: 22px;
  margin: 16px 0 0;
  color: #c0362c;
  font-size: 14px;
  line-height: 1.6;
}

.message.success {
  color: #20784e;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  width: min(960px, calc(100% - 40px));
  margin: 24px auto 0;
}

.brand {
  color: #172033;
  font-size: 18px;
  font-weight: 800;
}

.hero {
  width: min(960px, calc(100% - 40px));
  margin: 80px auto 0;
}

.welcome {
  font-size: clamp(32px, 7vw, 64px);
}

.loading {
  color: #526070;
  font-weight: 700;
}

.omikuji-area {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.omikuji-result {
  padding: 18px;
  border: 1px solid #d7e2f5;
  border-radius: 8px;
  background: #f8fbff;
  color: #233044;
  font-size: 16px;
  line-height: 1.8;
  white-space: pre-wrap;
}

@media (max-width: 560px) {
  .panel {
    padding: 28px 22px;
  }

  .button-row,
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  button {
    width: 100%;
  }

  .hero {
    margin-top: 48px;
  }
}
