:root {
  --block-grass: #a5d56b;
  --block-dark: #243725;
  --block-ink: #253528;
  --block-border: #a5b39a;
  --block-surface: #edf2e6;
  --block-shadow: #3d503b;
}

.portal-header, body > header.top, .dex-global {
  border-bottom: 4px solid #77965b;
}

.portal-header .mark, body > header.top .mark {
  transform: none;
  gap: 0;
}
.portal-header .mark i, body > header.top .mark i { background: #70964c; }
.portal-header .mark i:nth-child(n+3), body > header.top .mark i:nth-child(n+3) { background: #79583f; }

main :is(.button, .reader-choices a, .reading-choices a, .reading-next-card, .portal-links a, .dex-page-btn) {
  border-radius: 2px;
  box-shadow: 0 2px var(--block-shadow);
}
main :is(.reader-choices a, .reading-choices a, .reading-next-card):hover { text-decoration: underline; }

main :is(.article-toc, .install-toc, .page-agenda, .reading-next, .news-related) {
  border-radius: 2px;
  border-top: 4px solid #77965b;
}
main :is(.article-body, .install-article, .quality-guide) h2 {
  border-inline-start: 5px solid #77965b;
}
main :is(.portal-addon, .news-card, .dex-card, .chapter) {
  border-radius: 2px;
}
main :is(.portal-addon, .news-card) {
  border-bottom: 3px solid var(--block-border);
}

main .mini-mine-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  margin-bottom: 14px;
  background: #392c23;
  color: #f7eee3;
  border: 2px solid #755739;
  border-top: 6px solid var(--block-grass);
  border-radius: 0;
  box-shadow: 4px 4px #d9d5ca;
}
.mini-mine-entry h2 { font-size: clamp(1.45rem, 4vw, 1.9rem); }
.mini-mine-entry .game-label { color: #c8e5a9; font-weight: 750; }
.game-actions { display: grid; gap: 4px; }
.game-actions a { display: grid; place-items: center; min-height: 44px; padding: 5px 8px; font-size: .85rem; }
.game-actions .button {
  background: var(--block-grass);
  color: #192613;
  box-shadow: 0 3px #151d12;
}
.game-actions a:last-child { text-decoration: underline; text-underline-offset: 3px; }

main .portal-intro:has(.home-shortcuts) {
  background: var(--block-dark);
  color: #f4f7ef;
  border: 2px solid #536f46;
  border-top: 6px solid var(--block-grass);
  border-radius: 0;
  padding: clamp(16px, 4vw, 34px);
}
.portal-intro:has(.home-shortcuts) h1 { margin-top: 0; line-height: 1.25; color: inherit; }
.portal-intro:has(.home-shortcuts) :is(.portal-search-label, .portal-small) { color: #e1ebda; }
.portal-intro:has(.home-shortcuts) input { color: var(--block-ink); background: #fff; }
.portal-intro:has(.home-shortcuts) #site-search-results { color: var(--block-ink); background: #f7faf3; }
.home-shortcuts { margin-block: 12px 0; }
.home-shortcuts a { min-height: 44px; }

.home-feature h2 { border-left: 5px solid #77965b; padding-left: 10px; }
.home-feature-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.home-feature-grid a { display: block; overflow: hidden; background: var(--block-surface); border: 1px solid var(--block-border); border-bottom: 3px solid var(--block-shadow); }
.home-feature-grid a:hover strong { text-decoration: underline; }
.home-feature-grid img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 8; object-fit: cover; }
.home-feature-grid a > div { display: grid; gap: 4px; padding: 12px; line-height: 1.45; }
.home-feature-grid small { color: #465a43; }

@media (max-width: 620px) {
  main .mini-mine-entry { grid-template-columns: minmax(0,1fr); gap: 6px; }
  .game-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-shortcuts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 5px; }
  .home-shortcuts a { justify-content: center; padding: 5px 3px; text-align: center; font-size: .76rem; }
  .home-feature-grid a > div { padding: 9px; }
}
