.word-table-label {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr) 52px;
  gap: 6px;
}

.page-heading {
  align-items: center;
}

.page-heading > div {
  min-width: 0;
}

.heading-logo {
  display: block;
  flex: 0 0 auto;
  width: clamp(116px, 30vw, 150px);
}

.heading-logo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.shop-balance {
  display: flex;
  align-items: center;
  gap: 9px;
  width: max-content;
  margin: -6px 0 17px auto;
  padding: 8px 13px;
  border: 1px solid #eee3c4;
  border-radius: 13px;
  color: #9a8955;
  background: #fbf7e9;
}

.shop-balance > .coin {
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.shop-balance > span:last-child {
  display: grid;
  gap: 1px;
}

.shop-balance small {
  color: #aaa080;
  font-size: 9px;
}

.shop-balance strong {
  color: #85703b;
  font-size: 13px;
  font-weight: 700;
}

.vocabulary-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid #e8e6d9;
  border-radius: 13px;
  color: #6c715d;
  background: #fffefa;
}

.vocabulary-summary > span {
  display: grid;
  gap: 4px;
}

.vocabulary-summary strong {
  font-size: 13px;
}

.vocabulary-summary small {
  color: #999688;
  font-size: 10px;
}

.vocabulary-summary > .icon {
  width: 16px;
  height: 16px;
  flex: none;
}

.vocabulary-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.vocabulary-tools .search-field {
  grid-column: 1 / -1;
  width: 100%;
}

.vocabulary-tools select {
  min-width: 0;
  width: 100%;
  height: 40px;
  padding: 0 6px;
  border: 1px solid #e2e0d4;
  border-radius: 9px;
  color: #777968;
  background: #fffefa;
  font-size: 10px;
}

.word-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 16px 0 4px;
}

.word-pagination:empty {
  display: none;
}

.word-pagination button {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 30px;
  flex: 0 1 29px;
  padding: 0 2px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #898977;
  background: transparent;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.word-pagination .page-arrow {
  flex: 0 0 30px;
  border-color: #e5e3d8;
  background: #fffefa;
  font-size: 18px;
  line-height: 1;
}

.word-pagination button:hover:not(:disabled) {
  color: #596d49;
  background: #f1f3e9;
}

.word-pagination .page-number.is-current {
  border-color: #d9e2cc;
  color: #596d49;
  background: #eaf0e0;
  font-weight: 700;
}

.word-pagination button:disabled {
  opacity: .35;
  cursor: default;
}

.word-table-label span:last-child {
  grid-column: 3;
}

.word-entry {
  border-bottom: 1px solid #f0ede3;
}

.word-entry:last-child {
  border-bottom: 0;
}

.word-row,
.vocabulary-panel .word-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 25px 25px;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-height: 47px;
  padding: 4px 2px;
  border: 0;
}

.word-main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
  padding: 0;
  text-align: left;
}

.word-main:hover .word-term strong,
.word-main:hover .word-meaning {
  color: #596d49;
}

.word-term {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.word-term strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.4;
}

.word-term small {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  font-size: 9px;
}

.word-meaning {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  line-height: 1.4;
}

.word-quick-button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #e5e3d8;
  border-radius: 8px;
  color: #9c9a88;
  background: #fffefa;
}

.word-quick-button:hover:not(:disabled) {
  border-color: #b8c2a4;
  color: #71835b;
  background: #f6f7ef;
}

.word-quick-button:disabled {
  opacity: .38;
  cursor: default;
}

.word-quick-button > .icon {
  width: 12px;
  height: 12px;
}

.word-progress-toggle {
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.word-example-toggle[aria-expanded="true"] > .icon {
  transform: rotate(90deg);
}

.word-master-toggle.is-mastered {
  border-color: #d9e2cc;
  color: #71835b;
  background: #eaf0e0;
}

.word-examples {
  display: grid;
  gap: 5px;
  padding: 2px 0 9px 4px;
}

.word-examples[hidden] {
  display: none;
}

.word-example-item {
  min-width: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f6ef;
  overflow-wrap: anywhere;
}

.word-example-primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  width: 100%;
}

.word-expanded-actions {
  display: flex;
  gap: 5px;
}

.word-expanded-actions .word-quick-button {
  width: 25px;
  height: 25px;
}

.word-expanded-actions .icon {
  width: 13px;
  height: 13px;
}

.word-expanded-actions .word-delete-button:hover {
  border-color: #e4c5bb;
  color: #a85d4b;
  background: #fff6f2;
}

.word-note {
  padding: 8px 10px;
  border-left: 2px solid #c8cfb3;
  border-radius: 0 8px 8px 0;
  color: #777866;
  background: #fbfaf5;
  overflow-wrap: anywhere;
}

.word-note strong {
  display: block;
  margin-bottom: 3px;
  color: #848773;
  font-size: 9px;
}

.word-note p {
  margin: 0;
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.word-example-item p {
  margin: 0;
  color: #5c624e;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 11px;
  line-height: 1.6;
}

.word-example-item small {
  display: block;
  margin-top: 3px;
  color: #999381;
  font-size: 9px;
  line-height: 1.5;
}

.word-example-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 27px;
  align-items: start;
  gap: 8px;
}

.word-example-speak {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  padding: 0;
  border: 1px solid #e5e3d8;
  border-radius: 50%;
  color: #8d9675;
  background: #fffefa;
}

.word-example-speak:hover:not(:disabled) {
  border-color: #b8c2a4;
  color: #596d49;
  background: #f1f3e9;
}

.word-example-speak:disabled {
  opacity: .55;
  cursor: wait;
}

.word-example-speak > .icon {
  width: 14px;
  height: 14px;
}

.tts-disclosure {
  margin: -10px 0 12px;
  color: #aaa28e;
  font-size: 9px;
}

.word-detail-meta {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 18px;
}

.word-detail-meta span {
  padding: 5px 8px;
  border-radius: 6px;
  color: #7c8568;
  background: #edf0e5;
  font-size: 9px;
}

.word-detail-examples {
  display: grid;
  gap: 7px;
  margin: 20px 0;
  text-align: left;
}

@media (max-width: 365px) {
  .word-pagination {
    gap: 1px;
  }

  .word-pagination button {
    height: 28px;
    flex-basis: 20px;
    font-size: 9px;
  }

  .word-pagination .page-arrow {
    flex-basis: 22px;
  }

  .word-row,
  .vocabulary-panel .word-row {
    grid-template-columns: minmax(0, 1fr) 23px 23px;
    gap: 4px;
  }

  .word-main {
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    gap: 5px;
  }

  .word-term strong {
    font-size: 11px;
  }

  .word-term small,
  .word-meaning {
    font-size: 8px;
  }

  .word-quick-button {
    width: 22px;
    height: 22px;
  }
}
