/* ======== Layout ===== */

.container {
  width: 100%;
  max-width: 1303px;
  margin: auto;
}

main .container {
  display: flex;
  gap: 26px;
}

.main-content {
  width: 100%;
}

.side-bar {
  width: 100%;
  max-width: 393px;
  padding: 30px 26px;
}

.side-bar.md-hide {
  position: relative;
}

.side-bar .fix-container {
  position: sticky;
  top: 30px;
  left: 0;
}

.side-bar .today-price-wrap {
  border: 8px solid var(--brown);
  border-radius: 20px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  padding-block: 23px 20px;
  padding-inline: 25px;
  margin-bottom: 30px;
}
.side-bar .today-price-wrap .today-price-title {
  text-align: center;
  font-weight: 700;
  line-height: 100%;
  margin-bottom: 15px;
}
.side-bar .today-price-wrap .today-price-title h2 {
  font-size: 24px;
  margin-bottom: 8px;
  white-space: nowrap;
}
.side-bar .today-price-wrap .today-price-title p {
  font-size: 18px;
  line-height: normal;
}
.side-bar .price-pannel {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 23px 17px;
  padding-block: 15px;
  background-color: var(--black);
  margin-bottom: 9px;
}
.side-bar .price-pannel .main-price {
  font-size: 32px;
  font-weight: 700;
  line-height: 100%;
  color: var(--white);
}
.side-bar .price-pannel .prev-price-compare {
  text-align: end;
}
.side-bar .price-pannel .prev-price-compare p {
  font-size: 16px;
  font-weight: 400;
  color: var(--white);
}
.side-bar .price-pannel .prev-price-compare span {
  font-size: 24px;
  font-weight: 700;
  color: var(--green);
}

.side-bar .price-pannel .prev-price-compare span {
  animation: fadeBlink 1s infinite;
}

@keyframes fadeBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.1;
  }
}

.side-bar .price-update-date {
  font-size: 14px;
  text-align: end;
}

.side-bar .price-ranking {
  padding-block: 32px;
}
.side-bar .price-ranking .common-title {
  margin-bottom: 27px;
}
.side-bar .price-ranking .price-ranking-title span {
  font-size: 18px;
}
.side-bar .price-ranking .price-ranking-title p {
  font-size: 24px;
  line-height: 34px;
  margin-top: 11px;
}

.side-bar .price-ranking-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.side-bar .price-ranking-wrap .ranking-area-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 12px;
  row-gap: 20px;
}
.side-bar .price-ranking-wrap .ranking-area-item {
  width: 164px;
  padding-block: 15px;
  color: var(--warm);
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  text-align: center;
  border-radius: 100px;
  border: 1px solid var(--warm);
}
.side-bar .price-ranking-wrap .tokyo {
  width: 100%;
  margin-bottom: 20px;
  background-color: var(--warm);
  color: var(--white);
}

/* ====== Components ======= */

.top-nav-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 11px 17px;
}

.top-nav-bar p,
.top-nav-bar span {
  font-size: 14px;
  font-weight: 400;
  color: var(--gray);
}

/* ---- Common-title ----- */
.common-title {
  text-align: center;
  font-weight: 700;
}
.common-title p {
  font-size: 18px;
  margin-bottom: 11px;
}
.common-title h2 {
  font-size: 24px;
  line-height: 34px;
}

/* ----- Latest Price ----- */

.latest-price .latest-price-wrap {
  background-color: var(--soft);
}

.latest-price .latest-price-wrap .latest-price-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 62px;
  gap: 26px;
}
.latest-price .latest-price-wrap .purchase-trends {
  gap: 40px;
}

/* ------ Avg-table ------ */
.avg-table {
  width: 100%;
  max-width: 600px;
  border-collapse: collapse;
}
.avg-table thead th {
  background: var(--red);
  color: var(--white);
  font-size: 20px;
  padding: 10px;
  border-right: 1px solid var(--gray-border);
  font-weight: 500;
}
.avg-price .avg-table thead th:first-child {
  width: 100px;
}
.avg-table thead th:last-child {
  border-right: none;
}
.avg-table td {
  text-align: center;
  padding-block: 10px;
  border-right: 1px solid var(--gray-border);
  background: var(--white);
}
.thisYear-trends .avg-table td {
  padding-block: 21px;
}
.avg-table tr.alt td {
  background: var(--background);
}
.avg-table .type {
  font-weight: 600;
  font-size: 18px;
  text-align: center;
}
.avg-table .type span {
  font-size: 18px;
  font-weight: 400;
}
.avg-table .price {
  font-size: 24px;
  font-weight: 700;
}
.avg-table .diff {
  font-size: 22px;
  font-weight: 400;
}
.avg-table .plus {
  color: var(--red);
}
.avg-table .minus {
  color: var(--blue);
}
.avg-table td:last-child {
  border-right: none;
}

/* ------- Chart ----- */
.chart-container {
  width: 100%;
  max-width: 760px;
}

/* Filters */
.filters {
  display: flex;
  justify-content: space-between;
  padding-inline: 18px;
  margin-bottom: 40px;
}

.filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter .filter-txt {
  display: flex;
  align-items: center;
  gap: 5px;
}

.filter span {
  font-size: 18px;
  font-weight: 700;
  line-height: 25px;
}

.filter img {
  width: 15px;
}

.filter .select-btn {
  width: 212px;
  padding: 10px 0;
  border: 2px solid var(--red);
  border-radius: 5px;
  background: var(--white);
  color: var(--red);
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

.filter {
  position: relative;
  width: fit-content;
}

.select-options {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: none;
  width: 13em;
  min-width: 160px;
  background: #fff;
  border: 1px solid #d9d9d9;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  overflow: hidden;
}

.select-options.is-open {
  display: block;
}

.select-option {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  background: #fff;
  text-align: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: var(--gray);
}

.select-option:hover,
.select-option.is-active {
  background: #f7f7f7;
  color: var(--red);
}

/* Chart box */
.gold-price-chart-wrap {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  background-color: var(--white);
  margin-bottom: 22px;
}

.chart-container .chart-btm-txt {
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  text-align: center;
}

.gold-price-chart-wrap canvas {
  width: 100% !important;
  height: 520px !important;
  display: block;
  padding: 20px 20px 10px 20px;
}

@media (max-width: 767px) {
  .gold-price-chart-wrap canvas {
    height: 288px !important;
    padding: 0;
  }
}

/* ----- Buy-ranking ---- */
.buy-ranking {
  padding: 30px 58px;
}

.ranking-row.is-row-hidden {
  display: none;
}

.ranking-row.is-row-hidden.is-open {
  display: table-row;
}

.ranking-title-btm-txt {
  font-size: 16px;
  line-height: 26px;
  margin-top: 21px;
}

.ranking-table-accordion {
  width: 100%;
  margin-top: 12px;
}

.ranking-table-viewport {
  position: relative;
  overflow-x: scroll;
  overflow-y: hidden;
  max-height: 490px; /* 閉じた時の高さ */
  transition: max-height 0.35s ease;
  width: 100%;
  max-width: 768px;
}

/* 閉じている時だけ下にグラデーション */
.ranking-table-accordion:not(.is-open) .ranking-table-viewport::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 1) 100%
  );
}

/* 開いたらグラデーション消す */
.ranking-table-accordion.is-open .ranking-table-viewport::after {
  display: none;
}

.ranking-table {
  width: max-content;
  border-collapse: collapse;
  table-layout: fixed;
}

.ranking-table th,
.ranking-table td {
  border-inline: 1px solid var(--gray-border);
  padding: 7px 10px;
  text-align: center;
  vertical-align: middle;
}

.ranking-table thead th:nth-of-type(1),
.ranking-table td:nth-of-type(1) {
  border-left: none;
  padding-inline: 0;
}
.ranking-table thead th:nth-last-of-type(1),
.ranking-table td:nth-last-of-type(1) {
  border-right: none;
}

.ranking-table thead th {
  background: var(--soft);
  font-size: 16px;
  line-height: 26px;
  font-weight: 600;
  padding-block: 14px;
  width: 120px;
}

.ranking-table thead th:nth-of-type(1),
.ranking-table thead th:nth-of-type(2) {
  font-weight: 400;
}

.ranking-table thead th span {
  font-weight: 400;
}

.ranking-table tbody tr:nth-of-type(odd) {
  background-color: var(--white);
}

.shop-cell-link {
  display: block;
  width: 100%;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.shop-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.shop-logo {
  width: 100%;
  max-width: 100px;
}

.shop-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 2.5;
}

.rating {
  font-size: 16px;
  font-weight: 600;
  color: var(--warm);
  line-height: 26px;
  margin-bottom: 4px;
  text-align: start;
}

.fee-badge {
  display: flex;
  align-items: center;
  width: fit-content;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 5px;
  background: #fff3e8;
  color: var(--warm);
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
}

.fee-badge.is-free {
  background: #fff;
}

.price-text {
  font-size: 20px;
}

.ranking-table .p-zero {
  padding: 0;
}

.price-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 4px solid var(--red);
  border-radius: 5px;
  background: var(--white);
  width: 100%;
  height: 107px;
}

.price-card-label {
  width: 100%;
  background: var(--red);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 26px;
}

.price-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
  text-align: center;
  margin: auto;
}

.ranking-table-toggle {
  width: 100%;
  padding: 15px 20px;
  border-radius: 5px;
  background: #fff3e8;
  color: var(--warm);
  font-size: 20px;
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.ranking-table-toggle:hover {
  opacity: 0.9;
}

/* ------- Purity-table -------- */
.purity-table-wrap {
  width: 100%;
  overflow: hidden;
  padding: 30px 20px;
}

.purity-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 19px;
  max-width: 768px;
  width: 100%;
  margin: auto;
}

.purity-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.purity-table th,
.purity-table td {
  padding-block: 14px;
  text-align: center;
  vertical-align: middle;
  border-right: 1px solid #d7d2c8;
}

.purity-table th:last-child,
.purity-table td:last-child {
  border-right: 0;
}

.purity-table thead th {
  background: var(--soft);
  font-size: 18px;
  font-weight: 600;
  width: 120px;
  line-height: 26px;
}

.purity-table thead th small {
  font-size: 18px;
  font-weight: 400;
}

.purity-table tbody tr:nth-child(3) td,
.purity-table tbody tr:nth-child(3) th {
  padding-top: 2px;
  padding-bottom: 0;
  border: none;
}

.purity-table .label-cell,
.purity-table tbody .price-high {
  padding-block: 14px 5px;
}

.purity-table tr:nth-of-type(2) .label-cell,
.purity-table tbody .price-low {
  padding-block: 5px 14px;
}

.label-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  line-height: 26px;
  padding: 2px 19px;
}

.label-badge.is-outline {
  border: 1px solid var(--warm);
  background: #fff;
  color: var(--warm);
}

.label-badge.is-fill {
  background: var(--light-warm);
  color: var(--warm);
}

.price-high {
  font-size: 18px;
  font-weight: 600;
  color: var(--red);
}

.price-low {
  font-size: 16px;
}

.compare-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 8px;
  border-radius: 10px;
  background: var(--warm);
  color: var(--white);
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  box-shadow: inset 0 -6px 0 var(--dark-warm);
  transition: opacity 0.2s ease, transform 0.2s ease;

  width: 100%;
  max-width: 106px;
  margin: auto;
}

.compare-btn span {
  font-size: 18px;
}

.compare-btn:hover {
  opacity: 0.92;
  transform: translateY(1px);
}

.compare-btn:active {
  transform: translateY(2px);
}

/* ------- Ranking-list ----- */

.ranking-list {
  padding-block: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}

.ranking-list-wrap {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 21px;
  padding-inline: 22px;
}

.ranking-list-wrap .ranking-list-box {
  width: 100%;
  max-width: 267px;
  background-color: var(--white);
}
.ranking-list-box .area-name {
  background-color: var(--light-warm);
  padding-block: 5px;
  text-align: center;
  font-size: 18px;
  line-height: 30px;
  color: var(--warm);
  font-weight: 600;
  display: flex;
  justify-content: center;
  width: 100%;
}
.ranking-list-box .area-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 20px;
  column-gap: 45px;
  padding-inline: 30px;
  padding-block: 15px 24px;
}
.ranking-list-box .area-list-item {
  font-size: 18px;
  font-weight: 700;
  color: var(--warm);
  text-decoration: underline;
}

/* ========= */
@media (max-width: 1300px) {
  .buy-ranking {
    padding-inline: 20px;
  }
}

@media (max-width: 1250px) {
  .filter .select-btn {
    width: 180px;
  }
}

@media (max-width: 1203px) {
  main .container {
    gap: 15px;
  }
  .side-bar {
    max-width: 362px;
    padding: 30px 10px;
  }
  .filters {
    gap: 22px;
  }
  .filter .select-btn {
    width: 150px;
  }
}

@media (max-width: 1100px) {
  .filters {
    flex-direction: column;
  }
  .filter .select-btn {
    width: 212px;
  }
}

@media (max-width: 1023px) {
  .side-bar.md-hide {
    display: none;
  }
  .side-bar.md-show {
    display: block;
    padding: 30px 15px;
  }
}

@media (max-width: 768px) {
  .side-bar.md-show {
    max-width: 375px;
    margin: auto;
  }
  .avg-table {
    max-width: 340px;
  }
  .avg-price .avg-table thead th:first-child {
    width: unset;
  }
  .avg-table .price {
    font-size: 20px;
  }
  .avg-table .diff {
    font-size: 18px;
  }
  .latest-price .latest-price-wrap .latest-price-item {
    padding-inline: 20px;
  }
  .latest-price .latest-price-wrap .purchase-trends {
    gap: 33px;
  }
  .filters {
    padding-inline: 0;
    margin-bottom: 27px;
  }
  .ranking-list-wrap {
    grid-template-columns: 1fr 1fr;
    max-width: max-content;
    padding-inline: 20px;
    gap: 12px;
  }
}
@media (max-width: 600px) {
  .ranking-list {
    gap: 30px;
  }
  .ranking-list-wrap .ranking-list-box {
    width: 164px;
  }
  .ranking-list-box .area-list {
    column-gap: 10px;
    padding-inline: 16px;
  }
}

.latest-price-view {
  width: 100%;
  background-color: var(--soft);
  padding: 44px 26px;
}

.latest-price-view .latest-price-view-btn {
  width: 100%;
  max-width: 340px;
  display: flex;
  padding-block: 15px;
  background-color: var(--red);
  border-radius: 10px;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  margin: auto;
}

.latest-price-view .latest-price-view-btn p {
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  color: var(--white);
  text-align: center;
  margin: auto;
}

.latest-price-view .return-to-ranking {
  display: flex;
  width: 340px;
  padding-block: 19px;
  background-color: var(--white);
  border-radius: 100px;
  margin: auto;
  margin-bottom: 44px;
}

.latest-price-view .return-to-ranking p {
  font-size: 18px;
  font-weight: 700;
  margin: auto;
}

.common-column-list-page .inner {
  padding-inline: 42px;
  background-color: var(--white);
}

.common-column-list-page h1 {
  font-size: 24px;
  font-weight: 600;
  padding-block: 25px;
}

.common-column-list-page .column-list-detail {
  font-size: 18px;
  font-weight: 400;
  padding-block: 27px;
  line-height: 28px;
}

.common-column-list-page .column-list-item {
  padding-block: 25px;
}

.common-column-list-page .column-list-item-img-txt {
  display: flex;
  align-items: center;
  gap: 21px;
}

.common-column-list-page .column-list-item-img {
  width: 100%;
  max-width: 229px;
}

.common-column-list-page .column-list-item-img-txt h2 {
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.common-column-list-page .column-list-item-date {
  width: 100%;
  text-align: end;
  font-size: 12px;
  font-weight: 400;
  color: var(--gray);
}

.gold-article-single .inner {
  padding: 20px;
  background-color: var(--white);
  margin-bottom: 30px;
}

.gold-article-single .inner .title-date {
  padding-block: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gold-article-single .inner h1 {
  font-size: 26px;
  font-weight: 600;
}

.gold-article-single .inner .article-date {
  font-size: 14px;
  color: var(--gray);
}

.gold-article-single .featured-image {
  margin-bottom: 20px;
}

.gold-article-single .content {
  padding-block: 10px;
  font-size: 18px;
  font-weight: 600;
}

.common-card-pagination {
  display: flex;
  align-items: center;
  margin: auto;
  padding-bottom: 20px;
  gap: 5px;
  justify-content: center;
}

.page-numbers {
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid var(--gray-border);
  color: var(--gray-border);
}

.page-numbers.current {
  color: var(--black);
}
