.primary-button,
.secondary-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: "Segoe UI", "DM Sans", sans-serif;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  text-decoration: none;
  box-shadow: 0 1px 1px #17231808;
}

.primary-button {
  background: #3e604b;
  border-color: #365640;
  color: #fff;
}

.primary-button:hover {
  background: #34543f;
}

.secondary-button {
  background: #fff;
  border-color: #d3d8ce;
  color: #3d493a;
}

.secondary-button:hover {
  background: #f0f3ed;
  border-color: #bcc7b8;
}

.primary-button:active,
.secondary-button:active {
  box-shadow: inset 0 1px 2px #17231815;
}

.primary-button svg,
.secondary-button svg {
  width: 15px;
  height: 15px;
}

.game-library {
  background: #fbfcf9;
  font-family: "Segoe UI", "DM Sans", sans-serif;
}

.library-sidebar {
  width: 185px;
  padding: 22px 10px 12px;
  background: #eef1e9;
  border-color: #dce2d5;
}

.library-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 9px 28px;
  color: #344333;
  font-size: 14px;
  font-weight: 600;
}

.library-brand img {
  width: 34px;
  height: 34px;
}

.library-brand small {
  display: block;
  margin-top: 3px;
  color: #8a9482;
  font-size: 9px;
  font-weight: 400;
}

.sidebar-label {
  margin: 0 12px 10px;
  font-size: 9px;
  letter-spacing: 1px;
}

.library-sidebar button {
  min-height: 36px;
  gap: 9px;
  padding: 8px 11px;
  margin-bottom: 4px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #65715e;
  font-size: 11px;
}

.library-sidebar button:hover {
  background: #dfe6d766;
}

.library-sidebar button.active {
  background: #dce6d4;
  border-color: #cfdbc6;
  color: #344e32;
}

.nav-count {
  margin-left: auto;
  font-size: 9px;
  color: #7e8d73;
  font-variant-numeric: tabular-nums;
}

.library-sidebar .sidebar-bottom {
  padding: 15px 10px 2px;
  border-top: 1px solid #dce2d5;
}

.sidebar-bottom a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7a8670;
  font-size: 10px;
  text-decoration: none;
}

.sidebar-bottom a:hover {
  color: #36563b;
  text-decoration: underline;
}

.sidebar-bottom svg {
  width: 13px;
  height: 13px;
}

.library-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: #fafbf7;
}

.library-intro {
  flex-shrink: 0;
  padding: 21px 24px 0;
}

.library-breadcrumb {
  color: #88917f;
  font-size: 10px;
}

.library-breadcrumb span {
  padding: 0 8px;
  color: #b7bfaf;
}

.library-intro h2 {
  margin: 8px 0 0;
  font-family: inherit;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -.6px;
  line-height: 1.2;
}

.random-game {
  align-self: flex-end;
  white-space: nowrap;
}

.library-filters {
  flex-shrink: 0;
  gap: 16px;
  margin: 0;
  padding: 22px 24px 17px;
}

.library-filters .search-field {
  height: 35px;
  border-color: #d5dccd;
  border-radius: 4px;
  background: #fff;
  padding: 0 11px;
}

.library-filters .search-field:focus-within {
  border-color: #698363;
  box-shadow: 0 0 0 1px #698363;
}

.library-filters .search-field input {
  font-size: 11px;
}

.library-filters .search-field svg {
  width: 15px;
  height: 15px;
}

.library-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #87917e;
  font-size: 10px;
}

.library-filters select {
  height: 35px;
  padding: 0 25px 0 10px;
  border-color: #d5dccd;
  border-radius: 4px;
  background: #fff;
  color: #55624c;
  font-size: 10px;
}

.results-label {
  flex-shrink: 0;
  margin: 0;
  padding: 0 24px 13px;
  font-size: 10px;
  letter-spacing: 0;
  color: #7d8a71;
}

.library-collection {
  font-size: 9px;
  letter-spacing: 1px;
  color: #9da694;
}

.game-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(154px, 1fr));
  grid-auto-rows: max-content;
  gap: 18px 16px;
  padding: 0 24px 22px;
  scrollbar-width: thin;
  scrollbar-color: #c8d1bf transparent;
}

.game-card {
  align-self: start;
  border: 1px solid #dce3d3;
  border-radius: 5px;
  background: #fff;
  overflow: hidden;
  transition: border-color .15s, box-shadow .15s;
}

.game-card:hover,
.game-card:focus-within {
  border-color: #8fa582;
  box-shadow: 0 2px 6px #39533413;
}

.game-play {
  padding: 0 0 10px;
}

.game-cover {
  border: 0;
  border-bottom: 1px solid #e3e7dd;
  border-radius: 0;
  aspect-ratio: 4 / 3;
  background: #e9eee2;
}

.game-play:hover .game-cover {
  transform: none;
  box-shadow: none;
}

.game-play:hover .game-cover img {
  transform: none;
  filter: brightness(.9);
}

.game-launch {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid #ffffffe6;
  border-radius: 3px;
  background: #fffef5f5;
  color: #35513a;
  font-size: 10px;
  opacity: 0;
  transition: opacity .15s;
}

.game-launch svg {
  width: 13px;
  height: 13px;
}

.game-play:hover .game-launch,
.game-play:focus-visible .game-launch {
  opacity: 1;
}

.game-name {
  margin: 10px 11px 4px;
  color: #3b4835;
  font-size: 11px;
  font-weight: 600;
}

.game-author {
  margin: 0 11px;
  color: #8a9580;
  font-size: 9px;
}

.favorite-button {
  top: 8px;
  right: 8px;
  bottom: auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #ffffffa6;
  border-radius: 4px;
  background: #ffffffeb;
  color: #738065;
}

.favorite-button:hover {
  background: #fff;
  color: #96713a;
}

.favorite-button.selected {
  background: #fff7e7f2;
  border-color: #f4e0b7;
}

.library-empty {
  grid-column: 1 / -1;
  padding: 50px 15px;
  font-size: 12px;
}

.load-more {
  flex-shrink: 0;
  margin: 0 auto 12px;
}

.library-credit {
  flex-shrink: 0;
  padding: 9px 24px;
  margin: 0;
  border-top: 1px solid #e2e7d9;
  background: #f2f4ed;
  color: #8a9580;
  font-size: 9px;
  line-height: 1.5;
}

.browser-home {
  background: #f8f9f4;
}

.browser-home > img {
  width: 65px;
  height: 65px;
  animation: none;
}

.browser-home h2 {
  margin: 17px 0 27px;
  font-family: "Segoe UI", "DM Sans", sans-serif;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.7px;
}

.home-search {
  width: min(440px, 100%);
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 13px;
  border: 1px solid #cdd7c4;
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 2px 8px #334a2710;
}

.home-search > span {
  color: #86967b;
}

.home-search svg {
  width: 17px;
  height: 17px;
}

.home-search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 7px 0;
  border: 0;
  outline: 0;
  color: #43533c;
  background: transparent;
  font-size: 11px;
}

.home-search:focus-within {
  border-color: #6b8861;
}

.browser-shortcuts {
  margin-top: 32px;
}

.browser-shortcuts .app-art {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}

.browser-shortcuts .app-art img {
  width: 24px;
  height: 24px;
}

.browser-shortcuts .app-art.full img {
  width: 100%;
  height: 100%;
}

.browser-status[data-state=error] {
  background: #b2674d;
}

.browser-status[data-state=loading] {
  background: #b69a57;
}

@media (hover: none) {
  .game-launch {
    opacity: 1;
  }
}

@media (max-width: 850px) {
  .library-sidebar {
    width: 160px;
  }

  .library-sort > span {
    display: none;
  }
}

@media (max-width: 700px) {
  .library-sidebar {
    width: 50px;
    padding: 17px 5px 10px;
  }

  .library-brand {
    padding: 0 4px 23px;
  }

  .library-brand img {
    width: 30px;
    height: 30px;
  }

  .library-brand > div {
    display: none;
  }

  .library-sidebar button {
    padding: 10px;
  }

  .library-intro {
    padding: 20px 15px 0;
    gap: 10px;
  }

  .library-intro h2 {
    font-size: 23px;
  }

  .random-game {
    width: 31px;
    padding: 6px;
  }

  .random-game > span {
    display: none;
  }

  .library-filters {
    padding: 19px 15px 15px;
    gap: 7px;
  }

  .library-filters select {
    width: 91px;
    padding-left: 6px;
    padding-right: 10px;
    font-size: 9px;
  }

  .results-label {
    padding: 0 15px 12px;
  }

  .game-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 13px 10px;
    padding: 0 15px 18px;
  }

  .game-name {
    margin: 9px 8px 4px;
    font-size: 10px;
  }

  .game-author {
    margin: 0 8px;
    font-size: 8px;
  }

  .game-launch {
    left: 7px;
    bottom: 7px;
    padding: 4px 7px;
  }

  .favorite-button {
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
  }

  .library-credit {
    padding: 8px 15px;
    font-size: 8px;
  }

  .browser-home {
    padding: 20px;
  }

  .browser-home h2 {
    font-size: 25px;
  }
}
