.top-test-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: stretch;
}

.top-test-layout > .service-panel,
.top-test-layout > .side-panel,
.top-test-layout > .content-panel {
  width: 100%;
}

.top-test-layout .service-panel {
  order: 1;
  grid-template-columns: 1fr;
}

.top-test-layout .side-panel {
  order: 3;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.top-test-layout .content-panel {
  order: 2;
}

.top-test-layout .top-news {
  order: 4;
  width: 100%;
}

.news-archive-link {
  margin: -4px 22px 22px;
  text-align: right;
}

.news-archive-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: #ffffff;
  color: var(--blue);
  font-weight: 800;
}

.news-archive-link a:hover,
.news-archive-link a:focus-visible {
  background: var(--blue);
  color: #ffffff;
  text-decoration: none;
}

.top-section-heading {
  grid-column: 1 / -1;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.feature-heading {
  border-left-color: var(--blue);
}

.top-section-heading h2 {
  margin: 2px 0 6px;
  color: var(--text);
  font-size: 1.45rem;
}

.top-section-heading p:last-child {
  margin: 0;
  color: var(--muted);
}

.top-test-layout .nav-card {
  padding: 22px;
}

.top-test-layout .link-stack {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.top-test-layout .link-stack li,
.top-test-layout .link-stack a {
  height: 100%;
}

.top-test-layout .link-stack.compact a {
  display: grid;
  gap: 3px;
  padding: 11px 12px;
}

.top-test-layout .link-stack a {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.top-test-layout .link-stack a > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.top-test-layout .link-stack a > span::before {
  width: 0.62em;
  height: 0.62em;
  flex: 0 0 0.62em;
  border-radius: 50%;
  background: #d78383;
  box-shadow: 0 0 0 3px rgba(215, 131, 131, 0.14);
  content: "";
}

.top-test-layout .link-stack a:hover,
.top-test-layout .link-stack a:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 8px 20px rgba(20, 46, 75, 0.12);
  transform: translateY(-2px);
}

.top-test-layout .side-card {
  min-width: 0;
}

.top-test-layout .feature-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.top-test-layout .feature-tile {
  min-width: 0;
  height: 100%;
}

.top-test-layout .feature-tile img {
  max-width: 100%;
  height: auto;
}

.top-test-layout .hero-diary .feature-body img {
  width: 100% !important;
  margin: 8px 0 !important;
}

.top-test-layout .inline-latest .article-item {
  display: grid;
  gap: 12px;
}

.top-test-layout .inline-latest .wp_img {
  display: block;
  width: 100%;
  margin: 0 auto;
  border-radius: 8px;
}

.top-test-layout .inline-latest .article-text {
  display: grid;
  gap: 10px;
}

.top-test-layout .inline-latest .signature {
  display: none;
}

.top-test-layout .latest-article {
  display: grid;
  gap: 12px;
}

.top-test-layout .latest-title {
  margin: 0;
  font-weight: 700;
  line-height: 1.7;
}

.top-test-layout .loading-text,
.top-test-layout .feature-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.top-test-layout .tile-body {
  margin-top: 12px;
}

.top-test-layout .tile-bbs .tile-body > a > img,
.top-test-layout .tile-mail .tile-body > a > img {
  float: none !important;
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 0 auto 14px !important;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.top-test-layout .tile-server {
  order: 2;
}

.top-test-layout .tile-bbs {
  order: 3;
}

.top-test-layout .tile-mail {
  order: 4;
}

.top-test-layout #mini_response_graph svg {
  max-width: 100%;
  height: auto;
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 58px;
  min-height: 50px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  background: var(--blue);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.28);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: var(--green);
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 1020px) {
  .top-test-layout .side-panel,
  .top-test-layout .feature-grid-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .top-test-layout {
    gap: 24px;
  }

  .top-test-layout .side-panel,
  .top-test-layout .feature-grid-four,
  .top-test-layout .link-stack {
    grid-template-columns: 1fr;
  }

  .top-section-heading {
    padding: 18px;
  }

  .top-test-layout .nav-card {
    padding: 18px;
  }

  .news-archive-link {
    margin-right: 18px;
    margin-bottom: 18px;
    margin-left: 18px;
  }

  .news-archive-link a {
    width: 100%;
  }

  .back-to-top {
    right: 14px;
    bottom: 14px;
    min-width: 54px;
    min-height: 46px;
    padding: 0 11px;
  }
}
