:root {
  --blue: #266ede;
  --blue-dark: #1b52aa;
  --blue-light: #e6f0ff;
  --red: #e8483e;
  --red-dark: #c53229;
  --ink: #1a1c24;
  --ink-soft: #3a3f50;
  --cream-top: #fff4ba;
  --cream-bottom: #ffe096;
  --card-bg: #fffdf7;
  --lid-bg: #ffd269;
  --lid-accent: #f3b93a;
  --border-w: 3px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --shadow-box: 0 5px 0 var(--ink);
  --shadow-box-lg: 0 8px 0 var(--ink);
  --shadow-btn: 0 4px 0 var(--ink);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--cream-bottom);
  background-image: linear-gradient(180deg, var(--cream-top) 0%, var(--cream-bottom) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Meiryo", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--cream-bottom);
  background-image: linear-gradient(180deg, var(--cream-top) 0%, var(--cream-bottom) 100%);
  background-repeat: no-repeat;
  background-size: 100% 100%;
  line-height: 1.6;
  overflow-x: hidden;
  word-break: break-word;
  overflow-wrap: anywhere;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 14px;
}

/* ===== 共通の上の帯（ヘッダー） ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 244, 186, 0.95);
  border-bottom: var(--border-w) solid var(--ink);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 58px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-box-icon {
  position: relative;
  width: 28px;
  height: 24px;
  background: var(--blue);
  border: 2.5px solid var(--ink);
  border-radius: 5px;
  box-shadow: 0 2px 0 var(--ink);
  display: inline-block;
  flex-shrink: 0;
}

.brand-box-icon::before {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: -6px;
  height: 7px;
  background: var(--red);
  border: 2.5px solid var(--ink);
  border-radius: 4px;
  transform-origin: left bottom;
  transform: rotate(-8deg);
  transition: transform 0.25s ease;
}

.brand-link:hover .brand-box-icon::before {
  transform: rotate(-22deg) translateY(-2px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  font-size: 0.88rem;
  font-weight: 800;
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 var(--ink);
}

.nav-link:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--ink);
}

.nav-link--play {
  background: var(--blue);
  color: #ffffff;
}

.nav-link--play:hover,
.nav-link--play:focus-visible {
  background: var(--blue-dark);
  color: #ffffff;
}

/* ===== トップ：ヒーロー（大きな箱のフタが開いて主人公が顔を出す） ===== */
.hero-section {
  padding: 24px 0 18px;
  text-align: center;
}

.hero-card {
  background: var(--card-bg);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-box-lg);
  padding: 24px 16px 22px;
  position: relative;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  width: 210px;
  height: 185px;
  margin: 12px auto 10px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 箱の奥 */
.hero-box-inside {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 12px;
  height: 108px;
  background: radial-gradient(circle at 50% 35%, #374362 0%, #1c2030 78%);
  border: var(--border-w) solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  z-index: 1;
}

.box-gear {
  position: absolute;
  border-radius: 50%;
  border: 3px dashed rgba(255, 226, 74, 0.72);
  background: radial-gradient(circle, rgba(255, 226, 74, 0.25) 0%, rgba(255, 226, 74, 0.04) 70%);
  opacity: 0.35;
  transform: scale(0.75) rotate(0deg);
  transition: transform 0.8s cubic-bezier(0.22, 1.28, 0.36, 1), opacity 0.5s ease;
}

.box-gear--lg {
  width: 58px;
  height: 58px;
  left: 10px;
  top: 14px;
}

.box-gear--sm {
  width: 44px;
  height: 44px;
  right: 12px;
  top: 20px;
  border-color: rgba(74, 210, 255, 0.78);
  background: radial-gradient(circle, rgba(74, 210, 255, 0.28) 0%, rgba(74, 210, 255, 0.04) 70%);
}

.box-spark {
  position: absolute;
  width: 14px;
  height: 14px;
  right: 28px;
  bottom: 16px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 3px;
  transform: rotate(45deg) scale(0.6);
  opacity: 0.3;
  transition: transform 0.65s ease, opacity 0.5s ease;
}

.hero-box-stage.is-open .box-gear--lg {
  opacity: 0.95;
  transform: scale(1) rotate(55deg);
}

.hero-box-stage.is-open .box-gear--sm {
  opacity: 0.95;
  transform: scale(1) rotate(-70deg);
}

.hero-box-stage.is-open .box-spark {
  opacity: 0.95;
  transform: rotate(45deg) scale(1.08);
}

/* 主人公（wave） */
.hero-chara-wrap {
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 136px;
  height: 136px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform: translate(-50%, 62px) scale(0.92);
  transition: transform 0.65s cubic-bezier(0.22, 1.28, 0.36, 1);
  z-index: 2;
  pointer-events: none;
}

.hero-chara-wrap img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 3px 0 rgba(26, 28, 36, 0.25));
}

/* 箱の手前の壁 */
.hero-box-front {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 8px;
  height: 68px;
  background: var(--lid-bg);
  border: var(--border-w) solid var(--ink);
  border-radius: 0 0 12px 12px;
  box-shadow: 0 5px 0 var(--ink);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.hero-box-handle {
  width: 46px;
  height: 12px;
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
}

.hero-box-label {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.75);
  padding: 1px 8px;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
}

/* 箱のフタ */
.hero-box-lid {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 72px;
  height: 28px;
  background: var(--blue);
  border: var(--border-w) solid var(--ink);
  border-radius: 10px 10px 4px 4px;
  box-shadow: 0 3px 0 var(--ink);
  z-index: 4;
  transform-origin: 95% 100%;
  transform: translateY(0) rotate(0deg);
  transition: transform 0.65s cubic-bezier(0.22, 1.25, 0.36, 1);
}

.hero-box-lid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  width: 38px;
  height: 10px;
  background: var(--red);
  border: 2.5px solid var(--ink);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
}

/* フタが開いた状態（箱の奥の右の角を軸にして右うしろへ開き、主人公の頭と重ならない） */
.hero-stage.is-open .hero-box-lid {
  z-index: 1;
  transform: translate(10px, -10px) rotate(65deg) scale(0.78);
}

.hero-stage.is-open .hero-chara-wrap {
  transform: translate(-50%, -18px) scale(1);
}

.hero-title {
  margin: 6px 0 8px;
  font-size: clamp(1.55rem, 5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  margin: 0 auto 18px;
  max-width: 520px;
  font-size: clamp(0.95rem, 2.8vw, 1.08rem);
  font-weight: 700;
  color: var(--ink-soft);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 11px 18px;
  font-size: 0.96rem;
  font-weight: 900;
  border: var(--border-w) solid var(--ink);
  border-radius: 999px;
  box-shadow: var(--shadow-btn);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  text-align: center;
  line-height: 1.25;
  font-family: inherit;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--ink);
}

.btn--primary {
  background: var(--blue);
  color: #ffffff;
}

.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--blue-dark);
}

.btn--subscribe {
  background: var(--red);
  color: #ffffff;
}

.btn--subscribe:hover,
.btn--subscribe:focus-visible {
  background: var(--red-dark);
}

.btn--light {
  background: #ffffff;
  color: var(--ink);
}

.hero-game-cta {
  margin: 0 auto 12px;
  max-width: 440px;
}

.btn--game {
  width: 100%;
  background: linear-gradient(135deg, #1b6ca8 0%, #0d2b52 100%);
  color: #ffffff;
  padding: 12px 16px;
  font-size: 0.98rem;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn--game:hover,
.btn--game:focus-visible {
  background: linear-gradient(135deg, #227dc0 0%, #12396b 100%);
  color: #ffffff;
}

.hero-game-badge {
  display: inline-block;
  background: var(--lid-bg);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 2px 9px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  line-height: 1.3;
  white-space: nowrap;
}

.hero-game-text {
  white-space: nowrap;
  font-size: clamp(0.76rem, 3.8vw, 0.96rem);
}

/* ===== セクション共通 ===== */
.section {
  padding: 16px 0 20px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.section-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: clamp(1.2rem, 3.8vw, 1.5rem);
  font-weight: 900;
}

.section-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--blue);
  color: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--ink);
}

.section-badge--red {
  background: var(--red);
}

/* ===== 「あそぶ」ゲームカード ===== */
.game-banner {
  position: relative;
  display: block;
  margin-top: 14px;
  background: linear-gradient(160deg, #1b6ca8 0%, #0d2b52 55%, #071326 100%);
  color: #ffffff;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-box-lg);
  padding: 20px 18px 18px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-banner::before {
  content: "あそぶ";
  position: absolute;
  left: 18px;
  top: -15px;
  background: var(--lid-bg);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
  padding: 3px 14px;
  border: var(--border-w) solid var(--ink);
  border-radius: 8px 8px 3px 3px;
  box-shadow: 0 2px 0 var(--ink);
  transform-origin: left bottom;
  transition: transform 0.3s ease;
}

.game-banner:hover,
.game-banner:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 0 var(--ink);
}

.game-banner:hover::before,
.game-banner:focus-visible::before {
  transform: translateY(-4px) rotate(-4deg);
}

.game-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.game-banner-text {
  flex: 1 1 220px;
}

.game-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.game-title {
  margin: 0 0 6px;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  font-weight: 900;
  line-height: 1.3;
}

.game-desc {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #dbeafe;
  font-weight: 600;
}

.game-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #ffffff;
  font-weight: 900;
  font-size: 0.92rem;
  padding: 8px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
}

.game-banner-art {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 108px;
  height: 108px;
  margin: 0 auto;
  background: radial-gradient(circle, rgba(72, 187, 255, 0.35) 0%, rgba(7, 19, 38, 0) 72%);
  border-radius: 50%;
}

.game-banner-art img {
  width: auto;
  height: 96px;
  max-width: 96px;
  object-fit: contain;
}

.game-related-bar {
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-sm);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.game-related-label {
  color: var(--ink-soft);
}

.game-related-link {
  color: var(--blue-dark);
  text-decoration: underline;
  font-weight: 900;
}

.game-related-link:hover,
.game-related-link:focus-visible {
  color: var(--red);
}

/* ===== 触ってわかる！動画のしくみシミュレーター (#futa-lab) ===== */
.futa-lab {
  margin-top: 20px;
  background: var(--card);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px 22px;
}

.futa-lab-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px dashed rgba(26, 28, 36, 0.2);
}

.futa-lab-badge {
  display: inline-block;
  padding: 2px 10px;
  margin-bottom: 4px;
  background: var(--yellow);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 900;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.futa-lab-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.3;
}

.futa-lab-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lab-tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 14px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 900;
  color: var(--ink);
  background: var(--bg-sub);
  border: 2px solid var(--ink);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
}

.lab-tab-btn:hover,
.lab-tab-btn:focus-visible {
  background: var(--yellow-soft);
}

.lab-tab-btn.is-active {
  background: var(--blue);
  color: #ffffff;
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.lab-pane-desc {
  margin: 0 0 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.lab-hour-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: var(--bg-sub);
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.lab-control-label {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--ink);
}

.lab-hour-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.lab-hour-btn,
.lab-lot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 12px;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--ink);
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.12s ease, transform 0.1s ease;
}

.lab-hour-btn:hover,
.lab-lot-btn:hover {
  background: var(--yellow-soft);
}

.lab-hour-btn.is-active,
.lab-lot-btn.is-active {
  background: var(--yellow);
  box-shadow: 0 2px 0 var(--ink);
}

.energy-bars {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.energy-row {
  padding: 10px 12px;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 10px;
}

.energy-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 6px;
}

.energy-row-name {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--ink);
}

.energy-row-price {
  font-size: 0.86rem;
  font-weight: 900;
  color: var(--blue-dark);
}

.energy-row-sub {
  margin-top: 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.lab-bar-track {
  width: 100%;
  height: 12px;
  background: var(--bg-sub);
  border: 2px solid var(--ink);
  border-radius: 999px;
  overflow: hidden;
}

.lab-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.lab-bar-fill--red, .lab-bar-fill.is-red { background: var(--red); }
.lab-bar-fill--orange, .lab-bar-fill.is-warm { background: #f28b1d; }
.lab-bar-fill--yellow { background: #e8b917; }
.lab-bar-fill--green, .lab-bar-fill.is-green { background: var(--green); }
.lab-bar-fill--blue, .lab-bar-fill.is-blue { background: var(--blue); }

.lab-bar-fill--100 { width: 100%; }
.lab-bar-fill--47 { width: 47%; }
.lab-bar-fill--41 { width: 41%; }
.lab-bar-fill--36 { width: 36%; }
.lab-bar-fill--18 { width: 18%; }
.lab-bar-fill--16 { width: 16%; }
.lab-bar-fill--4 { width: 6%; }
.lab-bar-fill--2 { width: 4%; }
.lab-bar-fill--1 { width: 3%; }

.lottery-summary-card {
  margin-bottom: 12px;
  padding: 12px 14px;
  background: var(--yellow-soft);
  border: 2px solid var(--ink);
  border-radius: 12px;
}

.lottery-lead {
  margin: 0 0 10px;
  font-size: 0.92rem;
  font-weight: 900;
  color: var(--ink);
}

.lottery-subhead {
  margin: 10px 0 8px;
  font-size: 0.84rem;
  font-weight: 900;
  color: var(--ink-soft);
}

.lab-pane-note {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.lab-video-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 800;
}

.lab-video-link {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  background: var(--bg-sub);
  color: var(--blue-dark);
  border: 2px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 900;
}

.lab-video-link:hover,
.lab-video-link:focus-visible {
  background: var(--yellow);
  color: var(--ink);
}

/* ===== キーワード検索バー（ショートの上） ===== */
.shorts-search-bar {
  margin-bottom: 14px;
}

.shorts-search-input {
  width: 100%;
  max-width: 480px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
}

.shorts-search-input:focus {
  outline: none;
  background: #ffffff;
  border-color: var(--blue);
}

.shorts-long-matches {
  margin: 0 0 14px;
  padding: 10px 14px;
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 0 3px 0 var(--ink);
  font-size: 0.86rem;
  font-weight: 800;
}

.shorts-long-matches[hidden] {
  display: none !important;
}

.shorts-long-matches-title {
  margin: 0 0 6px;
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.shorts-long-matches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shorts-long-matches-link {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.shorts-long-matches-link:hover,
.shorts-long-matches-link:focus-visible {
  color: var(--blue-dark);
}

.shorts-empty {
  margin: 18px 0;
  padding: 16px;
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  font-weight: 800;
  text-align: center;
}

/* ===== 分類フィルター（ショートの上） ===== */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.cat-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 7px 13px;
  background: var(--card-bg);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.cat-btn:hover,
.cat-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--ink);
  background: #ffffff;
}

.cat-btn.is-active,
.cat-btn[aria-pressed="true"] {
  background: var(--blue);
  color: #ffffff;
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--ink);
}

/* ===== 動画カードのグリッド ===== */
/* ショート・関連動画：スマホは2列、PCは4列 */
.video-grid,
.video-grid--shorts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 10px;
  padding-top: 8px;
}

/* ロング：スマホでは横にスワイプする1列（1枚と次の端が見える幅） */
.video-grid--long {
  display: flex;
  flex-wrap: nowrap;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 18px 4px 12px;
  scroll-padding-left: 4px;
}

.video-grid--long > .futa-card {
  flex: 0 0 78%;
  max-width: 288px;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .video-grid,
  .video-grid--shorts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px 14px;
    padding-top: 10px;
  }

  .video-grid--long {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px 16px;
    overflow-x: visible;
    scroll-snap-type: none;
    padding: 10px 0 0;
  }

  .video-grid--long > .futa-card {
    flex: initial;
    max-width: none;
  }
}

/* 「もっと見る」ボタン枠 */
.shorts-more-wrap {
  margin-top: 22px;
  text-align: center;
}

.shorts-more-wrap[hidden] {
  display: none !important;
}

.shorts-more-btn {
  min-width: 200px;
}

/* ===== フタのある箱カード（.futa-card） ===== */
.futa-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--card-bg);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-box);
  margin-top: 12px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.futa-card[hidden] {
  display: none !important;
}

/* 箱の上のフタ */
.futa-card-lid {
  position: relative;
  z-index: 3;
  margin: -12px 6px 0;
  height: 23px;
  background: var(--lid-bg);
  border: 2.5px solid var(--ink);
  border-radius: 8px 8px 4px 4px;
  box-shadow: 0 2px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 0 6px;
  transform-origin: 15% 100%;
  transform: translateY(5px) rotate(0deg);
  transition: transform 0.42s cubic-bezier(0.22, 1.2, 0.36, 1), background-color 0.25s ease;
}

/* フタの上の赤いツマミ */
.futa-card-lid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -7px;
  transform: translateX(-50%);
  width: 22px;
  height: 6px;
  background: var(--red);
  border: 2px solid var(--ink);
  border-bottom: none;
  border-radius: 5px 5px 0 0;
}

.lid-cat {
  font-size: 0.64rem;
  font-weight: 900;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.lid-kind {
  font-size: 0.6rem;
  font-weight: 900;
  padding: 0 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.75);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  flex-shrink: 0;
}

/* 箱の中のサムネイル窓 */
.futa-card-thumb-wrap {
  position: relative;
  margin: 0 6px;
  aspect-ratio: 16 / 9;
  background: #1a1c24;
  border: 2px solid var(--ink);
  border-radius: 7px;
  overflow: hidden;
}

/* ショートのカードは縦長（3:4）にして中央の縦長映像だけを見せる */
.futa-card--short .futa-card-thumb-wrap,
.video-grid--shorts .futa-card-thumb-wrap {
  aspect-ratio: 3 / 4;
}

.futa-card-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateY(5px) scale(0.97);
  filter: brightness(0.92);
  transition: transform 0.42s cubic-bezier(0.22, 1.15, 0.36, 1), filter 0.35s ease;
}

.futa-card--short .futa-card-thumb,
.video-grid--shorts .futa-card-thumb {
  transform: translateY(5px) scale(1.35);
}

.futa-card-duration {
  position: absolute;
  right: 5px;
  bottom: 5px;
  background: rgba(26, 28, 36, 0.88);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.futa-card-body {
  padding: 7px 8px 10px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.futa-card-title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.38;
  color: var(--ink);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

@media (min-width: 768px) {
  .futa-card {
    margin-top: 14px;
  }

  .futa-card-lid {
    margin: -14px 8px 0;
    height: 25px;
    padding: 0 8px;
  }

  .lid-cat {
    font-size: 0.7rem;
  }

  .lid-kind {
    font-size: 0.65rem;
    padding: 0 5px;
  }

  .futa-card-thumb-wrap {
    margin: 0 8px;
    border-width: 2.5px;
  }

  .futa-card-body {
    padding: 9px 10px 12px;
  }

  .futa-card-title {
    font-size: 0.86rem;
    line-height: 1.42;
  }

  .video-grid--long .futa-card-title {
    font-size: 0.92rem;
  }
}

/* IntersectionObserver で画面に入ったとき：フタが少し開いてサムネイルが見える */
.futa-card.is-inview .futa-card-lid {
  transform: translateY(-3px) rotate(-2.5deg);
}

.futa-card.is-inview .futa-card-thumb {
  transform: translateY(0) scale(1);
  filter: brightness(1);
}

.futa-card--short.is-inview .futa-card-thumb,
.video-grid--shorts .futa-card.is-inview .futa-card-thumb {
  transform: translateY(0) scale(1.38);
}

/* マウスや指が乗ったとき：フタがさらにパカッと開く */
.futa-card:hover,
.futa-card:focus-visible,
.futa-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 8px 0 var(--ink);
}

.futa-card:hover .futa-card-lid,
.futa-card:focus-visible .futa-card-lid,
.futa-card:focus-within .futa-card-lid {
  background: var(--blue);
  color: #ffffff;
  transform: translate(-4px, -11px) rotate(-7deg);
}

.futa-card:hover .lid-cat,
.futa-card:focus-visible .lid-cat,
.futa-card:focus-within .lid-cat {
  color: #ffffff;
}

.futa-card:hover .futa-card-thumb,
.futa-card:focus-visible .futa-card-thumb,
.futa-card:focus-within .futa-card-thumb {
  transform: translateY(0) scale(1.04);
  filter: brightness(1.03);
}

.futa-card--short:hover .futa-card-thumb,
.futa-card--short:focus-visible .futa-card-thumb,
.futa-card--short:focus-within .futa-card-thumb,
.video-grid--shorts .futa-card:hover .futa-card-thumb,
.video-grid--shorts .futa-card:focus-visible .futa-card-thumb,
.video-grid--shorts .futa-card:focus-within .futa-card-thumb {
  transform: translateY(0) scale(1.43);
}

/* ===== 動画ページ（site/v/<ID>.html） ===== */
.video-page {
  padding: 18px 0 32px;
}

.breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 5px;
  font-size: 0.88rem;
  font-weight: 800;
  padding: 6px 14px;
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 2px 0 var(--ink);
}

.back-link:hover,
.back-link:focus-visible {
  background: #ffffff;
}

.video-main-card {
  background: var(--card-bg);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-box-lg);
  padding: 20px 14px 22px;
  margin-bottom: 24px;
}

.video-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.video-cat-pill {
  display: inline-block;
  padding: 3px 11px;
  font-size: 0.78rem;
  font-weight: 900;
  background: var(--lid-bg);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.video-kind-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  background: var(--blue-light);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.video-page-title {
  margin: 0 0 22px;
  font-size: clamp(1.2rem, 4.2vw, 1.65rem);
  font-weight: 900;
  line-height: 1.38;
}

/* フタの開く箱の中の動画プレーヤー */
.player-box {
  position: relative;
  margin: 18px auto 8px;
  /* 開いたフタと取っ手が題名に重ならないための空間。 */
  padding-top: 40px;
  width: 100%;
}

.player-box--long {
  max-width: 760px;
  padding-top: clamp(40px, 9vw, 88px);
}

.player-box--short {
  max-width: 360px;
}

.player-box-lid {
  position: relative;
  z-index: 3;
  height: 30px;
  margin: 0 6px -4px;
  background: var(--lid-bg);
  border: var(--border-w) solid var(--ink);
  border-radius: 10px 10px 4px 4px;
  box-shadow: 0 3px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 900;
  transform-origin: 15% 100%;
  transform: translateY(-2px) rotate(-2deg);
  transition: transform 0.45s cubic-bezier(0.22, 1.2, 0.36, 1), background-color 0.25s ease, color 0.25s ease;
}

.player-box-lid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  transform: translateX(-50%);
  width: 34px;
  height: 8px;
  background: var(--red);
  border: 2.5px solid var(--ink);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
}

.player-box:hover .player-box-lid,
.player-box.is-playing .player-box-lid {
  background: var(--blue);
  color: #ffffff;
  transform: translate(-6px, -12px) rotate(-6deg);
}

.player-stage {
  position: relative;
  width: 100%;
  background: #0f1117;
  border: var(--border-w) solid var(--ink);
  border-radius: 12px;
  box-shadow: var(--shadow-box);
  overflow: hidden;
}

.player-stage--long {
  aspect-ratio: 16 / 9;
}

.player-stage--short {
  aspect-ratio: 9 / 16;
}

.video-facade {
  appearance: none;
  border: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  background: #0f1117;
  cursor: pointer;
  position: relative;
  display: block;
}

.video-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.video-facade:hover img,
.video-facade:focus-visible img {
  transform: scale(1.03);
  filter: brightness(0.9);
}

.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--red);
  color: #ffffff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 900;
  border: var(--border-w) solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform 0.15s ease, background-color 0.15s ease;
  white-space: nowrap;
}

.play-icon-triangle {
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 13px solid #ffffff;
  display: inline-block;
}

.video-facade:hover .play-badge,
.video-facade:focus-visible .play-badge {
  background: var(--red-dark);
  transform: translate(-50%, -54%) scale(1.05);
}

.player-stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* notes.json の説明（ひとこと・出どころ） */
.video-notes {
  margin-top: 20px;
  padding: 16px;
  background: #fff9db;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 0 var(--ink);
}

.video-notes-inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.video-notes-chara {
  width: auto;
  height: 64px;
  max-width: 48px;
  object-fit: contain;
  flex-shrink: 0;
}

.video-notes-body {
  flex: 1;
}

.video-notes-title {
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 900;
}

.video-notes-text {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

.video-notes-lead {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  padding: 8px 12px;
  border-left: 4px solid var(--blue);
  border-radius: 6px;
}

.video-notes-disclaimer {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink-soft);
}

.video-notes-text + .video-notes-text {
  margin-top: 8px;
}

.video-sources-details {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 2px dashed rgba(26, 28, 36, 0.25);
  font-size: 0.84rem;
}

.video-sources-summary {
  cursor: pointer;
  font-weight: 900;
  color: var(--ink);
  padding: 4px 8px;
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  border: 2px solid var(--ink);
  border-radius: 8px;
  user-select: none;
}

.video-sources-summary:hover,
.video-sources-summary:focus-visible {
  background: var(--yellow);
}

.video-sources-list {
  margin: 10px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.video-sources-list li {
  line-height: 1.45;
  color: var(--ink-soft);
}

.video-sources-list a,
.video-notes-sources a {
  color: var(--blue-dark);
  text-decoration: underline;
  font-weight: 800;
}

.video-sources-list a:hover,
.video-sources-list a:focus-visible,
.video-notes-sources a:hover,
.video-notes-sources a:focus-visible {
  color: var(--red);
}

/* ショート ⇄ 本編ロング 直結カード */
.paired-video-box {
  margin-top: 16px;
}

.paired-video-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  background: linear-gradient(135deg, #fff8d6 0%, #ffffff 100%);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.paired-video-card:hover,
.paired-video-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

.paired-video-thumb-wrap {
  position: relative;
  width: 152px;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  border: 2px solid var(--ink);
  border-radius: 8px;
  overflow: hidden;
  background: #1a1c24;
}

.paired-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.paired-video-dur {
  position: absolute;
  right: 5px;
  bottom: 5px;
  padding: 1px 6px;
  background: rgba(26, 28, 36, 0.88);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 900;
  border-radius: 4px;
}

.paired-video-info {
  flex: 1;
  min-width: 0;
}

.paired-video-badge {
  display: inline-block;
  padding: 2px 9px;
  margin-bottom: 5px;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 900;
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.paired-video-title {
  margin: 0 0 6px;
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.38;
  color: var(--ink);
}

.paired-video-cta {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--blue-dark);
  text-decoration: underline;
}

.paired-video-box--short {
  padding: 12px 14px;
  background: var(--bg-sub);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
}

.paired-shorts-heading {
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--ink-soft);
}

.paired-shorts-list {
  display: grid;
  gap: 8px;
}

.paired-short-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 2px 0 var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  font-size: 0.88rem;
  transition: background-color 0.12s ease, transform 0.12s ease;
}

.paired-short-link:hover,
.paired-short-link:focus-visible {
  background: var(--yellow-soft);
  transform: translateY(-1px);
}

.paired-short-pill {
  flex-shrink: 0;
  padding: 2px 8px;
  background: var(--yellow);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
}

.paired-short-title {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
}

.paired-short-arrow {
  flex-shrink: 0;
  font-weight: 900;
  color: var(--blue-dark);
}

@media (max-width: 520px) {
  .paired-video-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .paired-video-thumb-wrap {
    width: 100%;
  }
}

/* チャンネル登録案内ボックス */
.subscribe-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--card-bg);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-box);
  padding: 16px;
  margin-bottom: 26px;
}

.subscribe-box-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 230px;
}

.subscribe-box-info img {
  width: auto;
  height: 70px;
  max-width: 52px;
  object-fit: contain;
  flex-shrink: 0;
}

.subscribe-box-title {
  margin: 0 0 2px;
  font-size: 1rem;
  font-weight: 900;
}

.subscribe-box-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-weight: 700;
}

/* ===== 共通の下の帯（フッター） ===== */
.site-footer {
  margin-top: 36px;
  background: var(--card-bg);
  border-top: var(--border-w) solid var(--ink);
  padding: 24px 0 30px;
  text-align: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.footer-note {
  margin: 0 0 8px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.footer-about {
  margin: 0 0 6px;
}

.footer-text-link {
  display: inline-block;
  min-height: 44px;
  padding: 11px 12px;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.about-body h2 {
  margin: 22px 0 8px;
  font-size: 1.08rem;
  font-weight: 900;
}

.about-body p,
.about-body li {
  font-size: 1rem;
  line-height: 1.8;
}

.about-body ul {
  margin: 0 0 8px;
  padding-left: 1.3em;
}

.about-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-copy {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ink-soft);
}

/* ===== スマホ幅（〜639px）で最初の画面に「ゲームであそぶ」をしっかり収める調整 ===== */
@media (max-width: 639px) {
  .hero-section {
    padding: 12px 0 10px;
  }

  .hero-card {
    padding: 14px 12px 16px;
  }

  .hero-stage {
    height: 158px;
    margin: 4px auto 6px;
  }

  .hero-title {
    margin: 4px 0 4px;
  }

  .hero-subtitle {
    margin: 0 auto 12px;
  }

  .hero-card .btn-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .hero-card .btn-row .btn {
    width: 100%;
    padding: 10px 6px;
    font-size: clamp(0.76rem, 3.6vw, 0.88rem);
    white-space: nowrap;
  }
}

/* ===== 幅 360px 向けの微調整 ===== */
@media (max-width: 390px) {
  .container {
    padding: 0 10px;
  }

  .brand-link {
    font-size: 0.95rem;
    gap: 6px;
  }

  .nav-link {
    padding: 5px 9px;
    font-size: 0.8rem;
  }

  .hero-card {
    padding: 14px 10px 14px;
  }

  .btn {
    width: 100%;
    padding: 10px 12px;
  }

  .shorts-more-btn {
    width: auto;
    min-width: 180px;
  }

  .cat-btn {
    font-size: 0.78rem;
    padding: 6px 10px;
  }

  .futa-lab {
    padding: 14px 12px;
  }

  .lab-tab-btn {
    padding: 7px 10px;
    font-size: 0.8rem;
  }
}

/* ===== prefers-reduced-motion（動きを減らす） ===== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .hero-box-lid {
    z-index: 1;
    transform: translate(10px, -10px) rotate(65deg) scale(0.78) !important;
  }

  .hero-chara-wrap {
    transform: translate(-50%, -18px) scale(1) !important;
  }

  .box-gear--lg {
    opacity: 0.95 !important;
    transform: scale(1) rotate(55deg) !important;
  }

  .box-gear--sm {
    opacity: 0.95 !important;
    transform: scale(1) rotate(-70deg) !important;
  }

  .box-spark {
    opacity: 0.95 !important;
    transform: rotate(45deg) scale(1.08) !important;
  }

  .futa-card-lid {
    transform: translateY(-3px) rotate(-2deg) !important;
  }

  .futa-card-thumb {
    transform: translateY(0) scale(1) !important;
    filter: brightness(1) !important;
  }

  .futa-card--short .futa-card-thumb,
  .video-grid--shorts .futa-card-thumb {
    transform: translateY(0) scale(1.38) !important;
  }
}


/* ===== 機械工学シミュレーター（踏切・エレベーター） ===== */
.mech-lab-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 12px;
}

@media (min-width: 768px) {
  .mech-lab-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.mech-card {
  background: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 14px;
  box-shadow: 0 3px 0 var(--ink);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mech-card-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
}

.mech-stage {
  background: #f6f8fc;
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mech-stage-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mech-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  border: 2px solid var(--ink);
  color: #ffffff;
}

.mech-status-badge.is-safe { background: #1e8e5a; }
.mech-status-badge.is-alert { background: var(--red); }
.mech-status-badge.is-info { background: var(--blue); }

.mech-stat-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 8px;
  font-size: 0.86rem;
  padding: 4px 0;
  border-bottom: 1px dashed rgba(26, 28, 36, 0.18);
}

.mech-stat-key {
  font-weight: 800;
  color: var(--ink);
}

.mech-stat-val {
  font-weight: 800;
}

.mech-stat-val.is-blue { color: var(--blue); }
.mech-stat-val.is-red,
.mech-stat-val.is-alert { color: #c92a2a; }
.mech-stat-val.is-safe { color: #16794c; }

.mech-load-track {
  margin: 4px 0;
}

.lab-bar-fill--28 { width: 28%; }
.lab-bar-fill--75 { width: 75%; }

.mech-stage-note {
  margin: 2px 0 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: #363c4a;
}

.mech-cw-toggle {
  border-color: var(--blue);
}

/* ===== 注目の本編（1本ピックアップ） ===== */
.featured-long-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  background: #ffffff;
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-box);
  padding: 14px;
  margin-bottom: 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.featured-long-card:hover,
.featured-long-card:focus-visible {
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .featured-long-card {
    grid-template-columns: 360px 1fr;
    align-items: center;
    gap: 20px;
    padding: 16px;
  }
}

.featured-long-thumb-wrap {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 2.5px solid var(--ink);
  aspect-ratio: 16 / 9;
  background: #141821;
}

.featured-long-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-long-dur {
  position: absolute;
  right: 8px;
  bottom: 8px;
  background: rgba(15, 18, 26, 0.88);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 6px;
}

.featured-long-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.featured-long-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.featured-long-badge {
  background: var(--red);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}

.featured-long-cat {
  background: var(--lid-bg);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 900;
  padding: 3px 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}

.featured-long-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.45;
  font-weight: 900;
  color: var(--ink);
}

.featured-long-cta {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--blue);
}

/* ===== シリーズ一気見バナー ===== */
.series-banner {
  background: linear-gradient(135deg, #eef4ff 0%, #fffdf5 100%);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-box);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 768px) {
  .series-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.series-banner-pill {
  display: inline-block;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  margin-bottom: 4px;
}

.series-banner-title {
  margin: 2px 0 4px;
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
}

.series-banner-desc {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #3a4050;
}

.series-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

/* ===== 機械工学ロング：断面図つき読み物セクション ===== */
.article-section {
  margin-top: 22px;
  padding: 18px;
  background: #f9fbff;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
}

.article-heading {
  margin: 0 0 10px;
  font-size: 1.02rem;
  font-weight: 900;
  color: var(--ink);
  border-left: 5px solid var(--blue);
  padding-left: 10px;
}

.article-points {
  margin: 0 0 18px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink);
}

.diagram-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

@media (min-width: 768px) {
  .diagram-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.diagram-card {
  margin: 0;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.diagram-img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-bottom: 2px solid var(--ink);
}

.diagram-cap {
  padding: 8px 10px;
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 700;
  color: var(--ink);
}

.article-chapters {
  border-top: 1.5px dashed rgba(26, 28, 36, 0.2);
  padding-top: 10px;
}

.article-chapters-summary {
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--blue);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.article-chapters-list {
  margin: 8px 0 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.88rem;
  color: #2f3542;
}

/* ===== 次の機械工学ロングへ（シリーズ回遊） ===== */
.next-series-box {
  margin-top: 20px;
  padding: 14px 16px;
  background: #fff9e6;
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
}

.next-series-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.next-series-pill {
  background: var(--blue);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  padding: 2px 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
}

.next-series-pl {
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--blue);
  text-decoration: underline;
}

.next-series-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 10px;
  font-weight: 900;
  color: var(--ink);
}

.next-series-arrow {
  color: var(--blue);
  white-space: nowrap;
}


/* ===== SVG図解＆44pxボタン共通スタイル（.mech-ctrl-btn / .long-cat-btn） ===== */
.mech-svg {
  width: 100%;
  height: auto;
  display: block;
  border: 2px solid var(--ink);
  border-radius: 8px;
  background: #eef3fb;
}

.mech-ctrl-btn,
.long-cat-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 6px 14px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--ink);
  background: var(--card-bg);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.mech-ctrl-btn:hover,
.mech-ctrl-btn:focus-visible,
.long-cat-btn:hover,
.long-cat-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--ink);
  background: #ffffff;
}

.mech-ctrl-btn.is-active,
.long-cat-btn.is-active,
.long-cat-btn[aria-pressed="true"] {
  background: var(--blue);
  color: #ffffff;
  transform: translateY(1px);
  box-shadow: 0 2px 0 var(--ink);
}
