.otf-top3 { display:none; }
@media (max-width:700px) {
  /* 携帯TOPのPRE案内だけからジュニア大会ボタン全体を外す。 */
  #pre > a[aria-label="OTF プレ ジュニア大会"] { display:none!important; }
  body.otf-top3-ready #program { display:none!important; }
  .otf-top3 {
    display:block;
    box-sizing:border-box;
    width:100%;
    margin:0;
    padding:8px 0 20px;
    background:#fcfaf3 url('../../themes/otf-mobile-intro-restored-20261004h/static/top/assets/washi.svg');
    color:#213a32;
    scroll-margin-top:70px;
  }
  .otf-top3-hint {
    margin:0 10px 8px;
    font:700 12px/1.4 sans-serif;
    text-align:center;
    letter-spacing:.02em;
  }
  .otf-top3-viewport {
    display:flex;
    align-items:flex-start;
    box-sizing:border-box;
    width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;
    scroll-behavior:auto;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .otf-top3-viewport::-webkit-scrollbar { display:none; }
  .otf-top3-slide {
    flex:0 0 100%;
    box-sizing:border-box;
    min-width:0;
    padding:0 6px;
    scroll-snap-align:start;
    scroll-snap-stop:always;
  }
  .otf-top3-hero {
    position:relative;
    width:100%;
    aspect-ratio:1232/1450;
    overflow:hidden;
  }
  .otf-top3-hero img { display:block; width:100%; height:auto; max-width:none; }
  .otf-top3-hero-source {
    aspect-ratio:100/60;
    overflow:hidden;
  }
  .otf-top3-hero-source img { position:absolute; }
  .otf-top3-hero-live {
    width:calc(100% + 12px);
    margin-left:-6px;
  }
  .otf-top3-hero-run {
    width:calc(100% + 12px);
    margin-left:-6px;
  }
  .otf-top3-run-landscape {
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:78.333%;
    background:url('assets/25-landscape.png') 35% center / auto 128% no-repeat;
    animation:otf-top3-run-landscape-pan 32s ease-in-out infinite alternate;
  }
  .otf-top3-hero-source .otf-top3-run-runner {
    top:0;
    left:6vw;
    width:auto;
    height:60vw;
    z-index:3;
  }
  .otf-top3-hero-source .otf-top3-run-festival {
    top:2vw;
    left:-1vw;
    width:60vw;
    z-index:4;
  }
  .otf-top3-hero-source .otf-top3-run-badge {
    top:4vw;
    right:15vw;
    width:18vw;
    z-index:5;
  }
  .otf-top3-hero-source .otf-top3-run-word {
    top:calc(48vw + 8px);
    left:2vw;
    width:auto;
    height:8.66vw;
    z-index:6;
  }
  @keyframes otf-top3-run-landscape-pan {
    from { background-position:0% center; }
    to { background-position:100% center; }
  }
  .otf-top3-hero-source .otf-top3-event-landscape {
    inset:0 auto auto 0;
    width:100%;
    height:78.333%;
    object-fit:cover;
  }
  .otf-top3-hero-source .otf-top3-event-runners {
    top:0;
    left:-16%;
    width:296%;
  }
  .otf-top3-hero-source .otf-top3-event-title {
    top:5%;
    left:1%;
    width:44%;
  }
  .otf-top3-hero-source .otf-top3-event-word {
    bottom:0;
    left:14%;
    width:38%;
  }
  .otf-top3-live-landscape {
    position:absolute;
    inset:0 auto auto 0;
    width:100%;
    height:78.333%;
    background:url('assets/live-2103-background.png') 100% center / auto 128% no-repeat;
    animation:otf-top3-live-landscape-pan 32s ease-in-out infinite alternate;
  }
  .otf-top3-hero-source .otf-top3-live-actors {
    top:0;
    left:-16vw;
    width:auto;
    height:60vw;
    animation:otf-top3-live-actor-pan 10.666667s ease-in-out infinite alternate;
  }
  .otf-top3-hero-source .otf-top3-live-festival {
    top:2vw;
    left:-1vw;
    width:60vw;
  }
  .otf-top3-hero-source .otf-top3-live-party-title {
    bottom:0;
    left:2vw;
    width:calc(100% - 4vw);
    max-height:8.66vw;
    object-fit:contain;
  }
  @keyframes otf-top3-live-landscape-pan {
    from { background-position:100% center; }
    to { background-position:0% center; }
  }
  @keyframes otf-top3-live-actor-pan {
    from { transform:translateX(3vw); }
    to { transform:translateX(calc(116vw - 60vw * 3041 / 905)); }
  }
  .otf-top3-live-date-frame {
    position:relative;
    top:8px;
    width:100%;
    height:19.55vw;
    overflow:hidden;
    margin-bottom:14px;
  }
  .otf-top3-live-date {
    display:block;
    width:240%;
    max-width:none;
    height:auto;
  }
  .otf-top3-live-tagline {
    display:block;
    width:100%;
    height:auto;
  }
  .otf-top3-slide:nth-child(2) .otf-top3-heading { margin-top:0; }
  @media (prefers-reduced-motion:reduce) {
    .otf-top3-live-landscape,
    .otf-top3-live-actors,
    .otf-top3-run-landscape { animation:none; }
  }
  .otf-top3-event-date {
    display:block;
    width:100%;
    height:auto;
  }
  .otf-top3-heading {
    display:block;
    width:100%;
    height:auto;
    margin:8px auto 0;
  }
  .otf-top3-row {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:5px;
    align-items:start;
    margin-top:7px;
  }
  .otf-top3-card {
    display:block;
    min-width:0;
    padding:0;
    box-sizing:border-box;
    border:0;
    border-radius:0;
    background:transparent;
    text-decoration:none;
    overflow:hidden;
  }
  .otf-top3-card img { display:block; width:100%; height:auto; max-width:none; }
  .otf-top3-slide:first-child .otf-top3-card img:nth-child(2) {
    width:78.272%; /* 元画像 634px / カード 810px。内側の色付き罫線に合わせる。 */
    margin-inline:auto;
  }
  .otf-top3-run-notes {
    display:block;
    width:100%;
    height:auto;
    margin-top:12px;
  }
  .otf-top3-card:focus-visible,
  .otf-top3-nav button:focus-visible { outline:3px solid #114e73; outline-offset:2px; }
  .otf-top3-live-crop {
    display:block;
    position:relative;
    width:100%;
    aspect-ratio:800/2015;
    overflow:hidden;
  }
  .otf-top3-live-crop img {
    position:absolute;
    top:0;
    left:var(--otf-slice-offset);
    width:300%;
    height:auto;
    max-width:none;
  }
  .otf-top3-nav {
    display:flex;
    position:relative;
    top:auto;
    right:auto;
    bottom:auto;
    left:auto;
    align-items:center;
    gap:4px;
    box-sizing:border-box;
    width:100%;
    margin-top:14px;
    padding:8px 8px 10px;
    overflow-x:auto;
    background:rgba(252,250,243,.96);
    border-top:1px solid #d8cfae;
    border-bottom:1px solid #d8cfae;
    scrollbar-width:thin;
  }
  .otf-top3-nav button {
    flex:none;
    min-height:36px;
    padding:5px 9px;
    border:1px solid #c6ba96;
    border-radius:4px;
    background:#fffaf0;
    color:#243b32;
    font:700 12px/1.2 sans-serif;
    white-space:nowrap;
    cursor:pointer;
  }
  .otf-top3-nav button.is-current {
    border:2px solid #153e33;
    background:#e5d390;
    color:#153e33;
    box-shadow:inset 0 -3px #153e33;
  }
}

/* === OTF TOP 1段目 (2026-11-06) ここから === */
@media (max-width:700px) {
  body .otf-top3, body #program { display:none !important; }
  .otf-btn6 { display:grid; grid-template-columns:1fr 1fr; gap:6px; padding:0 12px; margin:12px 0 0; }
  .otf-btn6 > a { position:relative; display:block; width:auto !important; height:auto !important; aspect-ratio:173/31; margin:0 !important; padding:0 !important; overflow:hidden; }
  .otf-btn6 > a > img { position:absolute; inset:0; width:100% !important; height:100% !important; max-width:none !important; object-fit:cover; margin:0 !important; }
  .otf-btn6 .pre-hover, .otf-btn6 .otf-mobile-nav-text { display:none !important; }
  .otf-trio { display:grid; grid-template-columns:repeat(3, 1fr); gap:6px; padding:0 8px; margin:16px 0 28px; }
  .otf-trio > .otf-trio-panel { position:relative; display:block; overflow:hidden; }
  .otf-trio > .otf-trio-panel > img { display:block; width:100%; height:auto; }
  .otf-trio > .otf-trio-panel::after { content:''; position:absolute; inset:0; background:rgba(255,255,255,.62); transform-origin:50% 100%; transition:transform 1s cubic-bezier(.6,0,.2,1); pointer-events:none; }
  .otf-trio > .otf-trio-panel:nth-child(2)::after { transition-delay:.2s; }
  .otf-trio > .otf-trio-panel:nth-child(3)::after { transition-delay:.4s; }
  .otf-trio.is-open > .otf-trio-panel::after { transform:scaleY(0); }
}
/* === OTF TOP 1段目 ここまで === */


/* === OTF TOP ボタンをヘッダー下に固定 (2026-11-06) === */
@media (max-width:700px) {
  .otf-btn6 { position:sticky !important; top:var(--otf-head-h, 70px); z-index:9; margin:0 !important; padding:10px 12px 8px; background:#fcfaf3; }
}

/* === OTF 2段目シート (2026-11-06) === */
@media (max-width:700px) {
  body .otf-top3.is-sheet { display:block !important; position:fixed; left:0; right:0; bottom:0; top:var(--otf-head-h, 70px); z-index:1000; margin:0; padding:0 0 24px; background:#fcfaf3; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; }
  .otf-top3.is-sheet .otf-top3-hint, .otf-top3.is-sheet .otf-top3-nav { display:none !important; }
  html.otf-sheet-open { overflow:hidden; }
}

/* === OTF 2段目シートの見た目調整 (2026-11-06) === */
@media (max-width:700px) {
  .otf-top3.is-sheet, .otf-top3.is-sheet .otf-top3-viewport, .otf-top3.is-sheet .otf-top3-slide { background:#f6f4ed !important; }
  .otf-top3.is-sheet .otf-top3-slide { overflow-x:clip !important; }
  .otf-top3.is-sheet .otf-top3-run-word, .otf-top3.is-sheet .otf-top3-event-word { position:absolute !important; left:2vw !important; top:auto !important; right:auto !important; bottom:1.2vw !important; height:8.66vw !important; width:auto !important; max-width:none !important; z-index:6 !important; }
  .otf-top3.is-sheet .otf-top3-live-party-title { position:absolute !important; left:-31.08vw !important; top:auto !important; right:auto !important; bottom:-0.35vw !important; height:11.03vw !important; max-height:none !important; width:auto !important; max-width:none !important; object-fit:fill !important; clip-path:inset(0 0 0 25.8%); z-index:6 !important; }
  .otf-top3.is-sheet .otf-top3-live-festival { z-index:5 !important; }
  .otf-top3.is-sheet .otf-top3-live-actors { z-index:2 !important; animation-name:otf-sheet-actor-pan !important; }
  .otf-top3.is-sheet .otf-top3-slide:nth-child(3) .otf-top3-hero { width:100vw !important; height:60vw !important; margin:0 0 0 -6px !important; }
  .otf-top3.is-sheet .otf-top3-event-title { left:-3.75px !important; top:7.5px !important; width:56vw !important; height:auto !important; z-index:5 !important; }
  .otf-top3.is-sheet .otf-top3-heading[src*="run-heading"] { width:511px !important; max-width:none !important; height:auto !important; margin-left:-80px !important; }
  .otf-top3.is-sheet .otf-top3-heading[src*="live-heading"], .otf-top3.is-sheet .otf-top3-live-tagline { width:546px !important; max-width:none !important; height:auto !important; margin-left:-91.5px !important; }
  .otf-top3.is-sheet .otf-top3-heading[src*="day2-heading"] { width:495px !important; max-width:none !important; height:auto !important; margin-left:-66px !important; }
}
@keyframes otf-sheet-actor-pan { 0% { transform:translateX(16vw); } 100% { transform:translateX(-85.6133vw); } }

/* === OTF TOP 3枚の押す場所 (2026-11-06) === */
@media (max-width:700px) {
  .otf-trio .otf-trio-zone { position:absolute; z-index:3; display:block; -webkit-tap-highlight-color:rgba(255,255,255,.25); }
}

/* === 2月7日の日付帯 (2026-11-06) === */
@media (max-width:700px) {
  .otf-top3.is-sheet .otf-top3-event-date { display:block !important; position:relative !important; top:8px !important; width:100% !important; max-width:none !important; height:auto !important; margin:0 0 14px !important; object-fit:fill !important; }
}

/* === 日付の帯の固定・見出し・EVENTカード幅 (2026-11-06) === */
@media (max-width:700px) {
  .otf-top3.is-sheet .otf-top3-live-date-frame, .otf-top3.is-sheet .otf-top3-event-date { position:relative !important; z-index:20 !important; will-change:transform; }
  .otf-top3.is-sheet .otf-top3-live-date-frame.is-stuck, .otf-top3.is-sheet .otf-top3-event-date.is-stuck { box-shadow:0 -40px 0 6px #f6f4ed; }
  .otf-top3.is-sheet .otf-hhead { display:flex; flex-direction:column; align-items:center; gap:5px; margin:6px 0 10px; }
  .otf-top3.is-sheet .otf-top3-slide:nth-child(3) .otf-top3-row a img { width:80% !important; max-width:none !important; height:auto !important; margin:0 auto !important; display:block !important; }
}

/* === スワイプを1枚ずつ止める (2026-11-06) === */
@media (max-width:700px) {
  .otf-top3.is-sheet .otf-top3-viewport { height:var(--otf-vp-h, auto) !important; scroll-snap-type:x mandatory; align-items:flex-start !important; }
  .otf-top3.is-sheet .otf-top3-slide { scroll-snap-align:start !important; scroll-snap-stop:always !important; flex:0 0 100% !important; width:100% !important; }
}

/* === NIGHT PARTYと黄色い文字を最前面に (2026-11-06) === */
@media (max-width:700px) {
  .otf-top3 .otf-top3-hero-live { isolation:isolate; }
  .otf-top3 .otf-top3-live-actors { z-index:1 !important; }
  .otf-top3 .otf-top3-live-festival { z-index:30 !important; transform:translate3d(0,0,1px) !important; }
  .otf-top3 .otf-top3-live-party-title { z-index:31 !important; transform:translate3d(0,0,2px) !important; }
}

/* === 2月7日のエントリーボタン (2026-11-06) === */
@media (max-width:700px) {
  .otf-sheet-entry { margin:22px 0 10px; padding:0 4px; }
  .otf-sheet-entry h3 { margin:0 0 12px; text-align:center; font:700 18px/1.4 sans-serif; color:#2b2a6b; }
  .otf-sheet-entry-group { margin:0 0 18px; padding:10px; border-top:3px solid #d6517f; background:#f0dccb; }
  .otf-sheet-entry-group.is-rogaine { border-top-color:#b5733f; background:#f3d9d6; }
  .otf-sheet-entry-group.is-junior { border-top-color:#388d5d; background:#d9eadb; }
  .otf-sheet-entry-name { margin:0 0 8px; text-align:center; font:700 16px/1.4 sans-serif; color:#30210d; }
  .otf-sheet-entry-group a { display:flex; align-items:center; justify-content:center; min-height:52px; margin:0 0 8px; padding:8px 12px; background:#4a3229; color:#f3dfb3; font:700 17px/1.3 sans-serif; text-decoration:none; text-align:center; border-radius:2px; }
  .otf-sheet-entry-group a:last-child { margin-bottom:0; }
  .otf-sheet-entry-group a.is-elem { background:#f4cf26; color:#30210d; }
  .otf-sheet-entry-group a.is-middle { background:#079a4d; color:#fff; }
  .otf-sheet-entry-group a.is-high { background:#a6358f; color:#fff; }
  .otf-sheet-entry-note { margin:4px 0 0; font:13px/1.6 sans-serif; color:#5b5148; text-align:center; }
}

/* === EVENTの絵を動かす (2026-11-06) === */
@media (max-width:700px) {
  .otf-top3.is-sheet .otf-top3-hero-source .otf-top3-event-landscape { position:absolute !important; inset:auto !important; top:0 !important; left:50% !important; width:auto !important; height:70.5vw !important; max-width:none !important; object-fit:fill !important; z-index:0; animation:otf-ev-land 32s ease-in-out infinite alternate; }
  .otf-top3.is-sheet .otf-top3-hero-source .otf-top3-event-runners { top:0 !important; left:-16vw !important; width:296vw !important; max-width:none !important; z-index:2; animation:otf-ev-runners 10.6667s ease-in-out infinite alternate; }
  .otf-top3.is-sheet .otf-top3-event-title { z-index:5 !important; }
  .otf-top3.is-sheet .otf-top3-event-word { z-index:6 !important; }
}
@keyframes otf-ev-land { 0% { transform:translate(-50%, 0); clip-path:inset(0 0 23.5vw 0); } 100% { transform:translate(-50%, -23.5vw); clip-path:inset(23.5vw 0 0 0); } }
@keyframes otf-ev-runners { 0% { transform:translateX(16vw); } 100% { transform:translateX(-180vw); } }
@media (prefers-reduced-motion:reduce) { .otf-top3 .otf-top3-event-landscape, .otf-top3 .otf-top3-event-runners { animation:none !important; } }

/* === PCのTOP 3枚（トレペ・オンマウス）(2026-11-06) === */
@media (min-width:701px) {
  #program > :not(.otf-trio) { display:none !important; }
  #program .otf-trio.is-pc { grid-column:1 / -1; display:grid; grid-template-columns:repeat(3, 1fr); gap:22.6px; align-items:start; }
  #program .otf-trio.is-pc .otf-trio-panel { position:relative; display:block; overflow:hidden; }
  #program .otf-trio.is-pc .otf-trio-panel > img { display:block; width:100%; height:auto; }
  #program .otf-trio.is-pc .otf-trio-panel::after { content:''; position:absolute; inset:0; z-index:2; background:rgba(255,255,255,.62); transform-origin:50% 100%; transition:transform 1s cubic-bezier(.6,0,.2,1); pointer-events:none; }
  #program .otf-trio.is-pc .otf-trio-panel:hover::after, #program .otf-trio.is-pc .otf-trio-panel:focus-within::after { transform:scaleY(0); }
  #program .otf-trio.is-pc .otf-trio-zone { position:absolute; z-index:3; display:block; }
}

/* === 2段目シートの上でもメニューを使う (2026-11-06) === */
@media (max-width:900px) {
  html.otf-sheet-open header.ai-header { z-index:1001 !important; }
}

/* === TOP 3枚：トレペ80%、RUN・LIVE・RUNの文字にはかけない (2026-11-06) === */
@media (max-width:700px) {
  .otf-trio > .otf-trio-panel::after { background:rgba(255,255,255,.8); inset:auto 0 0 0; top:7.2%; }
}
@media (min-width:701px) {
  #program .otf-trio.is-pc .otf-trio-panel::after { background:rgba(255,255,255,.8); inset:auto 0 0 0; top:7.2%; }
}
