.play-now-card--search {
  display: grid;
  grid-column: 1 / -1;
  gap: 16px;
  width: 100%;
  min-width: 0;
}

.search-catalog-status {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.88rem;
}

.search-game-view[hidden] {
  display: none;
}

.search-game-view--hub {
  display: grid;
  gap: 16px;
}

.search-game-hub-grid,
.search-game-home-sections,
.search-stage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.search-game-entry-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface-strong);
  padding: 16px;
  box-shadow: 0 10px 28px rgba(57, 45, 34, 0.08);
}

.search-game-entry-card.is-preparing {
  opacity: 0.78;
}

.search-game-entry-card__media {
  display: grid;
  place-items: center;
  min-height: 138px;
  border-radius: 16px;
  background: linear-gradient(145deg, #efe4d6, #dbcbb9);
  overflow: hidden;
}

.search-game-entry-card__media .higemegane-moustache-mark {
  width: 76px;
  height: 48px;
}

.search-game-entry-card__body {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
}

.search-game-entry-card__eyebrow,
.search-game-home-hero__eyebrow,
.search-stage-list-heading__eyebrow,
.search-game-home-panel__head p {
  margin: 0;
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.search-game-entry-card h4,
.search-game-home-hero h4,
.search-stage-list-heading h4,
.search-game-home-panel__head h5,
.search-stage-spotlight strong,
.search-series-card strong {
  margin: 0;
}

.search-game-entry-card h4,
.search-game-home-hero h4,
.search-stage-list-heading h4 {
  font-size: clamp(1.18rem, 2.2vw, 1.55rem);
}

.search-game-entry-card__description,
.search-game-entry-card__meta,
.search-game-home-hero__copy > p:last-child,
.search-stage-list-heading > div > p:last-child,
.search-stage-spotlight__copy p {
  margin: 0;
  color: var(--color-muted);
  line-height: 1.65;
}

.search-game-entry-card__meta {
  font-size: 0.82rem;
  font-weight: 750;
}

.search-inline-progress {
  width: 100%;
  display: grid;
  gap: 5px;
  color: var(--color-muted);
  font-size: 0.76rem;
  font-weight: 750;
}

.search-inline-progress__meter,
.search-game-home-progress__meter {
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: #ded2c4;
  overflow: hidden;
}

.search-inline-progress__meter > span,
.search-game-home-progress__meter > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-accent);
  transition: width 180ms ease;
}

.search-game-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--color-muted);
  font-size: 0.82rem;
}

.search-game-breadcrumbs__current {
  min-width: 0;
  font-weight: 800;
  color: var(--color-text);
}

.search-game-breadcrumbs__back {
  min-height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-surface-strong);
  color: var(--color-text);
  padding: 7px 12px;
  font-weight: 800;
}

.search-game-view--home,
.search-game-view--stages {
  display: grid;
  gap: 16px;
}

.search-game-home-hero {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) minmax(170px, 0.45fr);
  gap: 18px;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 22px;
  background: linear-gradient(135deg, #4b3f35, #6b5545);
  color: #fffaf3;
  padding: 22px;
}

.search-game-home-hero__mark {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 20px;
  background: rgba(255, 250, 243, 0.12);
}

.search-game-home-hero__mark .higemegane-moustache-mark {
  filter: brightness(0) invert(1);
}

.search-game-home-hero__copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.search-game-home-hero__copy > p:last-child {
  color: rgba(255, 250, 243, 0.8);
}

.search-game-home-progress {
  display: grid;
  gap: 8px;
  font-weight: 850;
}

.search-game-home-progress__meter {
  background: rgba(255, 250, 243, 0.2);
}

.search-game-home-progress__meter > span {
  background: #fff0bd;
}

.search-game-home-panel,
.search-series-section {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: rgba(255, 250, 243, 0.58);
  padding: 15px;
}

.search-game-home-panel--next {
  border-color: var(--color-border-strong);
  background: var(--color-surface-strong);
}

.search-game-home-panel__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.search-game-home-panel__head h5 {
  font-size: 1rem;
}

.search-stage-spotlight {
  display: grid;
  grid-template-columns: minmax(110px, 0.45fr) minmax(0, 1fr);
  gap: 13px;
  min-width: 0;
}

.search-stage-spotlight__media {
  display: grid;
  place-items: center;
  min-height: 130px;
  border-radius: 13px;
  background: #e7dccf;
  overflow: hidden;
}

.search-stage-spotlight__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-stage-spotlight__lock {
  font-size: 2rem;
}

.search-stage-spotlight__copy {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 7px;
}

.search-stage-spotlight__meta,
.search-stage-spotlight__best {
  color: var(--color-accent);
  font-size: 0.75rem;
  font-weight: 850;
}

.search-stage-spotlight.is-locked {
  opacity: 0.75;
}

.search-stage-home-empty {
  min-height: 130px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 13px;
  text-align: center;
}

.search-stage-home-empty span {
  color: var(--color-muted);
}

.search-series-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.search-series-card {
  display: grid;
  gap: 10px;
  border-radius: 14px;
  background: var(--color-surface-strong);
  padding: 13px;
}

.search-series-card__heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.search-series-card__heading span {
  color: var(--color-muted);
  font-size: 0.76rem;
}

.search-series-summary__empty {
  margin: 0;
  color: var(--color-muted);
}

.search-game-home-actions {
  display: flex;
  justify-content: flex-end;
}

.search-stage-list-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.search-stage-list-heading > div {
  display: grid;
  gap: 5px;
}

.search-stage-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-stage-filters button,
.search-game-side-switch button,
.search-game-zoom button {
  min-height: 44px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  background: var(--color-surface-strong);
  color: var(--color-text);
  padding: 8px 13px;
  font-weight: 750;
}

.search-stage-filters button.is-active,
.search-game-side-switch button.is-active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
}

.search-stage-card {
  min-width: 0;
}

.search-stage-card__button {
  position: relative;
  width: 100%;
  min-height: 116px;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface-strong);
  color: var(--color-text);
  padding: 10px;
  text-align: left;
  box-shadow: 0 7px 20px rgba(57, 45, 34, 0.07);
}

button.search-stage-card__button:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-1px);
}

.search-stage-card__button--locked {
  opacity: 0.76;
}

.search-stage-card__media {
  display: grid;
  place-items: center;
  width: 116px;
  height: 92px;
  border-radius: 11px;
  background: #ede4d8;
  overflow: hidden;
}

.search-stage-card__media:empty::before {
  content: "画像準備中";
  color: var(--color-muted);
  font-size: 0.76rem;
}

.search-stage-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-stage-card__lock {
  font-size: 1.8rem;
}

.search-stage-card__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.search-stage-card__header {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: start;
}

.search-stage-card__copy strong {
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.search-stage-card__copy > span {
  color: var(--color-muted);
  font-size: 0.78rem;
}

.search-stage-card__meta {
  color: var(--color-accent) !important;
  font-weight: 750;
  min-width: 0;
  overflow-wrap: anywhere;
}

.search-stage-card__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}

.search-stage-card__badges span {
  max-width: 100%;
  border-radius: 999px;
  background: rgba(37, 31, 26, 0.9);
  color: #fffaf3;
  padding: 3px 7px;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.search-stage-empty {
  display: grid;
  gap: 3px;
  place-items: center;
  min-height: 130px;
  border: 1px dashed var(--color-border-strong);
  border-radius: 16px;
  background: rgba(255, 250, 243, 0.58);
  padding: 22px;
  text-align: center;
}

.search-stage-empty[hidden] {
  display: none;
}

.search-stage-empty span {
  color: var(--color-muted);
}

@media (max-width: 900px) {
  .search-game-home-hero {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .search-game-home-hero__mark {
    width: 72px;
    height: 72px;
  }

  .search-game-home-progress {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .search-game-hub-grid,
  .search-game-home-sections,
  .search-series-summary,
  .search-stage-grid {
    grid-template-columns: 1fr;
  }

  .search-game-entry-card {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }

  .search-game-entry-card__media {
    min-height: 116px;
  }

  .search-game-home-hero {
    grid-template-columns: 58px minmax(0, 1fr);
    padding: 16px;
  }

  .search-game-home-hero__mark {
    width: 58px;
    height: 58px;
    border-radius: 14px;
  }

  .search-stage-spotlight {
    grid-template-columns: 104px minmax(0, 1fr);
  }

  .search-stage-card__button {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .search-stage-card__media {
    width: 96px;
    height: 82px;
  }

  .search-stage-list-heading {
    align-items: center;
  }

  .search-game-breadcrumbs {
    gap: 6px;
    font-size: 0.76rem;
  }

  .search-game-breadcrumbs__back {
    min-height: 36px;
    padding: 6px 10px;
  }
}

@media (max-width: 460px) {
  .search-game-entry-card {
    grid-template-columns: 1fr;
  }

  .search-game-entry-card__media {
    min-height: 96px;
  }

  .search-stage-spotlight {
    grid-template-columns: 1fr;
  }

  .search-stage-spotlight__media {
    min-height: 150px;
  }

  .search-stage-card__header {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-stage-card__badges {
    justify-content: flex-start;
  }
}

.search-game-dialog {
  width: min(1180px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  border: 0;
  border-radius: 22px;
  background: var(--color-surface);
  color: var(--color-text);
  padding: 0;
  box-shadow: 0 28px 80px rgba(27, 21, 17, 0.35);
}

.search-game-dialog::backdrop {
  background: rgba(28, 23, 19, 0.72);
  backdrop-filter: blur(4px);
}

.search-game-dialog__inner {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: calc(100dvh - 24px);
}

.search-game-dialog__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--color-border);
  padding: 17px 20px;
}

.search-game-dialog__header h3,
.search-game-dialog__header p,
.search-game-result h4,
.search-game-result p {
  margin: 0;
}

.search-game-dialog__header > div {
  min-width: 0;
}

.search-game-dialog__header > div > p:last-child {
  color: var(--color-muted);
}

.search-game-dialog__eyebrow {
  color: var(--color-accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
}

.search-game-dialog__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface-strong);
  color: var(--color-text);
  font-size: 1.4rem;
}

.search-game-dialog__body {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 16px 20px max(20px, env(safe-area-inset-bottom));
}

.search-game-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.search-game-metrics > div {
  display: grid;
  gap: 2px;
  border-radius: 12px;
  background: #eee5da;
  padding: 9px 11px;
}

.search-game-metrics span {
  color: var(--color-muted);
  font-size: 0.72rem;
}

.search-game-side-switch {
  gap: 8px;
  margin-bottom: 10px;
}

.search-game-side-switch:not([hidden]) {
  display: none;
}

.search-game-board {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  border-radius: 15px;
  background: #211c18;
  padding: 8px;
}

.search-game-board[data-mode="spot_difference"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.search-game-viewport {
  position: relative;
  min-width: 0;
  max-height: min(66dvh, 760px);
  border-radius: 10px;
  background: #0d0b0a;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: grab;
}

.search-game-viewport:active {
  cursor: grabbing;
}

.search-game-layer {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.search-game-layer > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
}

.search-game-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.search-game-marker {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 16px;
  min-height: 16px;
  border: 3px solid #ffd43d;
  border-radius: 999px;
  background: rgba(255, 212, 61, 0.16);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  text-shadow: 0 1px 3px #000;
  box-shadow: 0 0 0 3px rgba(28, 23, 19, 0.35);
}

.search-game-marker--hint {
  border-style: dashed;
  border-color: #fff3a8;
  background: rgba(255, 231, 121, 0.13);
  animation: search-hint-pulse 1.1s ease-in-out 3;
}

@keyframes search-hint-pulse {
  50% { box-shadow: 0 0 0 8px rgba(255, 231, 121, 0.24); }
}

.search-game-loading {
  grid-column: 1 / -1;
  min-height: 280px;
  display: grid;
  place-items: center;
  margin: 0;
  color: #fffaf3;
  text-align: center;
}

.search-game-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.search-game-zoom {
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-game-zoom button {
  border-radius: 10px;
}

.search-game-zoom output {
  min-width: 58px;
  text-align: center;
  font-weight: 800;
}

.search-game-feedback {
  min-height: 2.6em;
  margin: 12px 0 0;
  border-radius: 12px;
  background: #eee5da;
  padding: 10px 12px;
}

.search-game-feedback[data-kind="found"],
.search-game-feedback[data-kind="complete"] {
  background: #e0eee2;
  color: #244a2d;
}

.search-game-feedback[data-kind="miss"] {
  background: #f4e6df;
  color: #743225;
}

.search-game-feedback[data-kind="hint"] {
  background: #fff0bd;
  color: #5e4600;
}

.search-game-result {
  margin-top: 12px;
  border-radius: 15px;
  background: linear-gradient(135deg, #4b3f35, #6b5545);
  color: #fffaf3;
  padding: 16px;
}

.search-game-result > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .search-game-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
  }

  .search-game-dialog__inner {
    height: 100dvh;
    max-height: none;
  }

  .search-game-dialog__header {
    padding: max(12px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
  }

  .search-game-dialog__header > div > p:last-child {
    font-size: 0.82rem;
  }

  .search-game-dialog__body {
    padding-inline: max(10px, env(safe-area-inset-left));
  }

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

  .search-game-side-switch:not([hidden]) {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 4;
    background: var(--color-surface);
    padding-block: 4px 8px;
  }

  .search-game-board[data-mode="spot_difference"] {
    grid-template-columns: 1fr;
  }

  .search-game-viewport.is-mobile-hidden {
    display: none;
  }

  .search-game-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .search-game-zoom {
    display: grid;
    grid-template-columns: 44px 62px 44px minmax(0, 1fr);
  }

  .search-game-controls > .button {
    width: 100%;
    min-height: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-game-marker--hint {
    animation: none;
  }

  .search-stage-card__button:hover {
    transform: none;
  }
}

/* ========================================================================== 
 * v0.25.47 next-complete visual
 * Give the "全ステージクリア" NEXT card a dedicated completion visual instead
 * of an empty placeholder-like tile.
 * ========================================================================== */
.search-stage-spotlight__media.is-complete {
  background: linear-gradient(180deg, #efe3d4, #e5d4c1);
  box-shadow: inset 0 0 0 1px rgba(101, 77, 62, 0.08);
}

.search-stage-spotlight__complete-mark {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  color: #6c5745;
  text-align: center;
}

.search-stage-spotlight__complete-badge {
  position: relative;
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #fff9f0, #f0ddc4 70%);
  box-shadow:
    inset 0 0 0 2px rgba(122, 91, 58, 0.14),
    0 8px 16px rgba(74, 56, 42, 0.08);
}

.search-stage-spotlight__complete-badge::before,
.search-stage-spotlight__complete-badge::after {
  content: "";
  position: absolute;
  bottom: -12px;
  width: 18px;
  height: 24px;
  border-radius: 0 0 8px 8px;
  background: linear-gradient(180deg, #c14a37, #a93d2c);
}

.search-stage-spotlight__complete-badge::before {
  left: 15px;
  transform: rotate(-7deg);
}

.search-stage-spotlight__complete-badge::after {
  right: 15px;
  transform: rotate(7deg);
}

.search-stage-spotlight__complete-badge .higemegane-moustache-mark {
  width: 38px;
  color: #7c634f;
  transform: translateY(8px);
}

.search-stage-spotlight__complete-check {
  position: absolute;
  top: 11px;
  right: 13px;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 999px;
  background: #b54433;
  color: #fffaf3;
  font-size: 0.9rem;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(84, 45, 35, 0.18);
}

.search-stage-spotlight__complete-caption {
  font-size: 0.64rem;
  line-height: 1;
  letter-spacing: 0.18em;
  font-weight: 900;
  color: #8c6a43;
}

.search-stage-spotlight__complete-sub {
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 800;
  color: #6c5745;
}

@media (max-width: 720px) {
  .search-stage-spotlight__complete-badge {
    width: 68px;
    height: 68px;
  }

  .search-stage-spotlight__complete-badge .higemegane-moustache-mark {
    width: 34px;
  }
}

/* ========================================================================== 
 * v0.25.47 complete-state visual cleanup
 * Simplify the v0.25.47 completion mark: no ribbon tails, no tiny duplicate
 * copy, and no legacy standalone check. The adjacent text already explains
 * the state, so the thumbnail is now a quiet moustache + check medallion.
 * ========================================================================== */
.search-stage-spotlight__media.is-complete {
  background: linear-gradient(180deg, #eee3d6, #e6d8c8);
}

.search-stage-spotlight__complete-mark {
  gap: 0;
}

.search-stage-spotlight__complete-badge {
  width: 86px;
  height: 86px;
  border-radius: 26px;
  background: linear-gradient(145deg, #fffaf2, #ead9c5);
  box-shadow:
    inset 0 0 0 1px rgba(108, 83, 61, 0.14),
    0 8px 18px rgba(70, 54, 42, 0.07);
}

.search-stage-spotlight__complete-badge::before,
.search-stage-spotlight__complete-badge::after {
  content: none;
  display: none;
}

.search-stage-spotlight__complete-badge .higemegane-moustache-mark {
  width: 47px;
  color: #705b49;
  transform: none;
}

.search-stage-spotlight__complete-check {
  top: 8px;
  right: 8px;
  width: 27px;
  height: 27px;
  background: #b33f31;
  font-size: 0.92rem;
  box-shadow:
    0 0 0 3px #f8efe4,
    0 3px 8px rgba(84, 45, 35, 0.16);
}

.search-stage-spotlight__complete-caption,
.search-stage-spotlight__complete-sub {
  display: none;
}

@media (max-width: 720px) {
  .search-stage-spotlight__complete-badge {
    width: 76px;
    height: 76px;
    border-radius: 23px;
  }

  .search-stage-spotlight__complete-badge .higemegane-moustache-mark {
    width: 42px;
  }

  .search-stage-spotlight__complete-check {
    width: 25px;
    height: 25px;
  }
}

/* ========================================================================== 
 * v0.25.47 single-series progress width
 * When only one series exists, do not leave an empty second-column slot.
 * Multiple series retain the existing two-column desktop grid.
 * ========================================================================== */
.search-series-card:only-child {
  grid-column: 1 / -1;
}


/*
 * v0.25.47 search hub hierarchy simplification
 * The outer "探索ゲーム" card header is the hub heading.
 * Normal loaded state goes directly to the two game cards.
 */
.search-catalog-status[hidden] {
  display: none;
}

.search-game-view--hub {
  gap: 0;
}
