:root {
  color-scheme: light;
  --bg: #fffdf2;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #68625c;
  --line: #e8e0d2;
  --yellow: #f1ff00;
  --green: #19b85d;
  --red: #ef483e;
  --pink: #ff4cc2;
  --black: #111111;
  --shadow: 0 20px 60px rgba(27, 20, 10, 0.13);
  --custom-font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --hero-title-size: 64px;
  --section-title-size: 36px;
  --body-text-size: 17px;
  --card-title-size: 17px;
  --hero-logo-x: 50%;
  --hero-logo-y: 0px;
  --hero-logo-width: 90%;
  --hero-guide-x: 50%;
  --hero-guide-y: 0px;
  --hero-guide-width: 74%;
  --hero-copy-x: 0px;
  --hero-copy-y: 0px;
  --about-image-x: 0px;
  --about-image-y: 0px;
  --about-image-width: 220px;
  --stats-bg-image: none;
}

/* ===== Design presets: public/design-config.js の値で切り替え ===== */
body.theme-mint {
  --bg: #f3fff7;
  --paper: #ffffff;
  --ink: #102018;
  --muted: #617268;
  --line: #cfe7d8;
  --yellow: #dfff55;
  --green: #12b66a;
  --pink: #6ee7c8;
  --black: #102018;
  --shadow: 0 20px 56px rgba(18, 75, 50, 0.14);
}

body.theme-mono {
  --bg: #f7f7f2;
  --paper: #ffffff;
  --ink: #111111;
  --muted: #666666;
  --line: #dddddd;
  --yellow: #ffffff;
  --green: #111111;
  --pink: #111111;
  --black: #111111;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.11);
}

body.theme-night {
  color-scheme: dark;
  --bg: #07080d;
  --paper: #11131c;
  --ink: #f7f7fb;
  --muted: #aeb4c4;
  --line: #303444;
  --yellow: #eaff00;
  --green: #39ff9a;
  --pink: #ff4cc2;
  --black: #f7f7fb;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

body.theme-night .site-header,
body.theme-night .hero__copy,
body.theme-night .section,
body.theme-night .about,
body.theme-night .stats article,
body.theme-night .summary-panel,
body.theme-night .summary-item,
body.theme-night .table-wrap,
body.theme-night .arrival-table tr {
  background: rgba(17, 19, 28, 0.94);
}

body.theme-night .latest-card {
  background:
    radial-gradient(circle at top right, rgba(255, 76, 194, 0.18), transparent 9rem),
    linear-gradient(180deg, #151925, #10131d);
}

body.theme-night .button,
body.theme-night input,
body.theme-night select,
body.theme-night .view-toggle,
body.theme-night .month-tabs button {
  background: #151925;
  color: var(--ink);
}

body.theme-night .table-link,
body.theme-night .latest-card a,
body.theme-night .latest-card__link {
  background: var(--yellow);
  color: #111;
}

body.bg-clean {
  background: linear-gradient(180deg, var(--bg), #fff);
}

body.bg-clean .site-bg {
  display: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  font-family: var(--custom-font-family);
  background:
    radial-gradient(circle at 12% 4%, rgba(241, 255, 0, 0.72), transparent 23rem),
    radial-gradient(circle at 92% 2%, rgba(255, 76, 194, 0.18), transparent 28rem),
    radial-gradient(circle at 72% 38%, rgba(25, 184, 93, 0.12), transparent 22rem),
    linear-gradient(180deg, #fffef5, #fff9e7 48%, #fffdf7);
  color: var(--ink);
  min-height: 100vh;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.dot-grid {
  position: absolute;
  inset: 0;
  opacity: 0.28;
  background-image: radial-gradient(rgba(17, 17, 17, 0.18) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
}

.bolt {
  position: absolute;
  width: 56vw;
  height: 4px;
  background: linear-gradient(90deg, transparent, #fff, var(--pink), #fff, transparent);
  filter: drop-shadow(0 0 14px rgba(255, 76, 194, 0.5));
  transform: rotate(-8deg);
  opacity: 0.7;
}

.bolt::before,
.bolt::after {
  content: "";
  position: absolute;
  width: 28%;
  height: 3px;
  background: inherit;
  transform-origin: left center;
}

.bolt::before {
  left: 30%;
  top: -18px;
  transform: rotate(24deg);
}

.bolt::after {
  left: 58%;
  top: 16px;
  transform: rotate(-28deg);
}

.bolt--one {
  top: 120px;
  left: -8vw;
}

.bolt--two {
  right: -16vw;
  top: 46vh;
  transform: rotate(10deg);
  opacity: 0.45;
}

a {
  color: inherit;
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 12px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 28px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68)),
    linear-gradient(90deg, rgba(241, 255, 0, 0.22), rgba(255, 76, 194, 0.12));
  backdrop-filter: blur(18px) saturate(1.15);
  box-shadow: 0 12px 34px rgba(17, 17, 17, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--black);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 38%, rgba(255,255,255,.7), transparent 48%),
    var(--yellow);
  color: var(--black);
  overflow: hidden;
  box-shadow: 4px 4px 0 var(--black);
}

.brand__mark img {
  display: block;
  width: 118%;
  height: 118%;
  object-fit: cover;
  object-position: center 44%;
}

.brand strong,
.brand small {
  display: block;
  white-space: nowrap;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  white-space: nowrap;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
}

.nav a:hover {
  background: #f4f0e8;
}

.site-header .header-stats {
  flex: 1 1 auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow-x: auto;
}

.site-header .stats-tab {
  flex: 0 0 176px;
  min-width: 176px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--tab-color, var(--yellow)) 76%, #fff), rgba(255, 255, 255, 0.86)),
    var(--stats-bg-image) center / cover no-repeat,
    #fff;
  padding: 8px 12px 9px;
  box-shadow: 3px 3px 0 var(--black);
  overflow: visible;
}

.site-header .stats-tab:nth-child(1) {
  --tab-color: var(--yellow);
}

.site-header .stats-tab:nth-child(2) {
  --tab-color: #74ff94;
}

.site-header .stats-tab:nth-child(3) {
  --tab-color: #ffd1ef;
  flex-basis: 230px;
  min-width: 230px;
}

.site-header .stats-tab::before {
  display: none;
}

.site-header .stats-tab__value {
  margin: 0;
  font-size: clamp(16px, 1.65vw, 22px);
  line-height: 1;
  white-space: nowrap;
  letter-spacing: -0.04em;
}

.site-header .stats-tab__label {
  margin: 2px 0 0;
  font-size: 10px;
  line-height: 1.1;
  white-space: nowrap;
}

.top-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.top-stats .stats-tab {
  min-width: 0;
  border: 2px solid var(--black);
  border-radius: 22px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--tab-color, var(--yellow)) 76%, #fff), rgba(255, 255, 255, 0.88)),
    var(--stats-bg-image) center / cover no-repeat,
    #fff;
  padding: 14px 16px 16px;
  box-shadow: 4px 4px 0 var(--black);
}

.top-stats .stats-tab:nth-child(1) {
  --tab-color: #8fdcff;
}

.top-stats .stats-tab:nth-child(2) {
  --tab-color: var(--yellow);
}

.top-stats .stats-tab:nth-child(3) {
  --tab-color: #74ff94;
}

.top-stats .stats-tab:nth-child(4) {
  --tab-color: #ffd1ef;
}

.top-stats .stats-tab::before {
  display: none;
}

.top-stats .stats-tab__value {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 0.95;
  letter-spacing: -0.05em;
  white-space: nowrap;
}

.top-stats .stats-tab__label {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
    border-radius: 24px;
  }

  .site-header .header-stats {
    order: 3;
    flex-basis: 100%;
    justify-content: flex-start;
    padding-top: 4px;
  }

  .site-header .stats-tab {
    flex-basis: 132px;
  }
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.92fr);
  gap: 28px;
  align-items: stretch;
  padding: 42px 0 22px;
}

body.layout-visual-left .hero {
  grid-template-columns: minmax(360px, 0.92fr) minmax(0, 1fr);
}

body.layout-visual-left .hero__visual {
  order: -1;
}

body.layout-center .hero {
  grid-template-columns: 1fr;
}

body.layout-center .hero__copy {
  text-align: center;
}

body.layout-center .hero__actions {
  justify-content: center;
}

body.layout-center .hero__visual {
  min-height: 560px;
}

.popular-nav {
  position: relative;
  overflow: hidden;
  margin: 42px 0 22px;
  border: 2px solid var(--black);
  border-radius: 34px;
  background:
    radial-gradient(circle at 88% 4%, rgba(241, 255, 0, 0.62), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 253, 225, 0.9));
  box-shadow: 8px 8px 0 var(--black);
  padding: clamp(22px, 4vw, 42px);
}

.popular-nav::before {
  content: "POPULAR";
  position: absolute;
  right: -18px;
  top: -22px;
  color: rgba(17, 17, 17, 0.055);
  font-size: clamp(76px, 12vw, 168px);
  font-weight: 1000;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.popular-nav > * {
  position: relative;
  z-index: 20;
}

.popular-nav__head {
  max-width: 760px;
  margin-bottom: 22px;
}

.popular-nav__head h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 54px);
  letter-spacing: -0.06em;
  line-height: 1.02;
}

.popular-nav__head p:last-child {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: clamp(14px, 1.7vw, 17px);
  font-weight: 700;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.popular-card {
  --card-accent: var(--yellow);
  display: grid;
  gap: 8px;
  min-height: 128px;
  border: 2px solid var(--black);
  border-radius: 24px;
  background:
    linear-gradient(90deg, var(--card-accent) 0 10px, transparent 10px),
    linear-gradient(135deg, #fff, #fffdf1);
  color: var(--ink);
  padding: 18px 18px 18px 24px;
  text-decoration: none;
  box-shadow: 5px 5px 0 var(--black);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.popular-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--black);
}

.popular-card span {
  justify-self: start;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--card-accent);
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

.popular-card strong {
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.18;
}

.popular-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.popular-card--hot {
  --card-accent: var(--yellow);
}

.popular-card--pokemon {
  --card-accent: #38d9ff;
}

.popular-card--onepiece {
  --card-accent: #ff8a00;
}

.popular-card--dragonball {
  --card-accent: #ff4d4d;
}

.popular-card--lorcana {
  --card-accent: #9b5cff;
}

.popular-card--yugioh {
  --card-accent: #4f7cff;
}

.popular-card--other {
  --card-accent: #74ff94;
}

body.layout-compact .hero {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.72fr);
  gap: 18px;
  padding-top: 26px;
}

body.layout-compact .hero__visual {
  min-height: 420px;
}

body.layout-compact .hero__guide {
  width: min(70%, 360px);
}

.hero__copy,
.hero__visual,
.section,
.about,
.stats article {
  border: 2px solid var(--black);
  background: var(--paper);
  box-shadow: var(--shadow);
}

body.density-compact .hero__copy,
body.density-compact .section,
body.density-compact .about {
  padding: clamp(18px, 3vw, 26px);
}

body.density-compact .latest-card {
  min-height: 205px;
  padding: 14px;
}

body.density-compact .stats article,
body.density-compact .summary-panel {
  padding: 14px;
}

body.density-compact .arrival-table th,
body.density-compact .arrival-table td {
  padding: 10px 12px;
}

body.corners-soft .site-header,
body.corners-soft .hero__copy,
body.corners-soft .hero__visual,
body.corners-soft .section,
body.corners-soft .about {
  border-radius: 22px;
}

body.corners-soft .latest-card,
body.corners-soft .summary-panel,
body.corners-soft .table-wrap {
  border-radius: 16px;
}

body.corners-square .site-header,
body.corners-square .hero__copy,
body.corners-square .hero__visual,
body.corners-square .section,
body.corners-square .about,
body.corners-square .latest-card,
body.corners-square .summary-panel,
body.corners-square .table-wrap,
body.corners-square .summary-item {
  border-radius: 8px;
}

.hero__copy {
  position: relative;
  overflow: hidden;
  border-radius: 34px;
  padding: clamp(28px, 5vw, 58px);
  transform: translate(var(--hero-copy-x), var(--hero-copy-y));
}

.hero__copy::after {
  content: "";
  position: absolute;
  inset: auto -70px -90px auto;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--yellow);
  opacity: 0.72;
  z-index: 0;
}

.hero__copy > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 18px;
  font-size: clamp(28px, 7vw, var(--hero-title-size));
  line-height: 0.95;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(20px, 4vw, var(--section-title-size));
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.lead,
.section-note,
.about p,
.status,
footer {
  color: var(--muted);
}

.lead {
  max-width: 680px;
  font-size: var(--body-text-size);
  line-height: 1.9;
}

.hero__actions,
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  color: var(--black);
  padding: 12px 18px;
  text-decoration: none;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--black);
}

.button--primary {
  background: var(--yellow);
}

.button--small {
  min-height: 40px;
  padding: 10px 14px;
  box-shadow: 3px 3px 0 var(--black);
}

.hero__visual {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 64%, rgba(255, 255, 255, 0.92), transparent 0 28%, transparent 46%),
    linear-gradient(135deg, rgba(255, 76, 194, 0.22), transparent 35%),
    linear-gradient(180deg, rgba(241, 255, 0, 0.98), rgba(241, 255, 0, 0.78)),
    #f1ff00;
}

.hero__visual::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px dashed rgba(17, 17, 17, 0.24);
  border-radius: 26px;
}

.hero__visual::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 68%;
  height: 40px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.18);
  filter: blur(8px);
  transform: translateX(-50%);
}

.hero__logo {
  position: absolute;
  top: calc(18px + var(--hero-logo-y));
  left: var(--hero-logo-x);
  width: min(var(--hero-logo-width), 720px);
  transform: translateX(-50%);
  opacity: 0.92;
  filter: drop-shadow(8px 10px 0 rgba(0, 0, 0, 0.16));
}

.hero__guide {
  position: absolute;
  left: var(--hero-guide-x);
  bottom: calc(-10px + var(--hero-guide-y));
  z-index: 2;
  width: min(var(--hero-guide-width), 520px);
  max-height: 88%;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 24px 22px rgba(0, 0, 0, 0.28));
}

.signal-panel {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 2px;
  min-width: 145px;
  border: 2px solid var(--black);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 14px;
  box-shadow: 6px 6px 0 var(--black);
  transform: rotate(-4deg);
}

.signal-panel span {
  color: var(--green);
  font-size: 10px;
  font-weight: 1000;
  letter-spacing: 0.12em;
}

.signal-panel strong {
  font-size: 18px;
  line-height: 1.1;
}

.signal-panel--new {
  top: 128px;
  left: 22px;
  background: #fff;
}

.signal-panel--time {
  right: 22px;
  bottom: 88px;
  background: #111;
  color: #fff;
  transform: rotate(5deg);
}

.signal-panel--time span {
  color: var(--yellow);
}

.stats {
  position: relative;
  display: flex;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 6px 0 22px;
  padding: 10px 10px 0;
  border: 2px solid var(--black);
  border-bottom: 0;
  border-radius: 24px 24px 0 0;
  background: linear-gradient(90deg, rgba(241, 255, 0, 0.36), rgba(255, 255, 255, 0.82));
  box-shadow: 0 10px 34px rgba(17, 17, 17, 0.08);
  overflow-x: auto;
  scrollbar-width: none;
}

.stats::-webkit-scrollbar {
  display: none;
}

.stats article {
  position: relative;
  flex: 1 0 220px;
  min-width: 0;
  border: 2px solid var(--black);
  border-bottom-width: 3px;
  border-radius: 20px 20px 0 0;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.72)),
    var(--stats-bg-image) center / cover no-repeat,
    rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  padding: 16px 20px 18px;
  box-shadow: 4px -2px 0 rgba(17, 17, 17, 0.12);
  overflow: hidden;
}

.stats article::before {
  content: "";
  position: absolute;
  inset: 8px 10px auto;
  height: 4px;
  border-radius: 999px;
  background: var(--yellow);
  opacity: 0.95;
}

@media (min-width: 641px) {
  .top-stats {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .top-stats .stats-tab {
    border-radius: 22px;
    border-bottom-width: 2px;
    box-shadow: 4px 4px 0 var(--black);
  }

  .top-stats .stats-tab::before {
    display: none;
  }
}

.stats-tab__value,
.stats span {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 6px;
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 1000;
  line-height: 1;
}

.stats-tab__label,
.stats p {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 700;
}

.section,
.about {
  border-radius: 30px;
  padding: clamp(20px, 4vw, 34px);
  margin: 20px 0;
}

.section--latest {
  position: relative;
  overflow: visible;
  background:
    linear-gradient(135deg, rgba(241, 255, 0, 0.36), transparent 38%),
    linear-gradient(180deg, #fff, #fffdf1);
}

.section--latest::before {
  content: "NEW NEW NEW";
  position: absolute;
  top: 12px;
  right: -18px;
  color: rgba(17, 17, 17, 0.055);
  font-size: clamp(46px, 10vw, 120px);
  font-weight: 1000;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.section--latest > * {
  position: relative;
  z-index: 1;
}

.section--lotteries {
  background:
    url("/assets/vivivi-lottery-draw.png?v=lottery-mascot-5") 50% -140px / 660px auto no-repeat,
    linear-gradient(135deg, rgba(25, 184, 93, 0.14), transparent 36%),
    linear-gradient(180deg, #fff, #fffdf1);
}

.section--lotteries[hidden] {
  display: none;
}

.section__head--compact {
  align-items: flex-start;
  margin-bottom: 10px;
}

.section--lotteries .section__head--compact {
  position: relative;
  display: grid;
  grid-template-columns: minmax(190px, 0.28fr) minmax(0, 1fr);
  gap: 10px;
}

.lottery-mascot {
  display: none;
}

.section--lotteries .lottery-head__title,
.section--lotteries .lottery-filters {
  position: relative;
  z-index: 1;
}

.lottery-head__title h2 {
  margin-bottom: 6px;
}

.lottery-head__title .status {
  margin: 0;
}

.lottery-filters {
  display: grid;
  grid-template-columns: repeat(2, 119px);
  gap: 8px;
  margin: 0;
  align-self: start;
  justify-content: end;
  padding-top: 0;
}

.lottery-filters select {
  box-sizing: border-box;
  width: 100%;
  height: 32px;
  min-height: 32px;
  border-width: 2px;
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--black);
  padding: 0 20px 0 8px;
  font-size: 9px;
}

.lottery-sort-tabs {
  display: contents;
}

.lottery-sort-tabs button {
  box-sizing: border-box;
  height: 32px;
  min-height: 32px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  box-shadow: 3px 3px 0 var(--black);
  font: inherit;
  font-size: 9px;
  font-weight: 1000;
  cursor: pointer;
}

@media (max-width: 980px) {
  .section--lotteries {
    background:
      url("/assets/vivivi-lottery-draw.png?v=lottery-mascot-8") 50% 170px / 360px auto no-repeat,
      linear-gradient(135deg, rgba(25, 184, 93, 0.14), transparent 36%),
      linear-gradient(180deg, #fff, #fffdf1);
  }

  .lottery-mascot {
    display: none;
  }

  .section--lotteries .section__head--compact {
    grid-template-columns: minmax(165px, 0.46fr) minmax(0, 1fr);
  }

  .lottery-filters {
    grid-template-columns: repeat(2, 119px);
  }

  .lottery-sort-tabs {
    display: contents;
  }

  .lottery-list {
    grid-template-columns: 1fr;
    max-height: 1120px;
  }
}

@media (max-width: 860px) {
  .lottery-filters {
    grid-template-columns: repeat(2, 119px);
  }
}

@media (min-width: 641px) and (max-width: 980px) {
  .section--lotteries {
    background:
      url("/assets/vivivi-lottery-draw.png?v=lottery-mascot-10") 50% -100px / 560px auto no-repeat,
      linear-gradient(135deg, rgba(25, 184, 93, 0.14), transparent 36%),
      linear-gradient(180deg, #fff, #fffdf1);
  }

  .lottery-item {
    background: rgba(255, 255, 255, 0.72);
  }

  .lottery-item.is-last-opened {
    background:
      linear-gradient(90deg, rgba(255, 75, 200, 0.1), transparent 42%),
      rgba(255, 255, 255, 0.78);
  }
}

/* スマホ幅から戻した直後も、ブランドとタブ列の幅計算を安定させる */
@media (min-width: 641px) {
  .site-header {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: center;
  }

  .site-header > .nav {
    grid-column: 2;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
    overflow-x: auto;
  }
}

@media (max-width: 359px) {
  .section--lotteries .section__head--compact {
    grid-template-columns: 1fr;
  }
}

.lottery-sort-tabs button.is-active {
  background: var(--yellow);
  color: #111;
}

.lottery-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  max-height: 600px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 8px 10px 2px;
  -webkit-overflow-scrolling: touch;
}

.lottery-list::-webkit-scrollbar {
  width: 8px;
}

.lottery-list::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 17, 0.34);
  border-radius: 999px;
}

.lottery-item {
  position: relative;
  width: 100%;
  height: 138px;
  min-height: 138px;
  min-width: 0;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "meta"
    "title"
    "shop"
    "actions";
  grid-template-rows: 34px 29px 14px 29px;
  align-items: center;
  gap: 3px 7px;
  border: 2px solid var(--black);
  border-left: 10px solid var(--green);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 4px 4px 0 var(--black);
  padding: 8px 9px;
}

.product-thumb.lottery-item__thumb {
  position: absolute;
  z-index: 0;
  top: 8px;
  left: 8px;
  width: 76px;
  height: 92px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 1;
  pointer-events: none;
}

.product-thumb.lottery-item__thumb img {
  object-fit: contain;
  object-position: left top;
  background: transparent;
}

.product-thumb.lottery-item__thumb.is-fallback {
  display: none;
}

.lottery-item > :not(.lottery-item__thumb):not(.lottery-new-ribbon) {
  position: relative;
  z-index: 1;
}

.lottery-item__thumb span {
  font-size: 8px;
  text-align: center;
}

.lottery-item.is-last-opened {
  border-color: #ff4bc8;
  border-left-color: #ff4bc8;
  background:
    linear-gradient(90deg, rgba(255, 75, 200, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.92);
}

.new-ribbon.lottery-new-ribbon {
  top: -6px;
  left: -4px;
  z-index: 2;
  border-width: 1.5px;
  padding: 2px 7px;
  box-shadow: 2px 2px 0 var(--black);
  font-size: 9px;
}

.lottery-item:has(.lottery-new-ribbon) {
  padding-top: 8px;
  padding-bottom: 8px;
}

.lottery-item__meta {
  display: grid;
  justify-items: end;
  align-content: start;
  gap: 3px;
}

.lottery-item__meta {
  grid-area: meta;
  padding-left: 80px;
  max-height: 36px;
  color: var(--muted);
  min-width: 0;
  overflow: hidden;
  font-size: 10px;
  font-weight: 900;
}

.lottery-item__game-row,
.lottery-item__area-row {
  display: flex;
  justify-content: flex-end;
  gap: 3px;
  min-width: 0;
}

.lottery-actions {
  grid-area: actions;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.lottery-dates {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 1000;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
}

.lottery-dates .lottery-deadline {
  font-size: 8px;
}

.lottery-game,
.lottery-region,
.lottery-prefecture,
.lottery-deadline,
.lottery-method {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1.5px solid var(--black);
  border-radius: 999px;
  background: var(--yellow);
  color: var(--black);
  padding: 2px 6px;
  font-size: 8px;
  font-weight: 1000;
  line-height: 1.1;
  flex: 0 0 auto;
  white-space: nowrap;
  writing-mode: horizontal-tb;
}

.lottery-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 0;
  justify-content: flex-end;
}

.lottery-method {
  background: #fff;
  font-size: 9px;
  padding-inline: 5px;
}

.lottery-region {
  background: #fff;
}

.lottery-deadline {
  border-color: #f34b45;
  background: #f34b45;
  color: #fff;
}

.lottery-item h3,
.lottery-item p {
  min-width: 0;
  margin: 0;
}

.lottery-item h3 {
  grid-area: title;
  display: -webkit-box;
  overflow: hidden;
  font-size: clamp(10px, 0.8vw, 12px);
  line-height: 1.1;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.lottery-item h3,
.lottery-item p {
  padding-left: 80px;
}

.lottery-item p {
  grid-area: shop;
  overflow: hidden;
  color: var(--muted);
  font-weight: 800;
  font-size: 10px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lottery-link {
  flex: none;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  padding: 5px 7px;
  text-decoration: none;
  font-size: 9px;
  white-space: nowrap;
  font-weight: 1000;
}

@media (max-width: 980px) {
  .lottery-filters {
    grid-template-columns: repeat(2, 119px);
    gap: 7px;
    grid-column: auto;
    padding-top: 0;
  }

  .section--lotteries .section__head--compact {
    grid-template-columns: minmax(165px, 0.46fr) minmax(0, 1fr);
    gap: 8px;
  }

  .lottery-filters select {
    box-sizing: border-box;
    height: 32px;
    min-height: 32px;
    padding-block: 0;
    font-size: 10px;
    padding-inline: 8px 20px;
  }

  .lottery-sort-tabs button {
    box-sizing: border-box;
    height: 32px;
    min-height: 32px;
    font-size: 9px;
  }

  .lottery-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 600px;
  }

  .lottery-item {
    height: 138px;
    min-height: 138px;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "meta"
      "title"
      "shop"
      "actions";
    grid-template-rows: 34px 24px 12px 32px;
    gap: 3px 5px;
    padding: 8px 7px;
  }

  .product-thumb.lottery-item__thumb {
    top: 8px;
    left: 6px;
    width: 58px;
    height: 82px;
  }

  .lottery-item h3 {
    font-size: 11px;
    line-height: 1.1;
    -webkit-line-clamp: 2;
  }

  .lottery-item p {
    font-size: 10px;
    line-height: 1.2;
  }

  .new-ribbon.lottery-new-ribbon {
    top: -6px;
    left: -4px;
  }

  .lottery-item:has(.lottery-new-ribbon) {
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .lottery-item__meta {
    padding-left: 62px;
    align-content: start;
    flex-wrap: wrap;
    gap: 2px 3px;
    min-width: 0;
    max-height: 34px;
    overflow: hidden;
    scrollbar-width: none;
  }

  .lottery-item h3,
  .lottery-item p {
    padding-left: 62px;
  }

  .lottery-actions {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3px;
  }

  .lottery-dates {
    justify-self: start;
    align-self: center;
    text-align: left;
  }

  .lottery-methods {
    flex: 0 1 auto;
    min-width: 0;
  }

  .lottery-link {
    padding: 5px 6px;
    font-size: 9px;
    white-space: nowrap;
  }

  .lottery-item__meta::-webkit-scrollbar {
    display: none;
  }

  .lottery-game,
  .lottery-region,
  .lottery-prefecture,
  .lottery-deadline {
    flex: 0 0 auto;
    padding: 2px 4px;
    border-width: 1.5px;
    font-size: 8px;
  }

  .lottery-dates {
    font-size: 10px;
  }

  .lottery-link {
    justify-self: end;
  }

  .lottery-method {
    padding: 2px 4px;
    border-width: 1.5px;
    font-size: 8px;
  }
}

@media (max-width: 640px) {
  .lottery-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* タブレット以上: ヘッダーのタブ列を右端で収める */
@media (min-width: 641px) {
  .site-header > .nav {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    margin-left: auto;
    justify-content: flex-end;
  }
}

/* スマホからタブレットへ切り替わる幅だけ、ヘッダーを1段で安定させる */
@media (min-width: 641px) and (max-width: 980px) {
  .site-header {
    flex-wrap: nowrap;
  }

  .site-header > .nav {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: calc(100% - 150px) !important;
    min-width: 0 !important;
    overflow-x: auto;
    justify-content: flex-end !important;
  }
}

/* タブレットのカレンダーヘッダーを左右に整理する */
@media (min-width: 641px) and (max-width: 1400px) {
  .section--table .section__head--wrap {
    grid-template-columns: minmax(330px, 360px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 22px;
    row-gap: 12px;
  }

  .section--table .monthly-title {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 8px;
    width: 100%;
  }

  .section--table .monthly-title .eyebrow,
  .section--table .monthly-title h2,
  .section--table .monthly-title .view-toggle {
    grid-column: 1;
  }

  .section--table .monthly-title .eyebrow {
    grid-row: 1;
  }

  .section--table .monthly-title .view-toggle {
    grid-row: 2;
    width: 100%;
  }

  .section--table .monthly-title h2 {
    grid-row: 3;
    margin: 0;
  }

  .calendar-controls {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(5, 115px);
    gap: 8px;
    align-items: start;
    justify-content: end;
    width: 100%;
  }

  .calendar-controls .filters,
  .calendar-controls .site-check-actions {
    display: contents;
  }

  .calendar-controls select,
  .calendar-controls .site-check-actions button {
    width: 115px;
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .section--table .site-check-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .calendar-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .calendar-controls .filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .calendar-controls .filters select {
    width: 100%;
  }

  .calendar-controls .site-check-actions {
    display: flex;
    width: 100%;
    margin-left: 0;
    gap: 8px;
  }

  .calendar-controls .site-check-actions button {
    flex: 1;
  }

  .section--table .monthly-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0;
  }

  .section--table .monthly-title .eyebrow {
    grid-column: 1 / -1;
  }

  .section--table .monthly-title h2 {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    line-height: 1;
  }

  .section--table .monthly-title .view-toggle {
    grid-column: 2;
    grid-row: 2;
    width: 180px;
    height: 42px;
    min-height: 0;
    box-sizing: border-box;
  }

  .section--table .monthly-title .view-toggle button {
    height: 100%;
    min-height: 0;
    padding: 0 10px;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }

  .calendar-view .calendar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 8px;
  }

  .calendar-view .calendar-head__text {
    grid-column: 1;
    min-width: 0;
  }

  .calendar-view .calendar-nav {
    grid-column: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: min(180px, 48vw);
  }

  .calendar-view .calendar-nav button {
    min-width: 0;
    min-height: 42px;
    padding: 8px 6px;
    white-space: nowrap;
  }
}

@media (min-width: 641px) and (max-width: 1400px) {
  .calendar-view .calendar-head {
    grid-template-columns: minmax(0, 1fr) auto auto !important;
  }

  .calendar-view .calendar-head .view-toggle {
    grid-column: 2 !important;
    justify-self: end !important;
  }

  .calendar-view .calendar-head .calendar-nav {
    grid-column: 3 !important;
    justify-self: end !important;
  }
}

@media (min-width: 641px) and (max-width: 1400px) {
  .calendar-cell {
    position: relative;
  }

  .calendar-date {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    padding: 8px 10px;
    align-items: flex-start;
    pointer-events: none;
  }

  .calendar-date strong {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(17, 17, 17, 0.13);
    font-size: clamp(46px, 5vw, 82px);
    line-height: 1;
  }

  .calendar-date strong small {
    display: none;
  }

  .calendar-date span {
    position: relative;
    z-index: 2;
    margin-left: auto;
  }

  .calendar-events {
    position: relative;
    z-index: 2;
    margin-top: 2px;
  }

  .calendar-event {
    grid-template-columns: 34px minmax(0, 1fr);
    grid-template-rows: 34px;
    align-items: center;
  }

  .calendar-event__thumb {
    grid-column: 1;
    grid-row: 1;
  }

  .calendar-event__meta {
    grid-column: 2;
    grid-row: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
  }
}

/* スマホ以外は曜日を隠し、日付をカード背景いっぱいにする */
@media (min-width: 641px) {
  .calendar-cell {
    position: relative;
  }

  .calendar-date {
    position: absolute;
    inset: 0;
    z-index: 0;
    margin: 0;
    padding: 8px 10px;
    pointer-events: none;
  }

  .calendar-date strong {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(17, 17, 17, 0.13);
    font-size: clamp(46px, 5vw, 82px);
    line-height: 1;
  }

  .calendar-date strong small {
    display: none !important;
  }

  .calendar-date span {
    position: absolute !important;
    top: 8px;
    right: 8px;
    z-index: 3;
    margin: 0;
  }

  .calendar-events {
    position: relative;
    z-index: 2;
  }
}

@media (min-width: 641px) and (max-width: 1400px) {
  /* 切り替えは緑のタイトル下、5つの操作は右側で1行固定 */
  .section--table .monthly-title .view-toggle {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    justify-self: start;
  }

  .calendar-controls {
    grid-template-columns: repeat(5, 95px);
    gap: 8px;
    min-width: 0;
  }

  .calendar-controls select,
  .calendar-controls .site-check-actions button {
    width: 95px;
    min-width: 0;
    min-height: 42px;
    padding: 7px 6px;
    font-size: 12px;
    white-space: nowrap;
  }

  .calendar-cell .calendar-date strong,
  .calendar-cell.is-sunday .calendar-date strong,
  .calendar-cell.is-holiday .calendar-date strong,
  .calendar-cell.is-saturday .calendar-date strong {
    color: rgba(17, 17, 17, 0.3) !important;
  }

  .calendar-head {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .calendar-head .view-toggle {
    justify-self: end;
  }

  .calendar-head .calendar-nav {
    justify-self: end;
  }
}

@media (max-width: 359px) {
  .section--lotteries .section__head--compact {
    grid-template-columns: 1fr;
  }

  .lottery-filters {
    grid-column: 1 / -1;
  }
}

.latest-mascot {
  position: absolute;
  top: 48px;
  right: 170px;
  z-index: auto;
  display: block;
  width: 94px;
  height: 99px;
  pointer-events: none;
}

.latest-mascot__body,
.latest-mascot__hands {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.94;
  transform: rotate(-2deg);
  filter: drop-shadow(4px 6px 0 rgba(17, 17, 17, 0.14));
}

.latest-mascot__body {
  z-index: 0;
}

.latest-mascot__hands {
  z-index: 30;
}

.section--summary {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(25, 184, 93, 0.14), transparent 18rem),
    linear-gradient(180deg, #fff, #fffdf4);
}

.summary-thinking-mascot {
  position: absolute;
  top: 18px;
  right: 34px;
  z-index: 0;
  width: clamp(120px, 12vw, 190px);
  height: auto;
  opacity: 0.92;
  pointer-events: none;
  filter: drop-shadow(7px 9px 0 rgba(17, 17, 17, 0.12));
  transform: rotate(4deg);
}

.summary-note-break {
  display: none;
}

.section--summary > *:not(.summary-thinking-mascot) {
  position: relative;
  z-index: 1;
}

.summary-month-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 14px;
}

.summary-game-filter {
  width: 180px;
  min-height: 38px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 6px 34px 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 1000;
  box-shadow: 2px 2px 0 var(--black);
}

.summary-month-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-month-tabs button {
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 6px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--black);
}

.summary-month-tabs button[data-summary-month="recent3"] {
  background: var(--yellow);
}

.summary-month-tabs button.is-active {
  background: var(--green);
  color: #fff;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 18px;
}

.summary-panel {
  display: flex;
  flex-direction: column;
  border: 2px solid var(--black);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 6px 6px 0 var(--black);
  padding: 18px;
  min-width: 0;
  min-height: 0;
}

.summary-panel__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.summary-panel__head h3 {
  margin: 0;
  font-size: 24px;
}

.summary-panel__head span {
  color: var(--green);
  font-size: 12px;
  font-weight: 1000;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.summary-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: var(--summary-list-max-height, none);
  overflow-y: auto;
  padding-right: 4px;
}

.summary-list--items {
  flex: 0 1 auto;
  min-height: 0;
  max-height: var(--summary-list-max-height, clamp(520px, 58vh, 760px));
}

.summary-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 2px solid var(--black);
  border-radius: 18px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  padding: 12px;
  transition: transform 160ms ease, background 160ms ease;
}

.summary-item:hover {
  transform: translateX(3px);
  background: #fffde1;
}

.summary-item__media {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 2px solid var(--black);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  box-shadow: 3px 3px 0 var(--black);
}

.summary-item__media img {
  display: block;
  width: 86%;
  height: 86%;
  object-fit: contain;
  background: #fff;
}

.summary-item__media b {
  display: none;
  color: var(--black);
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: -0.04em;
}

.summary-item__media.is-fallback {
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.9), transparent 35%),
    linear-gradient(135deg, var(--yellow), #fffbd2);
}

.summary-item__media.is-fallback b {
  display: block;
}

.summary-item__body {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.summary-item__title {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.summary-item__title strong {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.summary-item__title b {
  flex: 0 0 auto;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--yellow);
  padding: 2px 7px;
  color: var(--black);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
}

.summary-item__body small {
  color: var(--muted);
  line-height: 1.5;
}

.section__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}

.section__head--wrap {
  align-items: flex-start;
}

.section--table {
  position: relative;
  overflow: visible;
}

.section--table .section__head--wrap {
  align-items: flex-start;
  gap: 22px;
}

.monthly-title {
  position: relative;
  flex: 0 0 210px;
  padding-right: 0;
}

.monthly-title h2 {
  white-space: nowrap;
  margin-bottom: 18px;
}

.section--table .filters {
  flex: 0 0 250px;
  display: grid;
  grid-template-columns: 1fr;
  align-content: start;
  gap: 8px;
}

.section--table .filters select {
  width: 100%;
  min-width: 0;
}

.section--table .filters #product-filter {
  grid-column: auto;
}

.section--table .view-toggle {
  width: fit-content;
}

.monthly-check-mascot {
  position: absolute;
  right: 0;
  bottom: -4px;
  z-index: 2;
  display: block;
  width: 110px;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(5px 7px 0 rgba(17, 17, 17, 0.16));
  transform: scaleX(-1) rotate(3deg);
  transform-origin: center bottom;
}

.section-note {
  margin-bottom: 0;
  line-height: 1.7;
}

.latest-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 340px);
  gap: 16px;
  overflow-x: auto;
  padding: 8px 4px 18px;
  scroll-snap-type: x proximity;
}

.latest-card {
  position: relative;
  scroll-snap-align: start;
  min-height: 238px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: 2px solid var(--black);
  border-radius: 22px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(255, 76, 194, 0.16), transparent 9rem),
    linear-gradient(180deg, #fff, #fff9d7);
  box-shadow: 6px 6px 0 var(--black);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.latest-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--black);
}

.new-ribbon {
  position: absolute;
  z-index: 5;
  top: 8px;
  left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #ff4bc8;
  color: #fff;
  padding: 4px 10px;
  box-shadow: 3px 3px 0 var(--black);
  font-size: 12px;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0.04em;
  pointer-events: none;
  transform: rotate(-4deg);
  animation: new-ribbon-glow 4.8s ease-in-out infinite;
  will-change: filter, box-shadow;
}

@keyframes new-ribbon-glow {
  0%,
  64%,
  100% {
    filter: brightness(1);
    box-shadow: 3px 3px 0 var(--black);
  }
  72% {
    filter: brightness(1.35);
    box-shadow:
      3px 3px 0 var(--black),
      0 0 0 3px rgba(255, 255, 255, 0.9),
      0 0 16px rgba(255, 75, 200, 0.8);
  }
  80% {
    filter: brightness(1.08);
    box-shadow:
      3px 3px 0 var(--black),
      0 0 9px rgba(255, 75, 200, 0.45);
  }
}

.product-thumb {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 2px solid var(--black);
  background: #fff;
  color: var(--muted);
  box-shadow: 4px 4px 0 var(--black);
  flex: none;
}

.product-thumb.is-fallback {
  border-color: var(--line);
  box-shadow: none;
}

.product-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}

.product-thumb span {
  position: relative;
  z-index: 1;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.product-thumb:not(.is-fallback) span {
  display: none;
}

.latest-card__thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 18px;
}

.latest-card__thumb span {
  font-size: 13px;
}

.latest-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.latest-card h3 {
  margin: 0;
  line-height: 1.4;
  font-size: var(--card-title-size);
}

.price {
  margin: 0;
  font-weight: 1000;
}

.price--missing {
  width: fit-content;
  border: 1px dashed var(--muted);
  border-radius: 999px;
  color: var(--muted);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 900;
}

.latest-card a,
.latest-card__link,
.table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  width: fit-content;
  min-width: 58px;
  border-radius: 999px;
  background: var(--black);
  color: #fff;
  padding: 9px 13px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  white-space: nowrap;
}

.link-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed rgba(17, 17, 17, 0.38);
  background: #fff;
  color: var(--muted);
  cursor: default;
  pointer-events: none;
}

.calendar-event.is-link-missing {
  border-style: dashed;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--site-color) 10%, transparent), transparent 72%),
    #fff;
  color: var(--ink);
  cursor: default;
}

.badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--pink);
  color: #fff;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 1000;
}

.site-badge {
  background: var(--site-color, var(--pink));
  color: #fff;
}

.badge--dark {
  background: var(--yellow);
  color: var(--black);
}

.site-accent {
  --site-color: var(--pink);
}

.latest-card.site-accent,
.summary-item.site-accent,
.arrival-table tr.site-accent,
.calendar-event.site-accent {
  border-left: 7px solid var(--site-color);
}

.calendar-event.site-accent {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--site-color) 16%, transparent), transparent 72%),
    rgba(255, 255, 255, 0.9);
}

input,
select {
  min-height: 42px;
  max-width: 100%;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 10px 13px;
  font: inherit;
  font-weight: 700;
}

input {
  width: min(260px, 100%);
}

#product-filter {
  width: min(360px, 100%);
}

#game-filter {
  min-width: 0;
}

.view-toggle {
  display: inline-flex;
  gap: 4px;
  min-height: 42px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  padding: 3px;
}

.view-toggle button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  padding: 8px 13px;
  font: inherit;
  font-weight: 1000;
  cursor: pointer;
}

.view-toggle button.is-active {
  background: var(--black);
  color: #fff;
}

.site-check-panel {
  flex: 1 1 680px;
  min-width: 380px;
  max-width: none;
  min-height: 188px;
  border: 2px solid var(--black);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(241, 255, 0, 0.26), transparent 62%),
    rgba(255, 255, 255, 0.88);
  padding: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 4px 0 var(--black);
}

.site-check-panel__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
}

.site-check-panel__head .filters {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  margin: 0;
}

.site-check-panel__head .filters select,
.site-check-panel__head .filters #product-filter {
  width: 100%;
  min-width: 0;
}

.site-check-panel__head strong {
  font-size: 14px;
  font-weight: 1000;
}

.site-check-panel__head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.site-check-actions {
  grid-column: 2;
  grid-row: 1;
  display: inline-flex;
  gap: 6px;
  margin-left: auto;
}

.site-check-actions button {
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
}

.site-check-actions button:hover {
  background: var(--yellow);
}

.site-checklist {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  align-content: flex-start;
  gap: 8px;
  flex: 1;
  max-height: 142px;
  overflow-y: auto;
  padding-right: 4px;
}

.site-check {
  --site-color: var(--pink);
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 7px;
  min-height: 38px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 1000;
  cursor: pointer;
  user-select: none;
}

.site-check input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.site-check__dot {
  width: 14px;
  height: 14px;
  border: 2px solid var(--black);
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}

.site-check:has(input:checked) {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--site-color) 22%, transparent), transparent 78%),
    #fff;
  border-color: var(--site-color);
}

.site-check:has(input:checked) .site-check__dot {
  background: var(--site-color);
}

.month-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scrollbar-width: none;
}

.month-tabs::-webkit-scrollbar {
  display: none;
}

.month-tabs button {
  white-space: nowrap;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  padding: 9px 12px;
  font-weight: 1000;
  cursor: pointer;
}

.month-tabs button.is-active {
  background: var(--green);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--black);
  border-radius: 20px;
  background: #fff;
}

.arrival-table {
  width: 100%;
  min-width: 980px;
  table-layout: fixed;
  border-collapse: collapse;
}

.arrival-table__col-month {
  width: 128px;
}

.arrival-table__col-date {
  width: 128px;
}

.arrival-table__col-site {
  width: 150px;
}

.arrival-table__col-product {
  width: auto;
}

.arrival-table__col-price {
  width: 118px;
}

.arrival-table__col-link {
  width: 104px;
}

.arrival-table th,
.arrival-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.arrival-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--black);
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
}

.arrival-table tr:last-child td {
  border-bottom: none;
}

.calendar-view {
  position: relative;
  overflow: hidden;
  border: 2px solid var(--black);
  border-radius: 22px;
  background: #fff;
  padding: 16px;
  box-shadow: 6px 6px 0 var(--black);
  touch-action: pan-y;
  user-select: none;
}

.calendar-view::before {
  content: "";
  position: absolute;
  right: -8%;
  top: 4%;
  z-index: 0;
  width: min(88vw, 980px);
  aspect-ratio: 1;
  background: url("/assets/vivivi-check-pose.png?v=monthly-bg-2") center / contain no-repeat;
  opacity: 0.12;
  pointer-events: none;
}

.calendar-view > * {
  position: relative;
  z-index: 1;
}

.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-head__text {
  min-width: 0;
}

.calendar-head h3 {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
}

.calendar-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.calendar-nav {
  display: inline-flex;
  flex: none;
  gap: 6px;
}

.calendar-nav button {
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 7px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 1000;
  cursor: pointer;
  box-shadow: 2px 2px 0 var(--black);
}

.calendar-nav button:hover {
  background: var(--yellow);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.calendar-weekdays span {
  color: #fff;
  text-align: center;
  font-size: 12px;
  font-weight: 1000;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--black);
  padding: 5px 0;
}

.calendar-weekdays .weekday-sun,
.calendar-weekdays .weekday-sat {
  border-radius: 999px;
}

.calendar-weekdays .weekday-sun {
  background: #ffe3e0;
  color: var(--red);
}

.calendar-weekdays .weekday-sat {
  background: #e6efff;
  color: #2368ff;
}

.calendar-cell {
  display: flex;
  flex-direction: column;
  min-height: 132px;
  max-height: 236px;
  border: 2px solid #d5cdbd;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(0.4px);
  padding: 9px;
  overflow: hidden;
}

.calendar-cell.is-sunday,
.calendar-cell.is-holiday {
  border-color: rgba(239, 72, 62, 0.82);
  background:
    linear-gradient(135deg, rgba(239, 72, 62, 0.22), rgba(255, 255, 255, 0.88) 58%),
    #fff6f5;
}

.calendar-cell.is-saturday {
  border-color: rgba(35, 104, 255, 0.72);
  background:
    linear-gradient(135deg, rgba(35, 104, 255, 0.18), rgba(255, 255, 255, 0.88) 58%),
    #f4f8ff;
}

.calendar-cell.has-events {
  border-color: var(--black);
  background:
    linear-gradient(135deg, rgba(241, 255, 0, 0.62), rgba(255, 255, 255, 0.92) 52%),
    #fffde2;
  box-shadow:
    inset 0 0 0 3px rgba(17, 17, 17, 0.06),
    3px 3px 0 rgba(17, 17, 17, 0.18);
}

.calendar-cell--empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.42);
}

.calendar-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.calendar-date strong {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--black);
  font-size: 18px;
  font-weight: 1000;
}

.calendar-date strong small {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.calendar-cell.is-sunday .calendar-date strong,
.calendar-cell.is-holiday .calendar-date strong {
  color: var(--red);
}

.calendar-cell.is-saturday .calendar-date strong {
  color: #2368ff;
}

.calendar-date span {
  color: var(--black);
  font-size: 11px;
  font-weight: 1000;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: var(--yellow);
  padding: 2px 7px;
  line-height: 1.15;
}

.calendar-cell.is-holiday .calendar-date span,
.calendar-cell.is-sunday .calendar-date span {
  border-color: var(--red);
  background: var(--red);
  color: #fff;
}

.calendar-cell.is-saturday .calendar-date span {
  border-color: #2368ff;
  background: #2368ff;
  color: #fff;
}

.calendar-events {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  align-content: start;
  grid-auto-rows: max-content;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.calendar-events::-webkit-scrollbar {
  width: 6px;
}

.calendar-events::-webkit-scrollbar-thumb {
  background: rgba(17, 17, 17, 0.34);
  border-radius: 999px;
}

.calendar-event {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 2px 7px;
  border: 2px solid var(--black);
  border-left-width: 8px;
  border-radius: 10px;
  background: #fff;
  color: var(--black);
  box-shadow: 2px 2px 0 rgba(17, 17, 17, 0.22);
  padding: 6px;
  text-decoration: none;
}

.calendar-event__thumb {
  grid-row: span 2;
  width: 28px;
  height: 28px;
  border-width: 1px;
  border-radius: 8px;
  box-shadow: 2px 2px 0 var(--black);
}

.calendar-event__thumb span {
  font-size: 11px;
}

.calendar-event span {
  color: var(--site-color, var(--green));
  font-size: 10px;
  font-weight: 900;
}

.calendar-event strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.35;
}

.table-name {
  min-width: 260px;
  font-weight: 900;
  line-height: 1.5;
}

.table-product {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.table-product__thumb {
  width: 46px;
  height: 46px;
  border-width: 1px;
  border-radius: 12px;
  box-shadow: 2px 2px 0 var(--black);
}

.table-product__thumb span {
  font-size: 9px;
}

.empty {
  color: var(--muted);
  padding: 18px;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 24px;
  align-items: center;
  background: linear-gradient(135deg, #fff, #f9ffe2);
}

.about img {
  width: min(var(--about-image-width), 100%);
  justify-self: center;
  transform: translate(var(--about-image-x), var(--about-image-y));
  filter: drop-shadow(0 18px 20px rgba(0, 0, 0, 0.18));
}

footer {
  padding: 20px 0 48px;
  font-size: 13px;
}

/* 人気カテゴリはリンクではなく、上部の小さな案内チップとして表示する */
.popular-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.popular-nav::before {
  display: none;
}

.popular-nav__label {
  flex: 0 0 auto;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  color: var(--green);
  box-shadow: none;
}

.popular-grid {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 8px;
}

.popular-card {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: 13px;
  font-weight: 1000;
  line-height: 1;
  color: var(--ink);
  box-shadow: none;
  white-space: nowrap;
}

.popular-card:hover {
  transform: none;
  box-shadow: none;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .popular-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__visual {
    min-height: 430px;
  }

  .hero__guide {
    width: min(var(--hero-guide-width), 430px);
  }

  .signal-panel--new {
    top: 104px;
  }

  .signal-panel--time {
    bottom: 58px;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .section__head {
    display: block;
  }

  .filters {
    margin-top: 16px;
  }

  .monthly-title,
  .section--table .filters,
  .site-check-panel {
    flex: none;
    width: 100%;
    max-width: none;
    min-width: 0;
  }

  .section--table .section__head--wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .monthly-title {
    display: grid;
    gap: 8px;
    padding: 0;
  }

  .monthly-title .view-toggle {
    width: 100%;
  }

  .section--table .filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 0;
  }

  .section--table .filters select,
  .section--table .filters #product-filter {
    grid-column: auto;
    width: 100%;
    min-height: 42px;
    padding-inline: 10px 24px;
    font-size: 12px;
  }

  .site-check-actions button {
    padding: 7px 8px;
    font-size: 11px;
  }

  .site-checklist {
    max-height: 126px;
    gap: 6px;
    padding-right: 2px;
  }

  .site-check {
    min-height: 30px;
    gap: 4px;
    padding: 5px 6px;
    font-size: 10px;
  }

  .site-check__dot {
    width: 10px;
    height: 10px;
    box-shadow: inset 0 0 0 2px #fff;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    border-radius: 24px;
    flex-direction: column;
  }

  .nav {
    width: 100%;
  }

  .popular-nav {
    margin-top: 16px;
    border-radius: 24px;
    padding: 20px 16px;
  }

  .popular-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 82vw);
    grid-template-columns: none;
    overflow-x: auto;
    padding: 2px 4px 12px;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .popular-card {
    min-height: 120px;
    scroll-snap-align: start;
  }

  .hero {
    padding-top: 24px;
  }

  .hero__copy,
  .section,
  .about {
    border-radius: 24px;
  }

  .hero__visual {
    min-height: 390px;
  }

  .hero__logo {
    top: calc(18px + var(--hero-logo-y));
    width: min(var(--hero-logo-width), 720px);
  }

  .hero__guide {
    width: min(var(--hero-guide-width), 430px);
    bottom: calc(-8px + var(--hero-guide-y));
  }

  .signal-panel {
    min-width: 122px;
    padding: 10px 11px;
    border-radius: 16px;
  }

  .signal-panel strong {
    font-size: 15px;
  }

  .signal-panel--new {
    top: 92px;
    left: 12px;
  }

  .signal-panel--time {
    right: 12px;
    bottom: 42px;
  }

  .latest-strip {
    grid-auto-columns: minmax(230px, 86vw);
  }

  .filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  input,
  select,
  .button,
  .view-toggle {
    width: 100%;
  }

  .view-toggle button {
    flex: 1;
  }

  .table-wrap {
    border: none;
    background: transparent;
    overflow: visible;
  }

  .arrival-table {
    min-width: 0;
  }

  .arrival-table thead {
    display: none;
  }

  .arrival-table,
  .arrival-table tbody,
  .arrival-table tr,
  .arrival-table td {
    display: block;
    width: 100%;
  }

  .arrival-table tr {
    margin-bottom: 12px;
    border: 2px solid var(--black);
    border-radius: 18px;
    background: #fff;
    box-shadow: 4px 4px 0 var(--black);
    overflow: hidden;
  }

  .arrival-table td {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--line);
    padding: 12px;
  }

  .arrival-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 1000;
  }

  .table-name {
    min-width: 0;
  }

  .table-product {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .table-product__thumb {
    width: 42px;
    height: 42px;
  }

  .calendar-view {
    border-radius: 18px;
    padding: 12px;
  }

  .calendar-head {
    display: block;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-cell,
  .calendar-cell--empty {
    min-height: 0;
  }

  .calendar-cell--empty {
    display: none;
  }

  .calendar-cell:not(.has-events) {
    display: none;
  }

  .calendar-event strong {
    white-space: normal;
  }

  .about {
    grid-template-columns: 1fr;
  }
}

/* ===== Chat-driven responsive presets ===== */
@media (min-width: 901px) {
  body.pc-magazine .hero {
    grid-template-columns: minmax(0, 0.88fr) minmax(430px, 1.12fr);
    gap: 34px;
  }

  body.pc-magazine .hero__visual {
    min-height: 620px;
  }

  body.pc-magazine .hero__guide {
    width: min(78%, 500px);
  }

  body.pc-magazine .latest-strip {
    grid-auto-columns: minmax(310px, 390px);
  }

  body.pc-compact .site-header,
  body.pc-compact main,
  body.pc-compact footer {
    width: min(1280px, calc(100% - 24px));
  }

  body.pc-compact .hero {
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 18px;
    padding-top: 24px;
  }

  body.pc-compact .hero__copy,
  body.pc-compact .section,
  body.pc-compact .about {
    padding: 24px;
  }

  body.pc-compact .hero__visual {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  body.mobile-app {
    padding-bottom: 76px;
  }

  body.mobile-app .site-header {
    position: sticky;
    top: 8px;
    gap: 10px;
    padding: 10px;
  }

  body.mobile-app .brand__mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    box-shadow: 3px 3px 0 var(--black);
  }

  body.mobile-app .brand strong {
    font-size: 14px;
  }

  body.mobile-app .nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 30;
    justify-content: space-between;
    gap: 6px;
    border: 2px solid var(--black);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    padding: 8px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
  }

  body.theme-night.mobile-app .nav {
    background: rgba(17, 19, 28, 0.94);
  }

  body.mobile-app .nav a {
    flex: 1 0 auto;
    padding: 9px 8px;
    text-align: center;
    font-size: 11px;
    background: rgba(241, 255, 0, 0.34);
  }

  body.mobile-app .hero {
    gap: 12px;
    padding-top: 16px;
  }

  body.mobile-app .hero__copy {
    padding: 22px 18px;
  }

  body.mobile-app h1 {
    font-size: clamp(28px, 12vw, var(--hero-title-size));
  }

  body.mobile-app .lead {
    font-size: var(--body-text-size);
    line-height: 1.75;
  }

  body.mobile-app .hero__visual {
    min-height: 340px;
  }

  body.mobile-app .hero__logo {
    width: min(var(--hero-logo-width), 720px);
    opacity: 0.84;
  }

  body.mobile-app .hero__guide {
    width: min(var(--hero-guide-width), 430px);
  }

  body.mobile-app .stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  body.mobile-app .top-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }

  body.mobile-app .stats article {
    padding: 12px 8px;
    text-align: center;
    border-radius: 16px;
  }

  body.mobile-app .top-stats .stats-tab {
    min-height: 55px;
    padding: 6px 4px;
  }

  body.mobile-app .stats span {
    font-size: 22px;
  }

  body.mobile-app .top-stats .stats-tab__value {
    font-size: clamp(15px, 5vw, 22px);
  }

  body.mobile-app .top-stats .stats-tab:nth-child(4) .stats-tab__value {
    font-size: clamp(11px, 3.6vw, 16px);
  }

  body.mobile-app .stats p {
    font-size: 11px;
    line-height: 1.35;
  }

  body.mobile-app .top-stats .stats-tab__label {
    font-size: 8px;
  }

  body.mobile-feed .hero__visual,
  body.mobile-simple .hero__visual {
    display: none;
  }

  body.mobile-feed .latest-strip {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 0;
  }

  body.mobile-feed .latest-card {
    min-height: auto;
  }

  body.mobile-feed .latest-card h3 {
    min-height: auto;
  }

  body.mobile-simple .site-bg,
  body.mobile-simple .signal-panel,
  body.mobile-simple .hero__copy::after,
  body.mobile-simple .section--latest::before {
    display: none;
  }

  body.mobile-simple {
    background: var(--bg);
  }

  body.mobile-simple .hero__copy,
  body.mobile-simple .section,
  body.mobile-simple .about,
  body.mobile-simple .stats article,
  body.mobile-simple .latest-card,
  body.mobile-simple .summary-panel,
  body.mobile-simple .summary-item,
  body.mobile-simple .arrival-table tr {
    box-shadow: none;
  }
}
@media (max-width: 640px) {
  .popular-nav {
    align-items: flex-start;
    border-radius: 0;
    margin-top: 12px;
    padding: 0;
  }

  .popular-grid {
    display: flex;
    grid-auto-flow: initial;
    grid-auto-columns: initial;
    grid-template-columns: none;
    flex-wrap: wrap;
    overflow: visible;
    padding: 0;
    scroll-snap-type: none;
  }

  .popular-card {
    min-height: 0;
    padding: 8px 10px;
    font-size: 12px;
    scroll-snap-align: none;
  }

}

/* ===== Smartphone layout: 狭い画面ではPC版を畳んで読みやすさ優先 ===== */
@media (max-width: 640px) {
  :root {
    --section-title-size: 30px;
    --card-title-size: 18px;
    --body-text-size: 15px;
  }

  html,
  body {
    overflow-x: hidden;
  }

  body {
    padding-top: 0;
  }

  .site-header,
  main,
  footer {
    width: min(100% - 10px, 520px);
  }

  body.mobile-app .site-header,
  .site-header {
    position: fixed !important;
    z-index: 1000;
    top: max(8px, env(safe-area-inset-top));
    left: 5px;
    right: 5px;
    width: auto;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-areas: "brand nav";
    align-items: center;
    gap: 3px;
    min-height: 52px;
    padding: 5px 6px;
    border-radius: 20px;
    background:
      linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 246, 252, 0.92)),
      rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
  }

  .brand {
    grid-area: brand;
    gap: 5px;
    min-width: 0;
  }

  body.mobile-app .brand__mark,
  .brand__mark {
    width: 28px;
    height: 28px;
    border-radius: 12px;
  }

  body.mobile-app .brand strong,
  .brand strong {
    font-size: 12px;
  }

  .brand small {
    font-size: 8px;
  }

  .site-header .header-stats {
    display: none;
  }

  .top-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    margin: -2px 0 7px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .top-stats .stats-tab,
  .top-stats .stats-tab:nth-child(4) {
    min-width: 0;
    flex: none;
    width: 100%;
    min-height: 55px;
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 6px 4px;
    border-width: 2px;
    border-radius: 15px;
    box-shadow: 2px 2px 0 var(--black);
  }

  .top-stats .stats-tab__value {
    font-size: clamp(15px, 5vw, 22px);
    letter-spacing: -0.06em;
  }

  .top-stats .stats-tab:nth-child(4) .stats-tab__value {
    font-size: clamp(11px, 3.6vw, 16px);
  }

  .top-stats .stats-tab__label {
    font-size: 8px;
    white-space: normal;
  }

  body.mobile-app .nav,
  .nav {
    grid-area: nav;
    position: static !important;
    left: auto;
    right: auto;
    bottom: auto;
    align-self: center;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    width: min(100%, 286px);
    max-width: 286px;
    justify-self: start;
    transform: translateX(-3px);
    padding: 2px;
    border: 2px solid var(--black);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 3px 3px 0 var(--black);
  }

  body.mobile-app .nav a,
  .nav a {
    flex: initial;
    min-width: 0;
    padding: 5px 2px;
    background: rgba(247, 255, 79, 0.38);
    text-align: center;
    font-size: 8px;
    line-height: 1.15;
  }

  main {
    padding-top: calc(70px + env(safe-area-inset-top));
    padding-bottom: 24px;
  }

  .popular-nav {
    display: block;
    margin: 3px auto 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .popular-nav__label {
    display: inline-block;
    margin-right: 10px;
  }

  .popular-grid {
    display: inline-flex;
    flex-wrap: nowrap;
    gap: 14px;
    padding: 4px 2px 8px;
  }

  .popular-card {
    font-size: 12px;
    white-space: nowrap;
  }

  .section {
    margin-top: 16px;
    padding: 18px 12px;
    border-radius: 20px;
    box-shadow: 4px 4px 0 var(--black);
  }

  .section__head {
    display: block;
    margin-bottom: 12px;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: 0.16em;
  }

  h2,
  .monthly-title h2 {
    font-size: clamp(28px, 10vw, var(--section-title-size));
    line-height: 1.05;
    white-space: normal;
  }

  .status {
    margin-top: 8px;
    font-size: 13px;
  }

  .section--latest {
    padding-top: 34px;
    overflow: visible;
  }

  .section--latest::before {
    top: 68px;
    left: 8px;
    font-size: 84px;
  }

  .latest-mascot {
    right: 4px;
    top: 56px;
    width: 92px;
    height: 98px;
    z-index: 20;
  }

  .latest-mascot__body,
  .latest-mascot__hands {
    opacity: 1;
    filter: drop-shadow(3px 5px 0 rgba(17, 17, 17, 0.2));
  }

  .latest-card {
    position: relative;
    z-index: 2;
  }

  .latest-strip {
    display: grid;
    grid-auto-flow: column;
    grid-template-rows: repeat(4, minmax(0, 1fr));
    grid-auto-columns: calc((100% - 8px) / 2);
    gap: 8px;
    overflow-x: auto;
    overflow-y: visible;
    padding: 2px 2px 10px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .latest-card {
    min-height: 0;
    gap: 5px;
    border-radius: 14px;
    padding: 7px;
    box-shadow: 3px 3px 0 var(--black);
    scroll-snap-align: start;
  }

  .new-ribbon {
    top: 5px;
    left: 5px;
    padding: 3px 7px;
    box-shadow: 2px 2px 0 var(--black);
    font-size: 9px;
  }

  .latest-card__thumb {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--black);
  }

  .latest-card__top {
    align-items: center;
    gap: 5px;
    font-size: 9px;
  }

  .latest-card h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 12px;
    line-height: 1.25;
  }

  .latest-card .badge {
    padding: 2px 6px;
    border-width: 2px;
    font-size: 9px;
  }

  .latest-card .price {
    font-size: 11px;
  }

  .latest-card .price--missing {
    padding: 2px 6px;
    font-size: 9px;
  }

  .latest-card a,
  .latest-card__link {
    padding: 6px 8px;
    font-size: 10px;
  }

  .lottery-list {
    max-height: 600px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
  }

  .section--table .section__head--wrap {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .monthly-title {
    display: grid;
    gap: 8px;
    padding: 0;
  }

  .monthly-title .view-toggle {
    width: 100%;
  }

  .section--table .filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .section--table .filters select,
  .section--table .filters select:first-child {
    grid-column: auto;
    min-height: 42px;
    padding-inline: 10px 24px;
    font-size: 12px;
  }

  #game-filter {
    font-size: 12px;
    padding-inline: 14px 30px;
  }

  input,
  select,
  .view-toggle {
    width: 100%;
    min-height: 42px;
  }

  .site-check-panel {
    width: 100%;
    min-width: 0;
    min-height: 0;
    padding: 10px;
    border-radius: 18px;
    box-shadow: 3px 3px 0 var(--black);
  }

  .site-check-panel__head {
    gap: 6px;
  }

  .site-check-actions {
    width: 100%;
    margin-left: 0;
  }

  .site-check-actions button {
    flex: 1;
    padding: 7px 8px;
    font-size: 11px;
  }

  .site-checklist {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-height: 126px;
    gap: 6px;
    padding-right: 2px;
  }

  .site-check {
    justify-content: flex-start;
    min-width: 0;
    min-height: 30px;
    gap: 4px;
    padding: 5px 6px;
    font-size: 10px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .site-check__dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-width: 2px;
    box-shadow: inset 0 0 0 2px #fff;
  }

  .month-tabs {
    gap: 7px;
    padding: 4px 0 10px;
  }

  .month-tabs button,
  .summary-month-tabs button {
    padding: 7px 10px;
    font-size: 12px;
    box-shadow: 2px 2px 0 var(--black);
  }

  .calendar-view {
    padding: 12px;
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--black);
  }

  .calendar-view::before {
    right: -28%;
    top: 0;
    width: 118vw;
    opacity: 0.08;
  }

  .calendar-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .calendar-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .calendar-nav button {
    padding: 8px 10px;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .calendar-cell--empty,
  .calendar-cell:not(.has-events) {
    display: none;
  }

  .calendar-cell {
    min-height: 0;
    max-height: min(72vh, 560px);
    border-radius: 14px;
    padding: 10px;
    background:
      linear-gradient(90deg, rgba(241, 255, 0, 0.46), rgba(255, 255, 255, 0.96) 30%),
      #fff;
    box-shadow: 4px 4px 0 var(--black);
  }

  .calendar-events {
    max-height: calc(min(72vh, 560px) - 58px);
  }

  .calendar-date {
    margin: -10px -10px 8px;
    border-radius: 12px 12px 0 0;
    background: var(--black);
    color: #fff;
    padding: 8px 10px;
  }

  .calendar-date strong {
    color: #fff;
    font-size: 20px;
  }

  .calendar-date strong small {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }

  .calendar-cell.is-sunday .calendar-date,
  .calendar-cell.is-holiday .calendar-date {
    background: var(--red);
  }

  .calendar-cell.is-saturday .calendar-date {
    background: #2368ff;
  }

  .calendar-cell.is-sunday .calendar-date strong,
  .calendar-cell.is-holiday .calendar-date strong,
  .calendar-cell.is-saturday .calendar-date strong {
    color: #fff;
  }

  .calendar-date span,
  .calendar-cell.is-sunday .calendar-date span,
  .calendar-cell.is-holiday .calendar-date span,
  .calendar-cell.is-saturday .calendar-date span {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
  }

  .calendar-event {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 3px 8px;
    padding: 7px;
  }

  .calendar-event__thumb {
    width: 34px;
    height: 34px;
  }

  .calendar-event strong {
    white-space: normal;
    font-size: 12px;
  }

  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }

  .arrival-table {
    min-width: 0;
  }

  .arrival-table thead {
    display: none;
  }

  .arrival-table,
  .arrival-table tbody,
  .arrival-table tr,
  .arrival-table td {
    display: block;
    width: 100%;
  }

  .arrival-table tr {
    margin-bottom: 10px;
    border: 2px solid var(--black);
    border-radius: 16px;
    background: #fff;
    box-shadow: 3px 3px 0 var(--black);
    overflow: hidden;
  }

  .arrival-table td {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
    border-bottom: 1px solid var(--line);
    padding: 10px;
  }

  .arrival-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 1000;
  }

  .table-name {
    min-width: 0;
  }

  .table-product {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
  }

  .table-product__thumb {
    width: 42px;
    height: 42px;
  }

  .section--summary {
    overflow: hidden;
    padding-top: 26px;
  }

  .summary-thinking-mascot {
    width: 96px;
    right: 12px;
    top: 74px;
    opacity: 1;
    z-index: 2;
    filter: drop-shadow(4px 5px 0 rgba(17, 17, 17, 0.14));
  }

  .section--summary .section__head {
    padding-right: 112px;
    min-height: 142px;
    align-items: flex-start;
  }

  .section--summary .section__head h2 {
    max-width: 100%;
    font-size: clamp(34px, 10vw, 48px);
    line-height: 1.04;
    letter-spacing: -0.06em;
  }

  .section--summary .section-note {
    max-width: 100%;
    font-size: 18px;
    line-height: 1.55;
  }

  .summary-note-break {
    display: block;
  }

  .summary-month-wrap {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 9px;
    margin: 2px 0 12px;
  }

  .summary-game-filter {
    width: 100%;
    min-height: 48px;
    font-size: 16px;
    padding: 9px 40px 9px 14px;
    border-width: 2px;
    box-shadow: 3px 3px 0 var(--black);
  }

  .summary-month-tabs {
    gap: 7px;
  }

  .summary-grid {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    gap: 12px;
  }

  .summary-panel {
    display: block;
    width: 100%;
    box-sizing: border-box;
    max-height: none;
    padding: 12px;
    border-radius: 18px;
    box-shadow: 4px 4px 0 var(--black);
  }

  .summary-panel__head {
    margin-bottom: 10px;
  }

  .summary-list {
    width: 100%;
    box-sizing: border-box;
    max-height: none;
    overflow: visible;
    gap: 9px;
    padding-right: 0;
  }

  .summary-list--items {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .summary-item {
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
    border-radius: 15px;
    box-shadow: 3px 3px 0 var(--black);
  }

  .summary-item__media {
    width: 48px;
    height: 48px;
    border-radius: 12px;
  }

  #store-summary .summary-item__media {
    padding: 2px;
  }

  #store-summary .summary-item__media b {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    font-size: 11px;
    line-height: 1;
    letter-spacing: -0.12em;
    transform: scaleX(0.92);
  }

  .summary-item__title strong {
    font-size: 15px;
    line-height: 1.3;
  }

  .summary-item__title b {
    font-size: 11px;
    padding: 2px 6px;
  }

  .summary-item__body small {
    font-size: 12px;
  }
}

/* タブレットのカレンダー予定は画像・店名・時刻だけに絞る */
@media (min-width: 641px) and (max-width: 1400px) {
  .calendar-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
  }

  .calendar-head__text {
    grid-column: 1;
  }

  .calendar-head .view-toggle {
    grid-column: 2;
    width: 220px;
    justify-self: end;
  }

  .calendar-head .calendar-nav {
    grid-column: 3;
    justify-self: end;
  }

  .calendar-event {
    grid-template-columns: 1fr;
    grid-template-rows: 34px auto;
    align-items: center;
    gap: 4px;
    padding: 5px;
  }

  .calendar-event__thumb {
    width: 34px;
    height: 34px;
    grid-row: 1;
    grid-column: 1;
  }

  .calendar-event__meta {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    min-width: 0;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    color: var(--site-color, var(--green));
    font-size: 9px;
    line-height: 1.1;
    font-weight: 900;
  }

  .calendar-event__meta time {
    flex: 0 0 auto;
  }

  .calendar-event__meta b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-event strong {
    display: none;
  }

  .calendar-cell.is-holiday .calendar-date span {
    font-size: 0;
    min-width: 24px;
    text-align: center;
  }

  .calendar-cell.is-holiday .calendar-date span::after {
    content: "祝";
    font-size: 11px;
  }

  .calendar-view::before {
    opacity: 0.05;
  }

  .calendar-cell,
  .calendar-cell--empty {
    background-color: rgba(255, 255, 255, 0.94);
  }

  .calendar-event {
    background: rgba(255, 255, 255, 0.96);
  }
}

/* 最新入荷はPC・タブレットもスマホカード寸法のまま横スクロール */
@media (min-width: 641px) {
  .latest-strip {
    grid-auto-columns: 205px;
    gap: 8px;
    padding: 2px 2px 10px;
  }

  .latest-card {
    width: 205px;
    min-width: 205px;
    max-width: 205px;
    min-height: 0;
    gap: 5px;
    border-radius: 14px;
    padding: 7px;
    box-shadow: 3px 3px 0 var(--black);
  }

  .latest-card__thumb {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--black);
  }

  .latest-card__top {
    align-items: center;
    gap: 5px;
    font-size: 9px;
  }

  .latest-card h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 12px;
    line-height: 1.25;
  }

  .latest-card .badge {
    padding: 2px 6px;
    border-width: 2px;
    font-size: 9px;
  }

  .latest-card .price {
    font-size: 11px;
  }

  .latest-card .price--missing {
    padding: 2px 6px;
    font-size: 9px;
  }

  .latest-card a,
  .latest-card__link {
    padding: 6px 8px;
    font-size: 10px;
  }
}

/* タブレット時の最新入荷カード寸法を、広い画面でも固定する */
@media (min-width: 641px) {
  .section--latest .latest-strip {
    grid-template-columns: none !important;
    grid-auto-columns: 205px !important;
    justify-content: start !important;
  }

.section--latest .latest-card {
    width: 205px !important;
    min-width: 205px !important;
    max-width: 205px !important;
  }
}

/* 件数表示の有無でマスコットがレイアウトに押されないよう固定 */
.section--latest > .latest-mascot {
  position: absolute !important;
}

@media (min-width: 641px) {
  .section--latest > .latest-mascot {
    top: 74px !important;
    right: 170px !important;
    z-index: 3 !important;
  }

  .section--latest > .section__head {
    position: relative;
    display: block;
    min-height: 112px;
  }

  .section--latest > .section__head > .status {
    position: absolute;
    top: 72px;
    left: 0;
    margin: 0;
  }
}

/* カレンダー上部: 左に見出し、右上に操作、下段は店舗だけ */
@media (min-width: 641px) and (max-width: 1400px) {
  .section--table .section__head--wrap {
    display: grid;
    grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: start;
    column-gap: 22px;
    row-gap: 12px;
  }

  .section--table .monthly-title {
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-rows: auto auto auto;
    align-content: start;
    gap: 8px;
    width: 100%;
  }

  .section--table .monthly-title .eyebrow {
    grid-row: 1;
  }

  .section--table .monthly-title .view-toggle {
    grid-row: 2;
    width: 100%;
  }

  .section--table .monthly-title h2 {
    grid-row: 3;
    margin: 0;
  }

  .calendar-controls {
    grid-column: 2;
    grid-row: 1;
    display: grid;
    grid-template-columns: repeat(5, 115px);
    gap: 8px;
    align-items: start;
    justify-content: end;
    width: 100%;
  }

  .calendar-controls .filters,
  .calendar-controls .site-check-actions {
    display: contents;
  }

  .calendar-controls select,
  .calendar-controls .site-check-actions button {
    width: 115px;
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .section--table .site-check-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .calendar-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
  }

  .calendar-controls .filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: 100%;
  }

  .calendar-controls .filters select {
    width: 100%;
  }

  .calendar-controls .site-check-actions {
    display: flex;
    width: 100%;
    margin-left: 0;
  }

  .calendar-controls .site-check-actions button {
    flex: 1;
  }
}

/* タブレットのカレンダーフィルターは店舗選択欄を圧迫しない幅にする */
@media (min-width: 641px) and (max-width: 1400px) {
  .section--table .section__head--wrap {
    display: grid;
    grid-template-columns: minmax(180px, 210px) minmax(0, 1fr);
    gap: 12px;
  }

  .monthly-title {
    display: contents;
  }

  .monthly-title .eyebrow {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .monthly-title h2 {
    grid-column: 1;
    grid-row: 3;
    align-self: end;
    margin-bottom: 18px;
  }

  .monthly-title .view-toggle {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    align-self: start;
  }

  .section--table .view-toggle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .section--table .view-toggle button {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
  }

  .section--table .filters {
    grid-column: auto;
    grid-row: auto;
    flex: none;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-self: end;
  }

  .section--table .filters select,
  .section--table .filters #product-filter {
    width: 100%;
    max-width: none;
    min-height: 42px;
    padding-inline: 10px 24px;
    font-size: 12px;
  }

  .site-check-panel {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    min-width: 0;
  }

  .site-check-panel__head .filters {
    grid-column: 1;
    grid-row: 1;
  }

  .site-check-panel__head .filters select,
  .site-check-panel__head .filters #product-filter {
    min-height: 42px;
    padding-inline: 10px 24px;
    font-size: 12px;
  }

  .site-check-panel__head {
    grid-template-columns: repeat(5, 115px);
    gap: 8px;
    justify-content: start;
  }

  .site-check-panel__head .filters {
    display: contents;
  }

  .site-check-actions {
    display: contents;
  }

  .site-check-panel__head .filters select,
  .site-check-actions button {
    width: 115px;
    min-width: 0;
    min-height: 42px;
    padding: 7px 8px;
    font-size: 12px;
  }

  .site-checklist {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-top: 4px;
  }

  .site-check {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    justify-content: flex-start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* 店舗選択パネルの説明見出しは省き、一覧のために空間を使う */
.site-check-panel__head > strong,
.site-check-panel__head > span {
  display: none;
}

.site-check-panel__head {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .site-check-panel__head {
    grid-template-columns: 1fr;
  }

  .site-check-panel__head .filters {
    grid-column: 1;
    grid-row: 1;
  }

  .site-check-actions {
    grid-column: 1;
    grid-row: 2;
  }
}

/* 最終優先: タイトル列と5つの操作ボタンを確実に分離 */
@media (min-width: 641px) and (max-width: 1400px) {
  .section--table .section__head--wrap {
    display: grid !important;
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    column-gap: 22px !important;
  }

  .section--table .monthly-title {
    display: grid !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100% !important;
  }

  .calendar-controls {
    display: grid !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    gap: 8px !important;
    justify-self: start !important;
    justify-content: start !important;
  }

  .calendar-controls .filters,
  .calendar-controls .site-check-actions {
    display: contents !important;
  }

  .calendar-controls select,
  .calendar-controls .site-check-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 42px !important;
    padding-inline: 6px !important;
    font-size: 12px !important;
  }

  /* タイトル右側の空欄に、スマホ基準の5ボタンを収める */
  .section--table .section__head--wrap {
    grid-template-columns: max-content minmax(0, 1fr) !important;
    grid-template-rows: auto auto !important;
    column-gap: 0 !important;
  }

  .section--table .monthly-title {
    width: 100% !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .calendar-controls {
    grid-column: 2 !important;
    grid-row: 1 !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    max-width: none !important;
    width: 100% !important;
  }

  .calendar-controls select,
  .calendar-controls .site-check-actions button {
    width: 100% !important;
    min-height: 42px !important;
    padding: 7px 8px !important;
    font-size: 12px !important;
  }

  .section--table .site-check-panel {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }
}

@media (min-width: 641px) and (max-width: 1400px) {
  .section--table {
    padding-top: 16px !important;
  }

  .section--table .section__head--wrap {
    grid-template-columns: max-content minmax(0, 1fr) !important;
    grid-template-rows: auto auto auto !important;
    column-gap: 16px !important;
    row-gap: 8px !important;
  }

  .section--table .monthly-title {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    grid-template-rows: auto auto !important;
    align-content: start !important;
  }

  .calendar-controls {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: none !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .section--table .site-check-panel {
    grid-column: 1 / -1 !important;
    grid-row: 3 !important;
  }

  .section--table .site-checklist {
    max-height: none !important;
    overflow-y: visible !important;
  }
}

@media (min-width: 641px) and (max-width: 1400px) {
  .top-stats {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    width: 100%;
    overflow: visible !important;
  }

  .top-stats .stats-tab,
  .top-stats .stats-tab:nth-child(4) {
    min-width: 0 !important;
    width: 100% !important;
    flex: none !important;
  }
}

@media (min-width: 641px) and (max-width: 1400px) {
  .section--latest {
    padding-top: 16px !important;
    padding-bottom: 12px !important;
  }

  .section--latest .latest-strip {
    padding-bottom: 4px !important;
  }

  .section--latest .latest-mascot {
    top: 43px !important;
    z-index: 3 !important;
  }
}

/* タブレット用の後勝ち指定より優先して、キャラ位置を固定 */
@media (min-width: 641px) {
  .section--latest > .latest-mascot {
    top: 59px !important;
  }
}

/* カレンダー件数もNEWバッジと同じ見た目でカード右上に重ねる */
@media (min-width: 641px) {
  .calendar-cell {
    overflow: visible;
  }

  .calendar-date strong {
    align-items: center;
    justify-items: center;
    padding: 0;
    color: rgba(17, 17, 17, 0.2);
    font-size: clamp(52px, 6vw, 96px);
    line-height: 1;
    white-space: nowrap;
  }

  .calendar-cell > span.calendar-date__badge {
    position: absolute !important;
    top: -8px !important;
    left: 0 !important;
    right: auto !important;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    margin: 0;
    padding: 4px 10px;
    border: 2px solid var(--black);
    border-radius: 999px;
    background: #ff4bc8;
    color: #fff;
    box-shadow: 3px 3px 0 var(--black);
    font-size: 12px;
    font-weight: 1000;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transform: rotate(-4deg);
  }

  .calendar-event {
    position: relative;
  }

  .calendar-event .calendar-event__badge {
    top: 8px;
    left: 8px;
    right: auto;
    z-index: 5;
    padding: 4px 10px;
    border: 2px solid var(--black);
    border-radius: 999px;
    background: #ff4bc8;
    color: #fff;
    box-shadow: 3px 3px 0 var(--black);
    font-size: 12px;
    font-weight: 1000;
    line-height: 1;
    letter-spacing: 0.02em;
    white-space: nowrap;
    transform: rotate(-4deg);
  }
}

/* 件数バッジはNEWと同じく商品カード左上を基準にする */
.calendar-event {
  position: relative;
}

.calendar-event .calendar-event__badge {
  position: absolute !important;
  top: -8px !important;
  left: 8px !important;
  right: auto !important;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border: 2px solid var(--black);
  border-radius: 999px;
  background: #ff4bc8;
  color: #fff !important;
  box-shadow: 3px 3px 0 var(--black);
  font-size: 12px !important;
  font-weight: 1000;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transform: rotate(-4deg);
}

@media (min-width: 641px) {
  .calendar-event {
    grid-template-columns: 34px minmax(0, 1fr) !important;
    grid-template-rows: 34px !important;
    align-items: center;
    gap: 3px 8px;
  }

  .calendar-event__thumb {
    grid-column: 1;
    grid-row: 1;
    width: 34px;
    height: 34px;
  }

  .calendar-event__meta {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-width: 0;
  }

  .calendar-event__meta time {
    flex: 0 0 auto;
  }

  .calendar-event__meta b {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .calendar-event > strong {
    display: none;
  }
}

/* サマリー右上のキャラを大きな背景イラストとして配置 */
@media (min-width: 641px) {
  .section--summary .summary-thinking-mascot {
    top: -110px;
    right: -80px;
    width: clamp(560px, 50vw, 900px);
    max-width: none;
    opacity: 1;
    z-index: 0;
  }
}

/* 日付カードの背景を透過して、背面のビジュアルを見せる */
@media (min-width: 641px) {
  .calendar-cell,
  .calendar-cell--empty {
    background: transparent !important;
  }

  .calendar-events {
    max-height: none !important;
    overflow: visible !important;
  }

  .calendar-events::-webkit-scrollbar {
    display: none;
  }

  .calendar-view::before {
    opacity: 0.20 !important;
  }

  .calendar-events {
    max-height: 190px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scrollbar-width: thin;
  }

  .calendar-events::-webkit-scrollbar {
    display: block;
    width: 6px;
  }
}

/* スマホのサマリーも大きな背景キャラにする */
@media (max-width: 640px) {
  .calendar-cell {
    position: relative;
    overflow: visible;
  }

  .calendar-cell > span.calendar-date__badge {
    position: absolute !important;
    top: -8px !important;
    left: 8px !important;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border: 2px solid var(--black);
    border-radius: 999px;
    background: #ff4bc8;
    color: #fff !important;
    box-shadow: 3px 3px 0 var(--black);
    font-size: 12px !important;
    font-weight: 1000;
    line-height: 1;
    white-space: nowrap;
    transform: rotate(-4deg);
  }

  .section--summary .summary-thinking-mascot {
    top: -60px !important;
    right: -90px !important;
    width: 360px !important;
    max-width: none;
    opacity: 1;
    z-index: 0;
    transform: translateY(-30px) rotate(4deg) !important;
  }

  .section--summary .section__head {
    padding-right: 0;
    min-height: 0 !important;
  }
}
/* Keep the top navigation usable when the extra knowledge tab is present. */
.nav,
.site-header .nav,
.site-header nav {
  display: flex;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar,
.site-header .nav::-webkit-scrollbar,
.site-header nav::-webkit-scrollbar {
  display: none;
}

.nav > *,
.site-header .nav > *,
.site-header nav > * {
  flex: 0 0 auto;
  white-space: nowrap;
}

#tips {
  scroll-margin-top: 1rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.tips-card {
  min-width: 0;
  padding: 1rem;
  border: 2px solid #171717;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.86);
}

@media (max-width: 640px) {
  .tips-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep every header tab on one row, including the added knowledge tab. */
header nav,
.site-header nav,
header nav ul,
.site-header nav ul {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center;
  white-space: nowrap;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

header nav > *,
.site-header nav > *,
header nav li,
.site-header nav li,
header nav a,
.site-header nav a {
  flex: 0 0 auto !important;
  white-space: nowrap;
}

header nav,
.site-header nav,
.nav {
  flex: 1 1 0 !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0;
}

header nav ul,
.site-header nav ul,
.nav ul {
  width: 100% !important;
  max-width: none !important;
}

/* The header wrapper may use a different nav class on the compact layout. */
header:has(a[href="#tips"]) {
  width: 100% !important;
}

header nav:has(a[href="#tips"]),
header [class*="nav"]:has(a[href="#tips"]),
.site-header nav:has(a[href="#tips"]),
.site-header [class*="nav"]:has(a[href="#tips"]) {
  flex: 1 1 0 !important;
  width: 100% !important;
  max-width: none !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

header nav:has(a[href="#tips"]) ul,
header [class*="nav"]:has(a[href="#tips"]) ul,
.site-header nav:has(a[href="#tips"]) ul,
.site-header [class*="nav"]:has(a[href="#tips"]) ul {
  justify-content: flex-end !important;
  gap: 8px !important;
}

header nav:has(a[href="tips.html"]),
header [class*="nav"]:has(a[href="tips.html"]),
.site-header nav:has(a[href="tips.html"]),
.site-header [class*="nav"]:has(a[href="tips.html"]) {
  justify-content: flex-end !important;
}

header nav:has(a[href="tips.html"]) ul,
header [class*="nav"]:has(a[href="tips.html"]) ul,
.site-header nav:has(a[href="tips.html"]) ul,
.site-header [class*="nav"]:has(a[href="tips.html"]) ul {
  justify-content: flex-end !important;
  margin-left: auto !important;
}

/* Keep the main header tab group right-aligned after returning from tips.html. */
.site-header > nav,
.site-header > .nav,
.site-header > [class*="nav"] {
  justify-content: flex-end !important;
}

.site-header > nav ul,
.site-header > .nav ul,
.site-header > [class*="nav"] ul {
  justify-content: flex-end !important;
  margin-left: auto !important;
}

@media (max-width: 640px) {
  .site-header > nav,
  .site-header > .nav,
  .site-header > [class*="nav"] {
    flex: 0 1 auto !important;
    width: max-content !important;
    max-width: calc(100vw - 16px) !important;
    justify-content: flex-start !important;
    padding-left: 4px !important;
    padding-right: 4px !important;
  }

  .site-header > nav ul,
  .site-header > .nav ul,
  .site-header > [class*="nav"] ul {
    width: max-content !important;
    max-width: none !important;
    margin-left: 0 !important;
    justify-content: flex-start !important;
  }
}

header nav a:hover,
.site-header nav a:hover,
header [class*="nav"] a:hover,
.site-header [class*="nav"] a:hover {
  background: #13b35f !important;
  color: #fff !important;
}

header nav a,
.site-header nav a,
header [class*="nav"] a,
.site-header [class*="nav"] a {
  background: #fff4a8 !important;
  border: 1px solid #e4d45f;
}

header nav a:hover,
.site-header nav a:hover,
header [class*="nav"] a:hover,
.site-header [class*="nav"] a:hover {
  background: #13b35f !important;
  border-color: #13b35f;
  color: #fff !important;
}
/* 最終調整: スマホ以外のヘッダータブを右端に収める */
@media (min-width: 641px) {
  .site-header > .nav {
    flex: 0 1 auto !important;
    width: max-content !important;
    min-width: 0 !important;
    max-width: calc(100% - 190px) !important;
    margin-left: auto !important;
    justify-content: flex-end !important;
    overflow-x: auto;
  }
}

/* スマホからタブレットへ切り替わる幅だけ、ヘッダーを1段で安定させる */
@media (min-width: 641px) and (max-width: 980px) {
  .site-header {
    flex-wrap: nowrap !important;
  }

  .site-header > .nav {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: calc(100% - 150px) !important;
    min-width: 0 !important;
    overflow-x: auto;
    justify-content: flex-end !important;
  }
}

/* 最終優先: 641px以上ではブランドとナビを同じ行の2列に固定 */
@media (min-width: 641px) {
  .site-header {
    display: grid !important;
    grid-template-columns: max-content minmax(0, 1fr) !important;
    align-items: center !important;
  }

  .site-header > .nav {
    grid-column: 2 !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    justify-content: flex-end !important;
    overflow-x: auto;
  }
}

/* タブレット幅では4つのタブを残り幅に収め、右端の見切れを防ぐ */
@media (min-width: 641px) and (max-width: 980px) {
  .site-header > .nav {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }

  .site-header > .nav > a {
    min-width: 0;
    padding-inline: 4px;
    text-align: center;
    font-size: clamp(10px, 1.8vw, 13px);
  }
}
