﻿/* パワプロ12投稿選手パスワード TOP専用CSS */
:root {
  color-scheme: light;
  --blue: #2f65b3;
  --blue-dark: #214f91;
  --blue-deep: #173b70;
  --blue-light: #eaf2fc;
  --blue-pale: #f5f8fd;
  --accent: #e9a23b;
  --accent-pale: #fff3df;
  --text: #263448;
  --muted: #68778b;
  --line: #cbd6e4;
  --surface: #fff;
  --page: #f5f7fa;
  --radius: 5px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: Arial, "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 15px;
  line-height: 1.55;
}
a { color: #064db2; text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: #c36f12; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
img { max-width: 100%; height: auto; }

.site-shell {
  width: min(1240px, calc(100% - 28px));
  margin: 12px auto 30px;
}
.skip-link {
  position: absolute; left: 10px; top: -60px; z-index: 20;
  padding: 8px 12px; background: #fff; color: var(--blue-deep); border: 1px solid var(--line);
}
.skip-link:focus { top: 10px; }

.site-header {
  padding: 9px 14px 10px;
  background: var(--surface);
  border: 1px solid var(--blue-deep);
  border-bottom: 2px solid var(--blue);
}
.site-kicker {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.brand { display: inline-flex; align-items: center; max-width: 100%; margin: 0 0 1px; }
.brand img { display: block; width: min(431px, 100%); height: auto; }
.site-header h1 {
  margin: 0;
  color: var(--blue-deep);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.page-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 8px;
}
.site-nav {
  min-width: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--blue-deep);
}
.nav-group { display: flex; flex-direction: column; gap: 0; margin: 0 0 8px; }
.nav-group:last-child { margin-bottom: 0; }
.nav-heading {
  display: block;
  width: 100%;
  margin: 0 0 3px;
  padding: 3px 7px;
  color: #fff;
  background: var(--blue);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}
.nav-group a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  min-height: 25px;
  padding: 3px 5px;
  color: #064db2;
  background: #fff;
  border-bottom: 1px dotted #d8e0eb;
  font-size: 12.5px;
  line-height: 1.35;
  text-decoration: none;
}
.nav-group a::before { content: "›"; flex: 0 0 auto; color: #8397b4; font-weight: 700; }
.nav-group a:hover { color: var(--blue-deep); background: var(--blue-light); }
.nav-group a.current-link {
  color: var(--blue-deep);
  background: #e8f0fc;
  border-left: 3px solid var(--accent);
  font-weight: 700;
}
.must-read {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 0 4px;
  color: #8a4b00;
  background: var(--accent-pale);
  border: 1px solid #f1d3a7;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
}

main { min-width: 0; padding: 0; }
.search-panel {
  display: grid;
  padding: 9px 11px;
  background: #edf4fd;
  border: 1px solid #b8cbe4;
}
.search-copy h2 { margin: 0; color: var(--blue-deep); font-size: 14px; line-height: 1.4; }
.search-form { display: flex; align-items: center; gap: 7px; min-width: 0; }
.search-form input[type="text"] {
  flex: 1 1 180px; min-width: 0; min-height: 35px;
  padding: 5px 9px; color: var(--text); background: #fff;
  border: 1px solid #aebed2; border-radius: 3px; font: inherit;
}
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important; overflow: hidden !important;
  clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important;
}

.catalog { margin-top: 10px; }
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 9px;
}
.category-card {
  min-width: 0;
  padding: 0 10px 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #b9c7d9;
  border-radius: 3px;
}
.category-card--decision { grid-column: span 2; }
/* Requested semantic H3 with a filled background. */
.card-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
  justify-content: space-between;
  margin: 0 -10px 7px;
  padding: 7px 9px;
  color: #fff;
  background: var(--blue);
  border-left: 4px solid var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}
.category-count {
  flex: 0 0 auto;
  padding: 1px 6px;
  color: #754000;
  background: var(--accent-pale);
  border: 1px solid #f4d5a7;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.category-note { color: #eaf2ff; font-size: 11px; font-weight: 400; }
.link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.link-grid li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 4px;
  min-width: 0;
  min-height: 27px;
  padding: 3px 1px;
  border-bottom: 1px dotted #e0e5ed;
  font-size: 14px;
  line-height: 1.4;
}
.link-grid li a { overflow-wrap: anywhere; }
.link-grid li a::before { content: "›"; margin-right: 3px; color: #8297b4; font-weight: 700; }
.item-count { color: var(--muted); font-size: 11px; white-space: nowrap; }
.update-badge {
  display: inline-block; padding: 0 4px; color: #8a4b00; background: var(--accent-pale);
  border: 1px solid #f2d3a4; border-radius: 2px; font-size: 10px; font-weight: 700; line-height: 1.5;
}
.update-link { text-decoration: none; }
.related-link {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 8px; padding-top: 7px; border-top: 1px solid var(--line); font-size: 12px;
}
.direct-pages { margin-top: 8px; padding-top: 7px; border-top: 1px solid #e0e6ef; }
.direct-pages summary {
  display: flex; align-items: center; gap: 6px;
  min-height: 31px; padding: 5px 7px;
  color: var(--blue-deep); background: #eef4fc;
  border: 1px solid #d0dced; border-left: 3px solid var(--accent);
  font-size: 11.5px; font-weight: 700; line-height: 1.35;
  cursor: pointer; list-style: none;
}
.direct-pages summary::-webkit-details-marker { display: none; }
.direct-pages summary::before { content: "+"; color: #bd761e; font-size: 15px; font-weight: 800; }
.direct-pages[open] summary::before { content: "−"; }
.direct-page-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 4px;
  margin: 7px 0 0; padding: 0; list-style: none;
}
.direct-page-list li { min-width: 0; margin: 0; padding: 0; }
.direct-page-list a {
  display: flex; align-items: center; justify-content: center; min-height: 30px; padding: 4px;
  color: var(--blue-deep); background: #fff; border: 1px solid #d5dfeb;
  font-size: 11px; line-height: 1.3; text-align: center; text-decoration: none;
}
.direct-page-list a:hover { background: var(--accent-pale); border-color: #e7bd81; }

.ad-wrap { max-width: 100%; margin: 12px auto; text-align: center; overflow-x: auto; }
.adarea{padding:14px 0;}
.game-info-compact { margin-top: 12px; padding: 9px 11px; background: #fff; border: 1px solid var(--line); }
.game-info-compact .game-card { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.game-info-compact .game-title, .game-info-compact .game-card p { margin: 0; }
.game-info-compact .game-specs { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; }
.game-info-compact .game-specs div { display: flex; gap: 4px; }
.game-info-compact .game-specs dt { color: var(--muted); font-size: 12px; }
.game-info-compact .game-specs dd { margin: 0; font-size: 12px; }
.game-info-compact .game-card > h2 { flex-basis: 100%; margin: 0 0 3px; padding-bottom: 4px; color: var(--blue-deep); border-bottom: 1px solid var(--accent); font-size: 13px; }
.bottom-links {
  display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px;
  padding: 9px 11px; background: #edf3fb; border: 1px solid var(--line);
}
.bottom-links p { margin: 0; font-size: 16px; }
.promotion-card { margin-top: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); }
.promotion-card h2 { margin: 0; padding: 5px 9px; color: #fff; background: var(--blue); border-left: 4px solid var(--accent); font-size: 13px; }
.promotion-card p { margin: 0; padding: 9px; font-size: 14px; line-height: 1.6; }
.site-footer { padding: 14px 8px 0; color: var(--muted); text-align: center; font-size: 11px; }

@media (max-width: 820px) {
  .nav-heading { font-size: 12px; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .site-shell { width: calc(100% - 14px); margin: 7px auto 22px; }
  .site-header { padding: 7px 9px 8px; }
  .site-kicker { font-size: 10px; }
  .site-header h1 { font-size: 15px; }
  .page-layout { gap: 7px; margin-top: 7px; }
  .site-nav { grid-template-columns: 1fr 1fr; padding: 5px; gap: 5px; }
  .nav-heading { padding: 3px 5px; font-size: 11px; }
  .nav-group a { min-height: 27px; padding: 3px 4px; font-size: 11px; }
  
  .search-panel { padding: 7px; }
  
  .search-form input[type="text"] { min-height: 34px; font-size: 13px; }
  .catalog { margin-top: 7px; }
  .catalog-header { margin-bottom: 6px; padding: 5px 7px; }
.category-grid { grid-template-columns: 1fr; gap: 7px; }
  .category-card, .category-card--decision { grid-column: auto; padding: 0 8px 8px; }
  .card-heading { margin: 0 -8px 5px; padding: 6px 7px; font-size: 13px; }
  .link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px 7px; }
  .link-grid li { min-height: 29px; font-size: 13px; }
  .direct-pages { margin-top: 6px; padding-top: 6px; }
  .direct-pages summary { min-height: 30px; font-size: 11px; }
  .direct-page-list { grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); }
  .ad-wrap { margin: 8px auto; }
  .game-info-compact .game-card { gap: 4px 10px; }
  .bottom-links { margin-top: 8px; padding: 7px; }
  .promotion-card { margin-top: 8px; }
  .promotion-card p { padding: 7px; font-size: 12px; }
}
@media (max-width: 360px) {
  .site-nav { grid-template-columns: 1fr; }
  .nav-group--guide { grid-column: auto; }
  .search-form { grid-template-columns: 1fr; }
  .link-grid { grid-template-columns: 1fr; }
}

/* v5: PCは必ず「左ナビ＋右メイン」の2カラム。スマホのみ縦積み。 */
.site-shell {
  width: min(1100px, calc(100% - 28px));
  margin: 12px auto 30px;
}
.page-layout {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
.page-layout > .site-nav {
  display: block;
  flex: 0 0 180px;
  width: 180px;
  max-width: 180px;
  min-width: 180px;
}
.page-layout > main {
  display: block;
  flex: 1 1 0%;
  width: auto;
  min-width: 0;
  max-width: none;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 9px;
}

/* ノートPC程度の幅でも左ナビ＋右本文を維持 */
@media (max-width: 1060px) and (min-width: 761px) {
  .site-shell { width: calc(100% - 24px); }
  .page-layout { gap: 9px; }
  .page-layout > .site-nav {
    flex-basis: 162px;
    width: 162px;
    min-width: 162px;
    max-width: 162px;
  }

}

/* タブレット・スマホではナビを上へ移動 */
@media (max-width: 760px) {
  .site-shell { width: calc(100% - 16px); margin: 8px auto 22px; }
  .page-layout {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .page-layout > .site-nav {
    display: grid;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .page-layout > main { width: 100%; flex: 1 1 auto; }

}
@media (max-width: 560px) {
  .category-grid { grid-template-columns: 1fr; }
  .category-card--decision { grid-column: auto; }
}

/* v6: desktop keeps the familiar left rail and fully visible link groups */
.site-nav { display: flex; flex-direction: column; }
.nav-accordion { display: block; }
.nav-accordion > .nav-heading {
  display: block;
  pointer-events: none;
  cursor: default;
  list-style: none;
}
.nav-accordion > .nav-heading::-webkit-details-marker { display: none; }
.nav-group__links {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Mobile: three compact category toggles; each opens its own links panel. */
@media (max-width: 760px) {
  .page-layout > .site-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 6px;
    padding: 5px;
  }
  .site-nav .nav-accordion {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    border: 1px solid #b8cbe4;
    background: #fff;
  }
  .site-nav .nav-accordion > .nav-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 48px;
    margin: 0;
    padding: 6px 3px;
    color: #fff;
    background: var(--blue);
    border: 0;
    font-size: 11px;
    line-height: 1.35;
    text-align: center;
    pointer-events: auto;
    cursor: pointer;
    list-style: none;
  }
  .site-nav .nav-accordion > .nav-heading::-webkit-details-marker { display: none; }
  .site-nav .nav-accordion > .nav-heading::after {
    content: "+";
    flex: 0 0 auto;
    color: #ffe0ae;
    font-size: 15px;
    font-weight: 700;
  }
  .site-nav .nav-accordion[open] {
    grid-column: 1 / -1;
  }
  .site-nav .nav-accordion[open] > .nav-heading {
    justify-content: flex-start;
    min-height: 35px;
    padding: 6px 9px;
    border-bottom: 2px solid var(--accent);
    text-align: left;
  }
  .site-nav .nav-accordion[open] > .nav-heading::after {
    content: "−";
    margin-left: auto;
  }
  .site-nav .nav-accordion > .nav-group__links {
    display: none !important;
  }
  .site-nav .nav-accordion[open] > .nav-group__links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 8px;
    padding: 4px 7px 7px;
  }
  .site-nav .nav-accordion .nav-group__links a {
    min-width: 0;
    min-height: 31px;
    padding: 5px 4px;
    font-size: 12px;
  }
  .search-copy h2 { font-size: 13px; }

}
@media (max-width: 360px) {
  .site-nav .nav-accordion > .nav-heading { font-size: 10px; }
  .site-nav .nav-accordion[open] > .nav-group__links { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .site-nav .nav-accordion > .nav-heading {
    position: relative;
    padding-right: 14px;
    padding-left: 2px;
    font-size: 10px;
  }
  .site-nav .nav-accordion > .nav-heading::after {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
  }
}

/* v7: mobile navigation opens as an overlay, without pushing content down. */
@media (max-width: 760px) {
  .page-layout > .site-nav {
    position: relative;
    z-index: 30;
    overflow: visible;
  }
  .site-nav .nav-accordion {
    position: static;
    overflow: visible;
  }
  .site-nav .nav-accordion[open] {
    grid-column: auto;
  }
  .site-nav .nav-accordion[open] > .nav-group__links {
    position: absolute !important;
    top: calc(100% + 3px);
    left: 0;
    right: 0;
    z-index: 1000;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 10px;
    max-height: min(58vh, 420px);
    overflow-y: auto;
    padding: 7px 9px 9px;
    background: #fff;
    border: 1px solid #aebfd7;
    border-top: 3px solid var(--accent);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 8px 22px rgba(27, 49, 78, .22);
  }
  .page-layout > main {
    position: relative;
    z-index: 1;
  }
}

/* Search layout, right-side count, and compact category introduction. */
.search-panel {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 10px;
  min-width: 0;
}
.search-copy { grid-column: 1 / -1; grid-row: 1; min-width: 0; }
.search-copy h2 { white-space: nowrap; }
.site-search-wrap { grid-column: 1; grid-row: 2; }
.search-total { grid-column: 2; grid-row: 2; }
.search-total {
  justify-self: end;
  align-self: center;
  padding: 3px 7px;
  color: #52647a;
  background: #fff;
  border: 1px solid #d2deec;
  border-radius: 3px;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}
.search-total strong { margin-left: 3px; font-size: 12px; font-weight: 700; }

.catalog-header {
  margin: 0 0 8px;
  padding: 8px 10px 7px;
  background: #e7edf6;
  border-left: 4px solid var(--accent);
}
.catalog-notes {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #34445a;
  font-size: 14px;
  line-height: 1.5;
}
.catalog-notes li { margin: 0; }
.catalog-notes a { font-weight: 700; }

@media (max-width: 760px) {
  .search-panel { gap: 5px 8px; }
  .search-copy h2 { white-space: normal; }

  .search-total {
    font-size: 10px;
    padding: 3px 5px;
  }
  .search-total strong { font-size: 11px; }
  .catalog-header { padding: 7px 8px 6px; }
.catalog-notes { font-size: 12px; line-height: 1.45; }
}
@media (max-width: 360px) {
  .search-total { font-size: 9px; }
  .search-total strong { font-size: 10px; }
}

/* User-requested v9 typography and search row alignment. */
.site-nav .nav-group a {
  justify-content: flex-start;
  font-size: 13px !important;
}
/* Decision edition: muted red title bar, keeping the shared orange accent. */
.category-card--decision-theme > .card-heading {
  background: #ad454d;
  border-left-color: var(--accent);
}
.category-card--decision-theme > .card-heading .category-note {
  color: #fff0ec;
}

/* Custom site search form. */
.site-search-wrap {
  display: block;
  width: 100%;
  min-width: 0;
}
.search-form {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  margin: 0;
}
.search-form input[type="text"] {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  height: 38px;
  box-sizing: border-box;
}
.search-form input[type="submit"] {
  flex: 0 0 auto;
  height: 38px;
  padding: 0 14px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue-dark);
  border-radius: 3px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.search-form input[type="submit"]:hover {
  background: var(--blue-dark);
}

/* Emphasize the numeric count using the site's warm accent tone. */
.search-total strong {
  color: #a95700;
}





/* Category cards use two columns at intermediate widths. */
@media (max-width: 1080px) and (min-width: 561px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Main catalog title: clear hierarchy with the shared blue and orange palette. */
.catalog-title {
  margin: 0 0 8px;
  padding: 10px 13px;
  color: #fff;
  background: var(--blue-deep);
  border-left: 5px solid var(--accent);
  border-radius: 3px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
}
@media (max-width: 760px) {
  .catalog-title {
    margin-bottom: 6px;
    padding: 8px 10px;
    font-size: 18px;
  }
}

.catalog-title-note {
  font-size: .78em;
  font-weight: 600;
}

.site-search-wrap input[type="text"]::placeholder {
  color: #96a2b2;
  opacity: 1;
}

/* Desktop package card below the left navigation. */
.desktop-package-slot {
  margin-top: 10px;
  padding: 7px;
  text-align: center;
  background: #fff;
  border: 1px solid #b8cbe4;
  border-top: 3px solid var(--accent);
  border-radius: 2px;
}
.desktop-package-slot img {
  display: block;
  width: 100%;
  max-width: 160px;
  height: auto;
  margin: 0 auto;
}
@media (max-width: 820px) {
  .desktop-package-slot { display: none; }
}


/* p11gpass: green heading backgrounds; the decision-edition heading keeps its existing color. */
body.p11-theme .catalog-title {
  background-color: #286b3b;
}
body.p11-theme .category-card:not(.category-card--decision-theme) > .card-heading {
  background-color: #00ae57;
}
