/* Shared Figma board rules for the game Wiki surfaces. */
:root {
  --ui-page-max: 1300px;
  --ui-content-max: 1200px;
  --ui-gutter: 50px;
  --ui-ink: #24342d;
  --ui-green: #315d48;
  --ui-line: #e6ebe8;
}

.shared-game-shell {
  background: #fff;
  color: var(--ui-ink);
}

/* Quiet purple masthead only when Live2D attribute themes are off.
   has-live2d + hero-theme-* use .gk-hero-bg gradients from site-chrome.css. */
.shared-game-shell .gk-hero:not(.has-live2d) {
  height: 372px;
  min-height: 372px;
  padding: 112px 24px 42px;
  background:
    radial-gradient(circle at 72% 12%, rgba(76, 63, 121, 0.42), transparent 42%),
    linear-gradient(118deg, #171426 0%, #241c3e 54%, #3a2d60 100%);
}

.shared-game-shell .gk-hero:not(.has-live2d) .gk-hero-bg,
.shared-game-shell .gk-hero:not(.has-live2d)::before {
  display: none;
}

.shared-game-shell .gk-hero.has-live2d[class*='hero-theme-'] .gk-hero-bg {
  display: block;
}

.shared-game-shell .gk-hero.has-live2d:not(.is-expanded) {
  height: 412px;
  min-height: 412px;
  padding: 112px 24px 42px;
}

.shared-game-shell .gk-hero.has-live2d.is-expanded {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
}

.shared-game-shell .gk-hero .gk-eyebrow {
  color: #e2dff0;
  font-size: 11px;
  letter-spacing: .22em;
}

.shared-game-shell .gk-hero .gk-hero-copy h1 {
  margin: 14px 0 25px;
  color: #fff;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: .02em;
}

.shared-game-shell .gk-hero .gk-search {
  width: min(660px, 100%);
  min-height: 52px;
  border-radius: 11px;
  box-shadow: 0 10px 30px rgba(9, 7, 24, .2);
}

.shared-game-shell .gk-recommendations {
  gap: 28px;
  margin-top: 22px;
}

.shared-game-shell .gk-recommendations button {
  color: #e6e2ef;
  font-size: 13px;
}

.shared-game-shell .gk-navigation {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--ui-line);
  backdrop-filter: none;
}

.shared-game-shell .gk-nav-inner {
  width: min(var(--ui-content-max), calc(100% - 100px));
  min-height: 58px;
}

.shared-game-shell .gk-nav-links a {
  min-height: 58px;
  color: #69716f;
  font-size: 15px;
}

.shared-game-shell .gk-nav-links a[aria-current='page'] {
  color: #dd4c4c;
}

.shared-game-shell .gk-nav-links a[aria-current='page']::after {
  background: #e55353;
}

.shared-game-content {
  background: #fff;
}

/* Keep all legacy content boxes on the same 1200px inner grid. */
.shared-game-content .content-shell,
.shared-game-content .catalog-layout,
.shared-game-content .guides-layout,
.shared-game-content .tools-layout,
.shared-game-content .community-layout,
.shared-game-content .embedded-community {
  box-sizing: border-box;
  width: min(var(--ui-page-max), 100%);
  max-width: var(--ui-page-max);
  padding-left: var(--ui-gutter);
  padding-right: var(--ui-gutter);
}

.shared-game-content .guides-layout {
  padding-top: 42px;
  padding-bottom: 58px;
}

.shared-game-content .guides-filter-row {
  min-height: 52px;
  border-bottom: 1px solid var(--ui-line);
}

.shared-game-content .guides-toolbar-actions {
  padding-bottom: 14px;
}

.shared-game-content .guides-create,
.shared-game-content .community-create-post {
  height: 36px;
  min-width: 102px;
  border-radius: 4px;
  background: var(--ui-green);
  font-size: 12px;
}

.shared-game-content .guides-list-meta {
  padding-top: 12px;
}

.shared-game-content .guides-library-body {
  grid-template-columns: minmax(0, 1fr) 288px;
  gap: 32px;
  padding-top: 18px;
}

.shared-game-content .guides-library-body > .guides-filters {
  grid-column: 1;
}

.shared-game-content .guides-library-body .guides-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shared-game-content .guides-library-body .guide-entry {
  min-height: 78px;
  padding: 16px 48px 14px 18px;
  border: 1px solid #e4e9e6;
  border-radius: 7px;
  box-shadow: none;
}

.shared-game-content .guides-library-body .guide-entry h3 {
  font-size: 14px;
}

.shared-game-content .guide-authors {
  top: 76px;
  padding: 20px;
  border: 1px solid #e4e9e6;
  border-radius: 7px;
  background: #fafbf9;
}

.shared-game-content .community-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 40px;
  margin-top: 36px;
  margin-bottom: 64px;
}

.shared-game-content .posts-section,
.shared-game-content .group-digest {
  min-width: 0;
}

.shared-game-content .community-section-heading {
  margin-bottom: 18px;
}

.shared-game-content .player-post {
  padding: 24px 0;
}

.shared-game-content .post-title {
  margin: 13px 0 8px;
  font-size: 16px;
}

.shared-game-content .player-post > p,
.shared-game-content .player-post > .post-excerpt {
  font-size: 13px;
}

.shared-game-content .group-digest {
  padding: 24px;
  border-radius: 4px;
  background: #f7f7f7;
}

@media (max-width: 900px) {
  .shared-game-content .content-shell,
  .shared-game-content .catalog-layout,
  .shared-game-content .guides-layout,
  .shared-game-content .tools-layout,
  .shared-game-content .community-layout,
  .shared-game-content .embedded-community {
    padding-left: 24px;
    padding-right: 24px;
  }

  .shared-game-content .guides-library-body,
  .shared-game-content .community-layout {
    grid-template-columns: 1fr;
  }

  .shared-game-content .guide-authors {
    position: static;
  }
}

@media (max-width: 600px) {
  .shared-game-shell .gk-hero:not(.is-expanded) {
    height: 320px;
    min-height: 320px;
    padding: 92px 18px 34px;
  }

  .shared-game-shell .gk-hero .gk-hero-copy h1 {
    font-size: 27px;
  }

  .shared-game-shell .gk-nav-inner {
    width: 100%;
  }

  .shared-game-content .content-shell,
  .shared-game-content .catalog-layout,
  .shared-game-content .guides-layout,
  .shared-game-content .tools-layout,
  .shared-game-content .community-layout,
  .shared-game-content .embedded-community {
    padding-left: 16px;
    padding-right: 16px;
  }

  .shared-game-content .guides-library-body .guides-list {
    grid-template-columns: 1fr;
  }
}

/* Figma board 1003:3746 — guide center desktop layout. */
.shared-game-shell .gk-hero:not(.is-expanded) {
  height: 412px;
  min-height: 412px;
  padding: 112px 24px 42px;
}

.shared-game-shell .gk-navigation {
  height: 65px;
}

.shared-game-shell .gk-nav-inner {
  width: min(var(--ui-content-max), calc(100% - 100px));
  min-height: 65px;
}

.shared-game-shell .gk-nav-links a {
  min-height: 65px;
}

.shared-game-shell--guides .gk-nav-links {
  --nav-count: 4;
}

.shared-game-content .guides-layout {
  width: 100%;
  max-width: var(--ui-page-max);
  padding: 46px 50px 60px;
}

.shared-game-content .guides-filter-row {
  min-height: 58px;
  align-items: center;
  border-bottom: 1px solid #dfe5e1;
}

.shared-game-content .guides-toolbar-actions {
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  padding: 0;
}

.shared-game-content .guides-create {
  min-width: 112px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid #315b49;
  border-radius: 3px;
  background: #355844;
  font-size: 13px;
}

.shared-game-content .guides-sort {
  padding: 0;
  font-size: 12px;
}

.shared-game-content .guides-sort select {
  width: 108px;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 3px;
  font-size: 12px;
}

.shared-game-content .guides-list-meta {
  min-height: 29px;
  box-sizing: border-box;
  align-items: center;
  padding: 13px 0 0;
  font-size: 10px;
}

.shared-game-content .guides-library-body {
  display: grid;
  grid-template-columns: minmax(0, 840px) 320px;
  column-gap: 40px;
  row-gap: 32px;
  align-items: start;
  margin: 0;
  padding-top: 0;
}

.shared-game-content .guides-library-body > .guides-filters {
  grid-column: 1;
  width: 100%;
  min-height: 45px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e4e9e6;
  background: transparent;
  box-shadow: none;
  scrollbar-width: none;
}

.shared-game-content .guides-library-body > .guides-filters::-webkit-scrollbar {
  display: none;
}

.shared-game-content .guides-library-body > .guides-filters::before {
  content: none;
  display: none;
}

.shared-game-content .guides-library-body > .guides-filters button {
  flex: 0 0 auto;
  align-self: center;
  width: auto;
  min-height: 32px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 18px;
  background: #f4f6f4;
  color: #727d77;
  font-size: 12px;
  white-space: nowrap;
}

.shared-game-content .guides-library-body > .guides-filters button[aria-pressed='true'] {
  border-color: #315846;
  background: #315846;
  color: #fff;
  font-weight: 600;
}

.shared-game-content .guides-library-main {
  grid-column: 1;
  min-width: 0;
  width: 100%;
}

.shared-game-content .guides-library-body .guides-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
  background: transparent;
}

.shared-game-content .guides-library-body .guide-entry {
  position: relative;
  min-height: 78px;
  box-sizing: border-box;
  padding: 14px 48px 13px 18px;
  border: 1px solid #efefef;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.shared-game-content .guides-library-body .guide-entry:hover {
  padding-left: 18px;
  border-color: #d7e1db;
  background: #fff;
  box-shadow: 0 6px 18px rgba(35, 67, 52, .06);
  transform: none;
}

.shared-game-content .guides-library-body .guide-entry h3 {
  margin: 0;
  color: #263b31;
  font: 600 16px/24px "Noto Serif SC", "Songti SC", serif;
  letter-spacing: 0;
}

.shared-game-content .guides-library-body .guide-entry > p {
  display: none;
}

.shared-game-content .guides-library-body .guide-row-meta {
  margin-top: 6px;
  color: #9aa39e;
  font-size: 10px;
  line-height: 14px;
}

.shared-game-content .guides-library-body .guide-entry::after {
  content: '↗';
  position: absolute;
  top: 16px;
  right: 18px;
  color: #91a098;
  font-size: 14px;
  opacity: 1;
  transform: none;
}

.shared-game-content .guide-authors {
  grid-column: 2;
  grid-row: 2;
  position: static;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 20px;
  border: 1px solid #e4e9e6;
  border-radius: 8px;
  background: #fafbf9;
}

@media (max-width: 1100px) {
  .shared-game-content .guides-library-body {
    grid-template-columns: minmax(0, 1fr) 288px;
  }
}

@media (max-width: 900px) {
  .shared-game-content .guides-library-body {
    grid-template-columns: 1fr;
  }

  .shared-game-content .guides-library-main,
  .shared-game-content .guide-authors {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 600px) {
  .shared-game-shell .gk-hero:not(.is-expanded) {
    height: 320px;
    min-height: 320px;
  }

  .shared-game-shell .gk-navigation,
  .shared-game-shell .gk-nav-inner,
  .shared-game-shell .gk-nav-links a {
    min-height: 58px;
    height: 58px;
  }

  .shared-game-content .guides-layout {
    padding: 12px 16px 40px;
  }

  .shared-game-content .guides-library-body .guides-list {
    grid-template-columns: 1fr;
  }

  .shared-game-content .guides-library-body .guide-entry {
    padding: 17px 44px 17px 17px;
  }
}

/* Keep mobile guide actions together below the category list. */
@media (max-width: 600px) {
  .shared-game-content .guides-library-body {
    row-gap: 12px;
  }

  .shared-game-content .guides-library-body > .guides-sort {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    justify-content: flex-start;
    align-self: center;
    margin-top: 0;
    border-bottom: 0;
  }

  .shared-game-content .guides-library-body > .guides-create {
    grid-column: 1;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    height: 32px;
    min-height: 32px;
  }

  .shared-game-content .guides-library-body > .guides-library-main {
    grid-row: 3;
  }

  .shared-game-content .guides-library-body > .guide-authors {
    grid-row: 4;
  }
}

/* Match the mobile community toolbar spacing to the guide page. */
@media (max-width: 600px) {
  .shared-game-content .community-layout.embedded-community {
    margin-top: 0;
    padding-top: 12px;
  }

  .shared-game-content .embedded-community .posts-section > .post-filters {
    margin-top: 0;
  }
}

/* Final WAP height for every game Wiki homepage banner. */
@media (max-width: 760px) {
  .shared-game-shell .gk-hero:not(.is-expanded) .gk-hero-copy > h1 {
    font-size: 22px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .shared-game-shell .gk-hero:not(.is-expanded) .gk-recommendations button {
    font-size: 12px;
    white-space: nowrap;
  }

  .shared-game-shell .gk-hero:not(.is-expanded) .gk-recommendations {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    transform: translateY(-7px);
  }

  .shared-game-shell > .gk-hero:not(.is-expanded),
  .shared-game-shell > .gk-hero.has-live2d:not(.is-expanded) {
    box-sizing: border-box;
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }

  .shared-game-shell > .gk-hero.has-live2d:not(.is-expanded) {
    padding: 0 16px 38px;
  }

  .shared-game-shell > .gk-hero.has-live2d:not(.is-expanded) .gk-hero-live2d.is-center .gk-hero-live2d-inner {
    transform: translateY(28px) scale(1.5);
    transform-origin: center center;
  }

  .shared-game-shell[data-game='arcanatactics'] > .gk-hero.has-live2d:not(.is-expanded) .gk-hero-live2d.is-center .gk-hero-live2d-inner {
    transform: translateY(38px) scale(1.5);
  }

  .shared-game-shell > .gk-hero.has-live2d:not(.is-expanded)::after {
    height: 80%;
    background: linear-gradient(
      180deg,
      rgba(12, 16, 22, 0) 0%,
      rgba(12, 16, 22, .16) 20%,
      rgba(12, 16, 22, .38) 50%,
      rgba(12, 16, 22, .62) 100%
    );
  }

  .shared-game-shell > .gk-hero:not(.has-live2d) {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 58px 16px 18px;
  }

  .shared-game-shell > .gk-hero:not(.has-live2d) .gk-hero-copy {
    width: 100%;
    min-width: 0;
  }

  .shared-game-shell > .gk-hero:not(.has-live2d) .gk-hero-copy > h1 {
    margin-bottom: 12px;
  }

  .shared-game-shell > .gk-hero:not(.has-live2d) .gk-search {
    box-sizing: border-box;
    width: 100%;
    min-height: 52px;
    padding: 0 12px 0 16px;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(8, 12, 18, .2);
  }

  .shared-game-shell > .gk-hero:not(.has-live2d) .gk-search > button[type='submit'] {
    order: 0;
    width: 36px;
    height: 36px;
  }

  .shared-game-shell > .gk-hero:not(.has-live2d) .gk-search > button[type='submit'] svg {
    width: 22px;
    height: 22px;
  }

  .shared-game-shell > .gk-hero:not(.has-live2d) .gk-search input {
    order: 0;
    font-size: 15px;
  }
}
