:root {
  --outer-blue: #016bb1;
  --header-blue: #55cbf3;
  --center-blue: #55cbf3;
  --rail-blue: #e1eff6;
  --border-blue: #077fb1;
  --link-blue: #0000cc;
  --menu-blue: #000080;
  --pink: #ff12d0;
  --violet: #6600cc;
}

* { box-sizing: border-box; }
html { min-width: 1000px; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: auto;
  background: var(--outer-blue) url('../../original/images/home.jpg') repeat-x top left;
  color: #000;
  font-family: "Times New Roman", Times, serif;
}

a { cursor: pointer; }
img { border: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-canvas { width: 986px; margin: 0 auto; }

.masthead {
  width: 980px;
  height: 96px;
  margin: 0 auto;
  background: var(--header-blue);
}

.masthead-row {
  display: grid;
  grid-template-columns: 240px 729px 11px;
  width: 980px;
  height: 86px;
  align-items: center;
}

.logo-link {
  display: block;
  width: 210px;
  height: 86px;
  margin-left: 10px;
}

.logo-link img { display: block; }

.tagline {
  margin: 0;
  color: var(--link-blue);
  font: 700 14px Arial, Helvetica, sans-serif;
  text-align: center;
}

.tagline a { color: inherit; text-decoration: underline; }

.masthead-cap { align-self: stretch; background: url('../../original/images/fond.gif') repeat-y top left; }
.masthead-divider { height: 10px; background: url('../../original/images/fond.gif') repeat-x top left; }

.content-table {
  display: grid;
  grid-template-columns: 196px 600px 190px;
  width: 986px;
  min-height: 1101px;
}

.left-rail,
.right-rail { min-height: 1101px; background: var(--rail-blue); }

.left-rail {
  position: relative;
  padding-top: 18px;
  text-align: center;
}

.top-box {
  width: 170px;
  height: 194px;
  margin: 0 auto;
  border: 1px solid var(--border-blue);
  background: #fde6fd;
}

.panel-title { display: block; width: 150px; height: 15px; margin: 0 auto; }

.top-list { list-style: none; margin: 2px 1px 0; padding: 0; }

.top-list li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 29px;
  align-items: center;
  height: 15.5px;
  text-align: left;
  color: var(--pink);
  font: 700 8pt Arial, Helvetica, sans-serif;
}

.top-list li img { justify-self: center; }
.top-list a { color: var(--pink); text-decoration: none; white-space: nowrap; }
.top-list a:hover { text-decoration: underline; }
.top-list span { color: var(--violet); text-align: center; }

.top-100 {
  display: block;
  height: 14px;
  color: var(--violet);
  font: italic 700 11px Arial, Helvetica, sans-serif;
  line-height: 14px;
  text-decoration: none;
}

.top-100:hover { text-decoration: underline; }

.menu-box {
  width: 196px;
  height: 402px;
  margin: 33px auto 0;
  border: 1px solid var(--border-blue);
  background: #fff;
  text-align: center;
}

.search-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  height: 29px;
}

.search-form input {
  width: 126px;
  height: 19px;
  padding: 1px 2px;
  border: 2px inset #eee;
  background: #fff;
  font: 12px Arial, Helvetica, sans-serif;
}

.search-form input::placeholder {
  color: #a6a6a6;
  font: 9px Arial, Helvetica, sans-serif;
  opacity: 1;
}

.search-form button {
  min-width: 28px;
  height: 20px;
  padding: 0 3px;
  border: 2px outset buttonface;
  color: #000;
  font: 11px Arial, Helvetica, sans-serif;
  line-height: 14px;
}

.left-tools { margin-top: 18px; }
.category-menu { margin-top: 18px; }

.menu-row {
  width: 140px;
  height: 25px;
  margin: 0 auto;
  text-align: left;
}

.menu-line { display: flex; align-items: center; gap: 9px; height: 18px; }

.menu-line a {
  color: var(--menu-blue);
  font: 700 8pt Arial, Helvetica, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}

.menu-line a:hover { text-decoration: underline; }
.dotted-line { display: block; }

.affiliate-banners {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
}

.affiliate-banners img { display: block; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 140px);
  grid-auto-rows: 260px;
  align-content: start;
  justify-content: center;
  gap: 6px 7px;
  min-height: 1101px;
  padding: 21px 6px 13px;
  background: var(--center-blue);
}

.category-18, .category-1, .category-2, .category-3 { grid-row: 1; }
.category-21 { grid-column: 1; grid-row: 2; }
.category-20 { grid-column: 2; grid-row: 2; }
.category-10 { grid-column: 1; grid-row: 3; }
.category-11 { grid-column: 2; grid-row: 3; }
.category-9 { grid-column: 3; grid-row: 3; }
.category-12 { grid-column: 4; grid-row: 3; }
.category-7 { grid-column: 1; grid-row: 4; }
.category-14 { grid-column: 2; grid-row: 4; }
.category-5 { grid-column: 3; grid-row: 4; }
.category-22 { grid-column: 4; grid-row: 4; }

.home-intro {
  grid-column: 3 / 5;
  grid-row: 2;
  width: 274px;
  margin: 42px 6px 0 0;
  color: #000;
  font: 12px/17px Arial, Helvetica, sans-serif;
}

.category-card {
  position: relative;
  width: 140px;
  height: 260px;
  overflow: hidden;
  background-position: left top;
  background-repeat: no-repeat;
  text-align: left;
}

.category-heading {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  width: 140px;
  height: 32px;
  background: url('../../original/jeux/categorie/fond_titre.gif') repeat-x top left;
}

.category-heading img { display: block; }

.category-title,
.category-count,
.game-link {
  color: var(--link-blue);
  font: 700 11px Arial, Helvetica, sans-serif;
  text-decoration: none;
}

.category-title { padding-left: 1px; white-space: nowrap; }
.category-count { padding-right: 4px; }
.category-title:hover,
.game-link:hover { text-decoration: underline; }

.game-list { list-style: none; margin: 18px 0 0 3px; padding: 0; }
.game-list li { height: 15.6px; line-height: 15.6px; white-space: nowrap; }
.new-dash { color: var(--link-blue); font: 700 11px Arial, Helvetica, sans-serif; }
.new-label { color: #faef1f; font: 700 11px Arial, Helvetica, sans-serif; }

.more-link {
  position: absolute;
  right: 4px;
  bottom: 6px;
  color: #f400c4;
  font: italic 700 11px Arial, Helvetica, sans-serif;
  text-decoration: none;
}

.more-link:hover { text-decoration: underline; }

.right-rail { padding-top: 18px; text-align: center; }

.right-search {
  width: 190px;
  height: 46px;
  border: 1px solid var(--border-blue);
  background: #caeafd;
}

.search-form-compact { height: 29px; }
.search-form-compact input { width: 126px; }

.skyscraper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 120px;
  height: 600px;
  margin: 18px auto 0;
  border: 1px solid #bdd9ea;
  background: rgba(255, 255, 255, 0.3);
  color: #8aaec4;
  font: 700 10px Arial, Helvetica, sans-serif;
  letter-spacing: 1px;
}

.skyscraper small { margin-top: 5px; font: 9px Arial, Helvetica, sans-serif; letter-spacing: 0; }

.footer-links {
  width: 980px;
  min-height: 50px;
  margin: 6px auto 0;
  padding: 14px 4px 11px;
  border-top: 6px solid var(--header-blue);
  border-bottom: 6px solid var(--header-blue);
  background: var(--rail-blue);
  box-shadow: inset 0 1px 0 var(--border-blue), inset 0 -1px 0 var(--border-blue);
  text-align: center;
  white-space: nowrap;
}

.footer-links a {
  margin-right: 3px;
  color: var(--menu-blue);
  font: 8pt Arial, Helvetica, sans-serif;
  text-decoration: none;
}

.footer-links a:hover { text-decoration: underline; }

.all-games-link {
  color: #ff12d0 !important;
  font-weight: 700 !important;
}

.library-overlay {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(0, 44, 87, 0.82);
  font-family: Arial, Helvetica, sans-serif;
}

.library-window {
  display: flex;
  flex-direction: column;
  width: min(900px, calc(100vw - 56px));
  height: min(700px, calc(100vh - 56px));
  min-width: 760px;
  min-height: 560px;
  overflow: hidden;
  border: 3px solid #fff;
  outline: 2px solid #077fb1;
  background: #e1eff6;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
}

.library-titlebar {
  display: flex;
  flex: 0 0 34px;
  justify-content: space-between;
  align-items: center;
  padding-left: 12px;
  background: linear-gradient(#75d8fa, #2cb7e8);
  border-bottom: 1px solid #077fb1;
  color: #000080;
  font-size: 13px;
}

.library-titlebar button {
  width: 36px;
  height: 32px;
  border: 0;
  border-left: 1px solid #077fb1;
  background: #fde6fd;
  color: #6600cc;
  font: 700 24px/28px Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.catalog-view,
.player-view {
  min-height: 0;
  flex: 1 1 auto;
}

.catalog-view { display: flex; flex-direction: column; padding: 14px; }

.catalog-intro {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  align-items: center;
  gap: 8px 12px;
}

.catalog-intro p {
  grid-column: 1 / -1;
  margin: 0 0 2px;
  color: #000080;
  font-size: 12px;
}

.catalog-intro label {
  color: #000080;
  font-size: 11px;
  font-weight: 700;
}

.catalog-intro input {
  height: 30px;
  padding: 4px 8px;
  border: 1px solid #077fb1;
  background: #fff;
  color: #000;
  font: 13px Arial, Helvetica, sans-serif;
}

.result-count {
  margin: 10px 0 6px;
  color: #6600cc;
  font-size: 10px;
  font-weight: 700;
}

.game-catalog {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  min-height: 0;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #77b5d7;
  background: #caeafd;
}

.catalog-game {
  min-height: 48px;
  padding: 6px 8px;
  overflow: hidden;
  border: 1px solid #8ec9e8;
  background: #f8fdff;
  color: #0000cc;
  text-align: left;
  cursor: pointer;
}

.catalog-game:hover,
.catalog-game:focus-visible {
  border-color: #ff12d0;
  background: #fde6fd;
}

.catalog-game span {
  display: block;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-game small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #567;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-status {
  margin: 30px auto;
  color: #6600cc;
  font-size: 12px;
  text-align: center;
}

.player-view { display: flex; flex-direction: column; padding: 10px; }

.player-toolbar {
  display: flex;
  flex: 0 0 30px;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  color: #000080;
  font-size: 10px;
}

.player-toolbar button {
  height: 24px;
  border: 1px solid #077fb1;
  background: #fff;
  color: #0000cc;
  font: 700 10px Arial, Helvetica, sans-serif;
  cursor: pointer;
}

.player-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #077fb1;
  background: #111;
}

.ruffle-container,
.ruffle-player { width: 100%; height: 100%; }

.player-message {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(520px, calc(100% - 50px));
  margin: 0;
  padding: 14px;
  transform: translate(-50%, -50%);
  border: 1px solid #77b5d7;
  background: rgba(225, 239, 246, 0.94);
  color: #000080;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

.compatibility-note {
  flex: 0 0 auto;
  margin: 7px 0 0;
  color: #456;
  font-size: 9px;
  text-align: center;
}

.subpage-content-table {
  display: grid;
  grid-template-columns: 170px 626px 190px;
  width: 986px;
  min-height: 920px;
}

.subpage-left,
.subpage-right {
  min-height: 920px;
  background: var(--rail-blue);
  text-align: center;
}

.subpage-left { padding-top: 18px; }
.subpage-right { padding-top: 18px; }

.subpage-search-panel {
  width: 168px;
  height: 46px;
  margin: 0 auto 18px;
  border: 1px solid var(--border-blue);
  background: #caeafd;
}

.subpage-category-menu {
  width: 168px;
  padding: 10px 0;
  border: 1px solid var(--border-blue);
  background: #fff;
}

.subpage-category-menu .menu-row { height: 25px; }
.subpage-left .affiliate-banners { margin-top: 18px; }

.subpage-main {
  min-height: 920px;
  padding: 10px 6px 24px;
  background: var(--center-blue);
}

.subpage-right .right-search { width: 190px; }

.retro-breadcrumb {
  height: 22px;
  padding: 4px 7px;
  overflow: hidden;
  color: #000080;
  font: 10px Arial, Helvetica, sans-serif;
  white-space: nowrap;
}

.retro-breadcrumb a { color: #000080; }

.game-detail-panel {
  width: 614px;
  margin: 0 auto;
  border: 1px solid var(--border-blue);
  background: #e1eff6;
}

.game-detail-title {
  display: flex;
  height: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 0 9px;
  background: url('../../original/jeux/categorie/fond_titre.gif') repeat-x;
  color: #0000cc;
  font-family: Arial, Helvetica, sans-serif;
}

.game-detail-title h1 { margin: 0; font-size: 15px; }
.game-detail-title span { font-size: 10px; font-weight: 700; }

.game-player-shell {
  width: 613px;
  height: 418px;
  overflow: hidden;
  border-top: 1px solid #077fb1;
  border-bottom: 1px solid #077fb1;
  background: #111;
}

.game-player-shell .player-stage { width: 613px; height: 418px; border: 0; }

.game-actions {
  display: flex;
  height: 35px;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border-bottom: 1px solid #8ec9e8;
  color: #6600cc;
  font: 10px Arial, Helvetica, sans-serif;
}

.game-actions button {
  border: 1px solid #077fb1;
  background: #fff;
  color: #000080;
  font: 700 10px Arial, Helvetica, sans-serif;
}

.game-actions strong { color: #ff12d0; font-size: 13px; letter-spacing: 1px; }

.game-description { padding: 9px 11px 12px; font-family: Arial, Helvetica, sans-serif; }
.game-description h2 { margin: 0 0 5px; color: #000080; font-size: 13px; }
.game-description p { margin: 4px 0; color: #234; font-size: 10px; line-height: 1.45; }
.game-description .archive-file { color: #6600cc; font-style: italic; }

.related-games {
  width: 614px;
  margin: 10px auto 0;
  border: 1px solid var(--border-blue);
  background: #caeafd;
}

.related-games h2,
.search-page-panel > header,
.category-page-panel > header {
  margin: 0;
  background: linear-gradient(#75d8fa, #2cb7e8);
  color: #000080;
  font-family: Arial, Helvetica, sans-serif;
}

.related-games h2 { padding: 5px 8px; font-size: 12px; }
.related-games > div { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; padding: 7px; }
.related-games a { padding: 6px; background: #fff; color: #0000cc; font: 700 10px Arial, Helvetica, sans-serif; text-decoration: none; }
.related-games a:hover { color: #ff12d0; text-decoration: underline; }

.search-page-panel,
.category-page-panel {
  width: 614px;
  min-height: 820px;
  margin: 0 auto;
  border: 1px solid var(--border-blue);
  background: #e1eff6;
  font-family: Arial, Helvetica, sans-serif;
}

.search-page-panel > header { height: 32px; padding: 7px 10px; }
.search-page-panel > header h1 { margin: 0; font-size: 14px; }

.search-page-form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #8ec9e8;
  background: #caeafd;
  color: #000080;
  font-size: 10px;
  font-weight: 700;
}

.search-page-form input { height: 25px; border: 1px solid #077fb1; background: #fff; font: 12px Arial, Helvetica, sans-serif; }
.search-page-form span { color: #6600cc; font-size: 9px; }

.search-results-list { padding: 6px; }
.search-results-list article,
.category-page-list article {
  display: grid;
  grid-template-columns: 24px 1fr 54px;
  min-height: 48px;
  align-items: center;
  border-bottom: 1px dotted #8aaec4;
  background: rgba(255, 255, 255, 0.56);
}

.search-results-list article:nth-child(even),
.category-page-list article:nth-child(even) { background: #caeafd; }

.search-result-number,
.category-page-list article > span { color: #ff12d0; font-size: 11px; font-weight: 700; text-align: center; }
.search-results-list article div,
.category-page-list article div { min-width: 0; padding: 4px; }
.search-results-list article div > a,
.category-page-list article div > a { display: inline-block; color: #0000cc; font-size: 11px; font-weight: 700; text-decoration: none; }
.search-results-list article div > a:hover,
.category-page-list article div > a:hover { text-decoration: underline; }
.search-results-list small,
.category-page-list small { display: block; margin-top: 3px; color: #567; font-size: 9px; }

.play-result {
  justify-self: center;
  padding: 4px 7px;
  border: 1px solid #077fb1;
  background: #fff;
  color: #6600cc;
  font-size: 10px;
  font-weight: 700;
  text-decoration: none;
}

.empty-results { padding: 30px; color: #6600cc; font-size: 11px; text-align: center; }

.category-page-panel {
  min-height: 760px;
  background-position: right top;
  background-repeat: no-repeat;
}

.category-page-panel > header {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  height: 32px;
  align-items: center;
}

.category-page-panel > header h1 { margin: 0 0 0 6px; font-size: 14px; }
.category-page-panel > header strong { margin-right: 9px; font-size: 11px; }
.category-page-intro { margin: 0; padding: 12px; color: #000080; font-size: 10px; line-height: 1.5; }
.category-page-list { margin: 0 10px 12px; border: 1px solid #8ec9e8; background: #fff; }
.category-page-list em { margin-left: 5px; color: #faef1f; font-size: 10px; font-weight: 700; }
.category-all-link { display: block; margin: 0 10px 12px; color: #f400c4; font: italic 700 11px Arial, Helvetica, sans-serif; text-align: right; }

.legacy-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 0 10px 10px;
  padding: 7px;
  border: 1px solid #8ec9e8;
  background: #caeafd;
  font: 700 10px Arial, Helvetica, sans-serif;
}

.legacy-pagination a,
.legacy-pagination strong {
  display: inline-grid;
  min-width: 23px;
  height: 21px;
  place-items: center;
  padding: 0 5px;
  border: 1px solid #077fb1;
  background: #fff;
  color: #0000cc;
  text-decoration: none;
}

.legacy-pagination a:hover { background: #fde6fd; color: #f400c4; }
.legacy-pagination strong { border-color: #6600cc; background: #ff12d0; color: #fff; }
.legacy-pagination .pagination-direction { padding: 0 9px; }
.pagination-gap { color: #6600cc; }

/* Fiche historique jeux.php et vote */
.legacy-game-page { background: #55cbf3; min-height: 740px; padding-bottom: 10px; }
.legacy-game-page .game-detail-panel { width: 613px; margin: 0 auto; }
.legacy-game-page .game-detail-title { height: 34px; }
.legacy-game-page .game-detail-title h1 { line-height: 34px; }
.legacy-player {
  width: 613px;
  height: 418px;
  overflow: hidden;
  background: #34518e;
  color: #fff;
  font: 12px Arial, Helvetica, sans-serif;
}
.legacy-player ruffle-player { width: 613px; height: 418px; display: block; }
.player-unavailable { display: grid; height: 100%; place-items: center; text-align: center; padding: 30px; }
.legacy-tools {
  display: grid;
  grid-template-columns: 155px 1fr 110px;
  min-height: 34px;
  align-items: center;
  border: 1px solid #64a9c8;
  border-top: 0;
  background: #e1eff6;
  color: #000080;
  font: 11px Arial, Helvetica, sans-serif;
}
.favorite-link { padding-left: 9px; color: #000080; text-decoration: underline; }
.rating-box { display: flex; align-items: center; gap: 5px; }
.rating-stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; }
.rating-stars button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #b6b6b6;
  cursor: pointer;
  font: 21px/20px Arial, sans-serif;
  padding: 0 1px;
}
.rating-stars button.is-on,
.rating-stars button:hover,
.rating-stars button:hover ~ button { color: #ff18cc; }
.rating-message { min-width: 115px; color: #6600cc; font-weight: bold; }
.rating-summary { color: #6600cc; font-weight: bold; text-align: center; }
.game-info-table { width: 613px; border-collapse: collapse; margin: 7px auto 0; background: #fff; font: 11px Arial, Helvetica, sans-serif; }
.game-info-table th { width: 115px; padding: 4px 7px; border: 1px solid #80b4cc; background: #e1eff6; color: #000080; text-align: left; }
.game-info-table td { padding: 4px 7px; border: 1px solid #80b4cc; color: #333; }
.share-strip { width: 613px; margin: 7px auto; padding: 6px 8px; border: 1px solid #077fb1; background: #fff; color: #000080; font: 11px Arial, sans-serif; }
.notice { margin: 10px; padding: 8px; border: 1px solid #077fb1; background: #fff; color: #000080; font: 11px Arial, sans-serif; }
.php-search-form { display: flex; }
.php-search-form input { min-width: 0; flex: 1; }
.search-page-form form { display: flex; gap: 5px; width: 100%; }
.search-page-form form input { flex: 1; }
.search-page-form form button { width: 42px; }

.vote-page-panel { min-height: 760px; padding-bottom: 10px; background: #55cbf3; }
.vote-page-title { display: flex; height: 34px; align-items: center; gap: 12px; padding: 0 9px; background: url('../../original/jeux/categorie/fond_titre.gif') repeat-x; }
.vote-page-title img { width: 150px; height: 15px; }
.vote-page-title h1 { margin: 0; color: #000080; font: 700 14px Arial, Helvetica, sans-serif; }
.vote-page-intro { margin: 0; padding: 10px 12px; color: #000080; font: 11px/1.4 Arial, Helvetica, sans-serif; }
.vote-ranking-list { margin: 0 9px; border: 1px solid #077fb1; background: #fff; }
.vote-ranking-list article { display: grid; grid-template-columns: 30px minmax(0, 1fr) 90px 38px 55px; min-height: 31px; align-items: center; border-bottom: 1px dotted #8aaec4; font: 10px Arial, Helvetica, sans-serif; }
.vote-ranking-list article:nth-child(even) { background: #d9f1fd; }
.vote-rank { color: #ff12d0; font-weight: 700; text-align: center; }
.vote-game-name { overflow: hidden; color: #0000cc; font-weight: 700; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.vote-game-name:hover { color: #ff12d0; text-decoration: underline; }
.vote-bar { display: block; width: 82px; height: 7px; border: 1px solid #8a8a8a; background: #eee; }
.vote-bar i { display: block; height: 100%; background: #ff12d0; }
.vote-ranking-list strong { color: #6600cc; text-align: center; }
.vote-ranking-list small { color: #5a6980; text-align: center; }

.game-preview-tooltip {
  position: absolute;
  z-index: 9999;
  display: none;
  width: 232px;
  padding: 5px;
  border: 1px solid #004f87;
  background: #e1eff6;
  box-shadow: 2px 3px 6px rgba(0, 38, 70, .48);
  color: #000080;
  font: 10px Arial, Helvetica, sans-serif;
  pointer-events: none;
}
.game-preview-tooltip.is-visible { display: block; }
.game-preview-header { min-height: 20px; padding: 4px 6px; background: #55cbf3; color: #000080; font-weight: 700; }
.game-preview-stage { display: grid; width: 220px; height: 146px; place-items: center; overflow: hidden; border: 1px solid #077fb1; background: #34518e; color: #fff; }
.game-preview-stage img { display: block; width: 220px; height: 146px; object-fit: cover; }
.game-preview-footer { display: flex; justify-content: space-between; padding: 4px 3px 0; color: #6600cc; font-weight: 700; }

.footer-links { position: relative; }
.footer-navigation { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 0 7px; }
.developer-credit { position: absolute; right: 8px; bottom: 1px; color: #6b8190; font: 8px Arial, Helvetica, sans-serif; }
.developer-credit a { color: #405f78; text-decoration: none; }
.developer-credit a:hover { text-decoration: underline; }

@media (max-width: 999px) {
  html { min-width: 0; }

  body { overflow-x: hidden; }

  .site-canvas {
    width: calc(100% - 14px);
    margin-right: 7px;
    margin-left: 7px;
  }

  .masthead,
  .masthead-row,
  .footer-links { width: 100%; }

  .masthead-row { grid-template-columns: 220px minmax(0, 1fr) 11px; }

  .content-table {
    grid-template-columns: 180px minmax(0, 1fr);
    width: 100%;
  }

  .left-rail { min-width: 0; }
  .right-rail,
  .subpage-right { display: none; }

  .categories-grid {
    grid-template-columns: repeat(4, minmax(0, 140px));
    justify-content: space-evenly;
    gap: 6px 3px;
  }

  .subpage-content-table {
    grid-template-columns: 160px minmax(0, 1fr);
    width: 100%;
  }

  .subpage-left,
  .subpage-main { min-width: 0; }

  .search-page-panel,
  .category-page-panel,
  .legacy-game-page .game-detail-panel,
  .related-games,
  .game-info-table,
  .share-strip { width: 100%; }

  .legacy-player {
    width: 100%;
    height: auto;
    aspect-ratio: 613 / 418;
  }

  .legacy-player ruffle-player { width: 100% !important; height: 100% !important; }
  .game-detail-title h1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .footer-links { white-space: normal; }
  .developer-credit { position: static; display: block; margin-top: 7px; }

  .library-window {
    width: calc(100vw - 28px);
    min-width: 0;
    height: calc(100vh - 28px);
    min-height: 0;
  }
}

@media (max-width: 760px) {
  .masthead { height: 70px; }

  .masthead-row {
    grid-template-columns: 160px minmax(0, 1fr) 7px;
    height: 62px;
  }

  .logo-link {
    width: 150px;
    height: 62px;
    margin-left: 5px;
  }

  .logo-link img { width: 150px; height: 62px; object-fit: contain; }
  .tagline { padding: 0 5px; font-size: 11px; line-height: 14px; }
  .masthead-divider { height: 8px; }

  .content-table,
  .subpage-content-table { display: block; min-height: 0; }

  .left-rail {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 10px;
    min-height: 0;
    padding: 10px;
    text-align: center;
  }

  .left-tools { margin-top: 0; }
  .left-rail .category-menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 7px; margin-top: 8px; }
  .left-rail .menu-row { width: auto; }
  .left-rail .dotted-line { width: 100%; }
  .left-rail > .affiliate-banners { grid-column: 1 / -1; flex-direction: row; justify-content: center; }

  .categories-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 260px;
    gap: 6px;
    min-height: 0;
    padding: 10px 6px 13px;
  }

  .category-card {
    grid-column: auto !important;
    grid-row: auto !important;
    width: 100%;
    background-color: #caeafd;
  }

  .category-heading { width: 100%; }
  .home-intro { grid-column: 1 / -1; grid-row: auto; width: auto; margin: 8px; }

  .subpage-left {
    min-height: 0;
    padding: 8px;
  }

  .subpage-search-panel { width: 100%; }
  .subpage-search-panel .search-form { width: 100%; max-width: 340px; margin: 0 auto; padding: 0 3px; }
  .subpage-category-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    margin: 8px auto 0;
    padding: 6px;
  }

  .subpage-category-menu .menu-row,
  .subpage-category-menu .menu-line { min-width: 0; width: auto; }
  .subpage-category-menu .menu-line { gap: 5px; }
  .subpage-category-menu .menu-line a { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .subpage-category-menu .dotted-line { width: 100%; }
  .subpage-left .affiliate-banners { display: none; }
  .subpage-main { min-height: 0; padding: 7px 5px 18px; }

  .retro-breadcrumb { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .search-page-form { grid-template-columns: 1fr auto; }
  .search-page-form label { grid-column: 1 / -1; }
  .search-page-form span { display: none; }

  .legacy-tools { grid-template-columns: 125px minmax(0, 1fr); }
  .rating-summary { display: none; }
  .rating-message { min-width: 0; }

  .vote-ranking-list article { grid-template-columns: 28px minmax(0, 1fr) 82px 35px; }
  .vote-ranking-list article small { display: none; }

  .library-overlay { padding: 14px; }
  .game-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .masthead-row { grid-template-columns: 135px minmax(0, 1fr) 6px; }
  .logo-link { width: 130px; margin-left: 2px; }
  .logo-link img { width: 130px; }
  .tagline { padding-right: 1px; padding-left: 1px; font-size: 9px; line-height: 12px; }

  .left-rail {
    grid-template-columns: 1fr;
    padding: 8px 5px;
  }

  .top-box { grid-column: 1; }
  .left-rail > .affiliate-banners { grid-column: 1; }
  .left-rail .category-menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .affiliate-banners { margin-top: 4px; }

  .category-page-list { margin-right: 5px; margin-left: 5px; }
  .category-page-list article { grid-template-columns: 25px minmax(0, 1fr); padding: 3px 0; }
  .category-page-list .play-result { grid-column: 2; justify-self: start; margin: 0 0 4px 4px; }
  .category-page-panel > header h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .category-page-panel > header strong { white-space: nowrap; }
  .legacy-pagination { margin-right: 5px; margin-left: 5px; }
  .legacy-pagination .pagination-direction { flex-basis: 42%; }

  .legacy-tools { grid-template-columns: 1fr; padding: 5px 8px; gap: 4px; }
  .favorite-link { padding-left: 0; }
  .game-info-table th { width: 88px; }

  .vote-ranking-list { margin-right: 4px; margin-left: 4px; }
  .vote-ranking-list article { grid-template-columns: 25px minmax(0, 1fr) 36px; }
  .vote-bar { display: none; }

  .catalog-intro { grid-template-columns: 1fr; }
  .catalog-intro p { grid-column: 1; }
  .game-catalog { grid-template-columns: 1fr; }
}
