:root {
  font-size: 2.5vw;
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  color: var(--color-text);
  --button-width: 24rem;
  --header-height: 6rem;
  --color-text: rgb(40, 80, 152);
  --color-text-white: rgb(255, 255, 255);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html.lang-ja {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-en {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-fr {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-it {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-de {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-es {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-es-la {
  font-family: 'Lucida Grande', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

html.lang-sc {
  font-family: 'PingFang SC', ' Lucida Grande', 'Hiragino Kaku Gothic ProN', 'SimSun', Meiryo, sans-serif;
}

html.lang-tc {
  font-family: 'PingFang TC', 'Lucida Grande', 'Hiragino Kaku Gothic ProN', 'Microsoft JhengHei', Meiryo, sans-serif;
}

body {
  width: 100%;
  height: 100%;
  min-height: 100vh;
}

body::before {
  content: "";
  display: block;
  position: fixed;
  z-index: -1;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("../image/ui_web_BG_01.png");
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}

a {
  color: inherit;
  text-decoration: none;
}

.article {
  position: relative;
  padding: 0.75rem;
  background-color: rgb(240, 240, 255);
  box-shadow: 0 0 0.25rem 0.125rem rgba(152, 160, 228, 0.6);
  border-radius: 1rem;
}

.article:hover,
.article:focus {
  background: linear-gradient(to right, rgb(168, 240, 16), rgb(240, 240, 56));
  box-shadow:
    0 0 0 0.1rem rgb(255, 255, 255) inset,
    0 0 0 0.125rem rgb(168, 240, 16),
    0 0 0.5rem 0.25rem rgba(168, 240, 16, 0.6),
    0 0 1rem 0.5rem rgba(168, 240, 16, 0.4);
}

article {
  position: relative;
  width: 100%;
  height: 100%;
}

#detail article {
  padding: 2rem;
  color: var(--color-text-white);
  background-color: rgb(88, 88, 200);
  border: 0.125rem solid rgba(255, 255, 255, 0.6);
  box-shadow:
    0 0 0.25rem 0.25rem rgba(152, 160, 228, 0.6),
    inset 0 0 2rem 1rem rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
}

b {
  font-weight: 700;
}

button,
.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 2.5rem;
  margin: 0 auto;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  background: linear-gradient(to right, rgb(240, 240, 255), rgb(224, 232, 255));
  border: none;
  border-radius: 1rem 0.25rem 1rem 0.25rem;
  box-shadow: 0 0.125rem 0.25rem 0.125rem rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.btn-link:focus,
.btn-link:hover,
.button-active {
  color: var(--color-text);
  background: linear-gradient(to right, rgb(168, 240, 16), rgb(240, 240, 56));
  box-shadow:
    0 0 0 0.1rem rgb(255, 255, 255) inset,
    0 0 0 0.125rem rgb(168, 240, 16),
    0 0 0.5rem 0.25rem rgba(168, 240, 16, 0.6);
}

#detail .btn-link {
  max-width: var(--button-width);
  margin: 1rem auto;
}

.button-filter {
  color: var(--color-text-white);
  background: rgb(120, 104, 216);
}

.button-filter-deactive {
  color: var(--color-text);
  background: rgba(152, 160, 228, 0.6);
  box-shadow: 0 0 0 0.1rem rgb(255, 255, 255) inset;
}

#button-paginator-first,
#button-paginator-last {
  width: 5rem;
  height: 5.5rem;
}

.button-paginator-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 2.5rem;
  color: var(--color-text-white);
  margin-bottom: 0.125rem;
}

.button-paginator-number:hover,
.button-paginator-number:focus {
  color: var(--color-text);
  background: rgb(240, 240, 225);
  box-shadow:
    0 0 0 0.125rem rgb(255, 255, 255) inset,
    0 0 0 0.25rem rgb(168, 240, 16),
    0 0 0.5rem 0.5rem rgba(168, 240, 16, 0.4);
  border-radius: 2.5rem;
}

.button-paginator-number-active {
  color: var(--color-text);
  background: rgb(192, 232, 32);
  box-shadow:
    0 0.125rem 0.125rem 0 rgba(255, 255, 255, 0.4) inset,
    0 -0.125rem 0.125rem 0 rgba(0, 0, 0, 0.4) inset;
  border-radius: 2.5rem;
}

.button-paginator-number-active:hover,
.button-paginator-number-active:focus {
  color: var(--color-text);
  background: rgb(192, 232, 32);
  box-shadow:
    0 0 0 0.125rem rgb(255, 255, 255) inset,
    0 0.125rem 0.125rem 0 rgba(255, 255, 255, 0.4) inset,
    0 -0.125rem 0.125rem 0 rgba(0, 0, 0, 0.4) inset,
    0 0 0 0.25rem rgba(168, 240, 16),
    0 0 0.5rem 0.5rem rgba(168, 240, 16, 0.4);
  border-radius: 2.5rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 1rem 0;
}

h1 {
  padding: 0.25rem 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  background: linear-gradient(to right, rgb(240, 240, 255), rgb(224, 232, 255));
}

h2 {
  padding: 0.25rem 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-white);
  background: rgb(152, 160, 228);
}

h3,
h4 {
  padding: 1rem;
  font-size: 1rem;
  font-weight: 400;
  color: rgb(96, 96, 112);
  background: rgb(200, 200, 240);
  border-radius: 0.5rem;
}

h3 b {
  font-weight: 700;
  color: var(--color-text);
}

h4 b {
  font-weight: 700;
}

h5,
h6 {
  font-size: 1rem;
  font-weight: 400;
}

header {
  display: flex;
  align-items: center;
  justify-content: start;
  width: 100%;
  height: var(--header-height);
  padding: 0 2rem;
  background-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0.125rem 0.25rem 0.125rem rgba(152, 160, 228, 0.6);
}

hr {
  margin: 0.5rem 0;
  border: none;
  border-top: 0.125rem solid rgb(152, 160, 228);
}

img {
  display: block;
  width: 100%;
}

main {
  padding: 2rem;
}

#list main {
  background: linear-gradient(to bottom, rgba(152, 160, 228, 0.6), rgba(152, 160, 228, 0.0));
}

#detail main {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.article-title {
  width: 100%;
  font-size: 1.5rem;
  font-weight: 700;
}

#list .article-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  height: 4.5rem;
  margin: 0.5rem 0;
  overflow: hidden;
}

.article-body a:not(.btn-link) {
  font-weight: 700;
  text-decoration: underline;
}

.article-body img {
  margin: 1rem auto;
  max-width: var(--button-width);
}

.article-image img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
}

#detail .article-image img {
  position: sticky;
  top: 2rem;
}

.article-category {
  position: absolute;
  z-index: 1;
  top: -1.125rem;
  left: -1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 21.375rem;
  height: 2.25rem;
  color: var(--color-text-white);
}

.article-category-with-badge {
  padding-left: 2.75rem;
}

#detail .article-category {
  left: 2rem;
  padding-left: 0;
}

.article-badge-unread {
  position: absolute;
  z-index: 1;
  top: -0.75rem;
  right: -0.75rem;
  width: 1.5rem;
  height: 1.5rem;
}

#filter {
  position: absolute;
  top: 1.75rem;
  right: 2rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  row-gap: 0.5rem;
  width: 16rem;
}

#grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

#paginator {
  display: flex;
  align-items: center;
  justify-content: center;
  column-gap: 1rem;
  width: 100%;
  margin-top: 4rem;
}

#paginator-numbers {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  background-color: rgba(104, 88, 204, 0.8);
  border-top: 0.125rem solid rgba(0, 0, 0, 0.2);
  border-radius: 2.5rem;
}

#title {
  font-size: 2.5rem;
  font-weight: bold;
}

.hidden {
  display: none;
}

#scroll-container {
  position: fixed;
  z-index: 1;
  right: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 100%;
}

#scroll-thumb {
  position: absolute;
  top: 4rem;
  width: 0.5rem;
  height: 4rem;
  background-color: rgb(240, 240, 255);
  border-radius: 0.5rem;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

#scroll-track {
  position: absolute;
  width: 0.25rem;
  background-color: rgb(255, 255, 255, 0.2);
  border-radius: 0.125rem;
  cursor: pointer;
  user-select: none;
}

#list.scroll-active #scroll-track {
  height: calc(100% - 16rem);
}

#detail.scroll-active #scroll-track {
  height: calc(100% - 4rem);
}

.scroll-active main {
  padding-right: 4rem;
}

.scroll-active #scroll-container {
  right: 1rem;
}

.scroll-deactive #scroll-container {
  display: none;
}

@media screen and (min-width: 800px) {
  :root {
    font-size: 1.25vw;
  }

  header {
    justify-content: center;
  }

  #filter {
    left: 2rem;
  }

  #title {
    font-size: 3rem;
  }

  #detail main {
    flex-wrap: nowrap;
    gap: 1rem;
  }

  #detail article {
    width: 40rem;
  }

  #detail .article-image {
    width: var(--button-width);
  }

  #detail .article-image img {
    top: 30vh;
  }

  #grid {
    grid-template-columns: 1fr 1fr;
  }
}