/* Tips index — opt-in page-owned styles, original card rules retained. */
.wik-tips { --gold-2:#f3d27a; --glass-line:rgba(255,255,255,.12); }
.wik-tips .wik-tips-main { padding-top:.25rem; min-width:0; }
.wik-tips .tips-grid { margin-top:clamp(.7em,2vw,1em); }
html[lang="ru"] .wik-tips .tips-card-title {font-family:"PT Sans Narrow","PT Sans",sans-serif; font-weight:700; letter-spacing:0;}
/* Original adopted two-column card geometry and per-language text exceptions follow. */
.tips-grid {
  --tips-space: clamp(0.68em, 3.2vw, 0.96em);
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin-top: clamp(1.55em, 6vw, 2em);
  padding: 0;
}

/* 親幅から中央余白を引き、残りを正確に2分割 */
.tips-card {
  position: relative;
  display: block;
  flex: 0 0 calc((100% - var(--tips-space)) / 2);
  width: calc((100% - var(--tips-space)) / 2);
  max-width: calc((100% - var(--tips-space)) / 2);
  min-width: 0;
  aspect-ratio: 1 / 1;
  margin: 0 0 var(--tips-space);
  overflow: hidden;
  border: 0.075em solid var(--glass-line);
  border-radius: clamp(1em, 4vw, 1.45em);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.016)),
    rgba(10, 11, 10, 0.56);
  color: inherit;
  text-decoration: none;
  box-shadow:
    0 1.1em 2.15em rgba(0, 0, 0, 0.27),
    inset 0 0.075em 0 rgba(255, 255, 255, 0.065);
  isolation: isolate;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

/* 横方向のカード間隔
   縦方向と同じ --tips-space を使用 */
.tips-card:nth-child(even) {
  margin-left: var(--tips-space);
}

/* 最終行の下にはカード間隔を残さない */
.tips-card:last-child,
.tips-card:nth-last-child(2):nth-child(odd) {
  margin-bottom: 0;
}

/* ---------------------------------------------------------
   Card image
   --------------------------------------------------------- */

.tips-card-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  overflow: hidden;
}

.tips-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--tips-image-position, center);
  transform: scale(1.002);
  transition: transform 240ms ease;
}

.tips-card-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.14) 0%,
      rgba(0, 0, 0, 0.03) 36%,
      rgba(0, 0, 0, 0.24) 58%,
      rgba(0, 0, 0, 0.88) 100%
    );
}

/* ---------------------------------------------------------
   Card content
   --------------------------------------------------------- */

.tips-card-content {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  padding: clamp(0.68em, 3vw, 0.95em);
  pointer-events: none;
}

.tips-card-category {
  position: absolute;
  top: clamp(0.68em, 3vw, 0.95em);
  left: clamp(0.68em, 3vw, 0.95em);
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 1.5em);
  min-height: 1.8em;
  padding: 0 0.62em;
  overflow: hidden;
  border: 0.075em solid rgba(243, 210, 122, 0.26);
  border-radius: 999em;
  background: rgba(5, 6, 6, 0.58);
  backdrop-filter: blur(0.42em);
  -webkit-backdrop-filter: blur(0.42em);
  color: var(--gold-2);
  font-size: clamp(0.56rem, 2.25vw, 0.68rem);
  font-weight: 820;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.tips-card-title {
  position: absolute;
  left: clamp(0.72em, 3.1vw, 1em);
  right: clamp(2.15em, 8vw, 2.8em);
  bottom: clamp(0.72em, 3.1vw, 1em);
  display: -webkit-box;
  overflow: hidden;
  color: #ffffff;
  font-size: clamp(0.88rem, 3.55vw, 1.08rem);
  font-weight: 780;
  line-height: 1.22;
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
  text-shadow: 0 0.12em 0.55em rgba(0, 0, 0, 0.82);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.tips-card-arrow {
  position: absolute;
  right: clamp(0.65em, 2.8vw, 0.9em);
  bottom: clamp(0.65em, 2.8vw, 0.9em);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(1.65em, 6.6vw, 1.95em);
  aspect-ratio: 1 / 1;
  border: 0.075em solid rgba(243, 210, 122, 0.3);
  border-radius: 50%;
  background: rgba(5, 6, 6, 0.55);
  backdrop-filter: blur(0.42em);
  -webkit-backdrop-filter: blur(0.42em);
  color: var(--gold-2);
  font-size: clamp(0.76rem, 3vw, 0.94rem);
  font-weight: 760;
  line-height: 1;
}

/* ---------------------------------------------------------
   Pointer interaction
   タッチ端末では不要なhoverを発生させない
   --------------------------------------------------------- */

@media (hover: hover) and (pointer: fine) {
  .tips-card:hover {
    border-color: rgba(243, 210, 122, 0.55);
    box-shadow:
      0 1.2em 2.35em rgba(0, 0, 0, 0.34),
      inset 0 0.075em 0 rgba(255, 255, 255, 0.08);
    transform: translateY(-0.08em);
  }

  .tips-card:hover .tips-card-image {
    transform: scale(1.035);
  }
}

.tips-card:focus-visible {
  border-color: var(--gold-2);
  outline: 0.12em solid rgba(243, 210, 122, 0.42);
  outline-offset: 0.14em;
}

.tips-card:active {
  transform: scale(0.985);
}

/* ---------------------------------------------------------
   Multilingual typography
   カード寸法は絶対に変更しない
   --------------------------------------------------------- */

html[lang="en"] .tips-card-title {
  font-size: clamp(0.8rem, 3.2vw, 1rem);
  letter-spacing: -0.01em;
}

html[lang="ru"] .tips-card-title {
  font-size: clamp(0.72rem, 2.9vw, 0.92rem);
  line-height: 1.18;
}

html[lang="es"] .tips-card-title {
  font-size: clamp(0.76rem, 3vw, 0.96rem);
  line-height: 1.2;
}

/* ---------------------------------------------------------
   Motion accessibility
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .tips-card,
  .tips-card-image {
    transition: none;
  }

  .tips-card:hover,
  .tips-card:active {
    transform: none;
  }

  .tips-card:hover .tips-card-image {
    transform: scale(1.002);
  }
}


.wik-tips .tips-grid { margin-top:clamp(.7em,2vw,1em); }
