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

:root {
  --main-color: #224b8f;
  --secondary-color: #d45750;
  --accent-color: #745399;
}

html {
  box-sizing: border-box;
  font-size: 62.5%;
  height: 100%;
}

body {
  text-align: center;
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
    "Hiragino Sans", Meiryo, sans-serif;
  font-size: 1.6rem;
  margin: 0;
  padding: 0;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.select2-container {
  width: 300px !important;
}

select {
  font-size: 1.2em;
  margin: 0.5em;
  padding: 1em;
}

#result,
.yomi {
  margin-top: 1em;
  font-weight: bold;
  font-size: 1.2em;
}

table {
  border-collapse: collapse;
  width: 100%;
  max-width: 800px;
  margin: 1em auto;
}

table thead tr {
  background-color: var(--main-color);
  color: #fff;
}

table tbody tr {
  background-color: #e6e6e6;
}

table tbody tr:nth-child(odd) {
  background-color: #fff;
}

table th,
table td {
  padding: 1em;
  text-align: center;
}

table th {
  font-weight: bold;
  width: 20%;
  min-width: 4em;
}

td[role="button"] {
  cursor: pointer;
}

tr.expand td {
  background: #fafafa;
}

.buttons {
  display: flex;
  justify-content: center;
  gap: 1em;
  margin: 2rem 0;
}

button {
  font-size: 1.6rem;
  line-height: 1.5;
  position: relative;
  display: inline-block;
  padding: 1rem 4rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s;
  text-align: center;
  vertical-align: middle;
  text-decoration: none;
  letter-spacing: 0.1em;
  border-radius: 0.5rem;
  overflow: hidden;
  color: #fff;
  background: var(--accent-color);
  border: none;
}

.select2-search--dropdown .select2-search__field {
  padding: 8px;
}

.era1 {
  color: var(--main-color);
}

.era2 {
  color: var(--secondary-color);
}

ul.eto-list {
  padding-left: 1.25rem;
  list-style: none;
  display: inline-block;
  text-align: left;
}

.content {
  flex: 1;
}

footer {
  width: 100%;
  margin: 2em 0 1em;
}

/* スマホ用スタイル */
@media screen and (max-width: 768px) {
  body {
    font-family: sans-serif;
    text-align: center;
    padding: 2em;
    max-width: 600px;
    margin: auto;
  }

  select,
  .select2-container {
    width: 100% !important;
    max-width: 400px;
    box-sizing: border-box;
  }

  button {
    font-size: 1.2em;
    margin: 0.5em;
    padding: 0.6em 1.2em;
  }

  label,
  .yomi,
  #result {
    display: block;
    margin: 0.5em 0;
  }

  .select2-container .select2-selection--single {
    height: 48px;
    padding: 10px;
    font-size: 18px;
    line-height: 28px;
    border-radius: 8px;
  }

  .select2-container {
    width: 100% !important;
    max-width: 500px;
  }

  .buttons {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .eto-list ul {
    padding-left: 0;
  }
}
