:root {
  color: #1c2733;
  background: #f4f7fa;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  place-items: center;
}

.sentence-viewer {
  width: min(90vw, 42rem);
  padding: 2rem;
}

h1 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  text-align: center;
}

.sentence-card {
  min-height: 17rem;
  padding: 2rem;
  border: 1px solid #d8e0e8;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.5rem rgb(28 39 51 / 8%);
  text-align: center;
}

.sentence-position {
  margin: 0 0 2rem;
  color: #526372;
  font-weight: 700;
}

.english-sentence {
  margin: 0 0 1.5rem;
  font-size: clamp(1.35rem, 4vw, 1.8rem);
  line-height: 1.5;
}

.japanese-translation,
.error-message {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
}

.error-message {
  color: #a82020;
  font-weight: 700;
}

.sentence-navigation {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

button {
  min-width: 7rem;
  padding: 0.75rem 1.25rem;
  border: 0;
  border-radius: 0.6rem;
  background: #1769aa;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #10578f;
}

button:focus-visible {
  outline: 0.2rem solid #f2a900;
  outline-offset: 0.2rem;
}

button:disabled {
  background: #aab4bd;
  cursor: not-allowed;
}

@media (max-width: 32rem) {
  .sentence-viewer {
    padding: 1rem;
  }

  .sentence-card {
    min-height: 15rem;
    padding: 1.5rem 1rem;
  }
}
