/* ==========================================================================
   白浜ロックフェス WEB MAGAZINE
   ========================================================================== */

:root {
    --bg: #07040a;
    --bg-glow: #3b0710;
    --paper: #120d10;
    --paper-edge: #2a2024;
    --ink: #f3ede7;
    --ink-muted: rgba(243, 237, 231, 0.55);
    --accent: #e0182f;
    --accent-soft: #ff5a6e;
    --gold: #cfae74;

    --font-serif: "Cormorant Garamond", "Times New Roman", serif;
    /* 「WEB MAGAZINE」の題字用（ファッション誌風のディドン体） */
    --font-masthead: "Bodoni Moda", "Didot", "Times New Roman", serif;
    /* 「表紙」「目次」などの日本語は Oswald にないためゴシック体で表示する */
    --font-label: "Oswald", "Zen Kaku Gothic New", "Arial Narrow", sans-serif;
    --font-ja: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
    /* アーティスト名用の明朝体 */
    --font-mincho: "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;

    --header-h: 56px;
    --controls-h: 68px;

    /* JS（flipbook.js）が実寸で上書きする */
    --page-w: 420px;
    --page-h: 594px;
    --flip-duration: 900ms;
    --edge-left: 0px;
    --edge-right: 0px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    height: 100%;
}

html {
    /* iPhone でボタンを連打した時のダブルタップズームを無効化（ピンチ操作は残す） */
    touch-action: manipulation;
    -webkit-text-size-adjust: 100%;
}

button,
a {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* 画像・動画のドラッグ＆ドロップでの持ち出しを抑止（HTML の draggable="false" と二重） */
img,
video {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    /* iPhone の長押しメニュー（画像を保存）を出さない */
    -webkit-touch-callout: none;
}

/* 連打で文字が選択状態になるのを防ぐ */
.site-header,
.controls {
    user-select: none;
    -webkit-user-select: none;
}

body {
    background:
        radial-gradient(ellipse 70% 55% at 50% 45%, var(--bg-glow) 0%, transparent 70%),
        radial-gradient(ellipse 120% 80% at 50% 120%, #26050b 0%, transparent 60%),
        var(--bg);
    color: var(--ink);
    font-family: var(--font-ja);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

button {
    font: inherit;
    color: inherit;
}

/* ---------- ヘッダー ---------- */

.site-header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 20;
    height: var(--header-h);
    padding: 0 max(16px, env(safe-area-inset-left));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.site-header__brand img {
    width: 72px;
    height: auto;
}

.site-header__brand span {
    font-family: var(--font-masthead);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.16em;
}

.site-header__contents {
    background: none;
    border: 1px solid rgba(243, 237, 231, 0.3);
    border-radius: 999px;
    padding: 6px 16px;
    font-family: var(--font-label);
    font-size: 12px;
    letter-spacing: 0.2em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.site-header__contents:hover,
.site-header__contents:focus-visible {
    background: rgba(224, 24, 47, 0.25);
    border-color: var(--accent);
}

/* ---------- ステージ / 本 ---------- */

.stage {
    position: fixed;
    inset: var(--header-h) 0 var(--controls-h);
    display: grid;
    place-items: center;
    padding: 12px 16px;
}

.book {
    position: relative;
    width: calc(var(--page-w) * 2);
    height: var(--page-h);
    transition: transform var(--flip-duration) cubic-bezier(0.45, 0.05, 0.25, 1);
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
    outline: none;
}

.book.is-single {
    width: var(--page-w);
}

/* 閉じている時は表紙（裏表紙）が中央に来るよう本全体をずらす */
.book.is-closed-front {
    transform: translateX(-25%);
}

.book.is-closed-back {
    transform: translateX(25%);
}

.book.is-single.is-closed-front,
.book.is-single.is-closed-back {
    transform: none;
}

.book__pages {
    position: absolute;
    inset: 0;
    perspective: 2800px;
}

/* 1枚の紙（表 = 右ページ、裏 = 左ページ） */
.sheet {
    position: absolute;
    top: 0;
    left: 50%;
    width: var(--page-w);
    height: var(--page-h);
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform var(--flip-duration) cubic-bezier(0.45, 0.05, 0.25, 1);
    cursor: pointer;
}

.book.is-single .sheet {
    left: 0;
    transition:
        transform var(--flip-duration) cubic-bezier(0.45, 0.05, 0.25, 1),
        opacity calc(var(--flip-duration) * 0.35) linear calc(var(--flip-duration) * 0.4);
}

.sheet.is-flipped {
    transform: rotateY(-180deg);
}

.book.is-single .sheet.is-flipped {
    opacity: 0;
    pointer-events: none;
}

.book.is-single .sheet:not(.is-flipped) {
    transition:
        transform var(--flip-duration) cubic-bezier(0.45, 0.05, 0.25, 1),
        opacity calc(var(--flip-duration) * 0.3) linear;
}

.sheet.is-hidden {
    display: none;
}

.sheet__face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    background-color: var(--paper);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}

.sheet__face--front {
    border-radius: 0 6px 6px 0;
}

.sheet__face--back {
    transform: rotateY(180deg);
    border-radius: 6px 0 0 6px;
}

/* ノド（綴じ目）の影 */
.sheet__face::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}

.sheet__face--front::after {
    background:
        linear-gradient(to right, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.18) 4%, transparent 11%),
        linear-gradient(to left, rgba(255, 255, 255, 0.04) 0%, transparent 3%);
}

.sheet__face--back::after {
    background:
        linear-gradient(to left, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.18) 4%, transparent 11%),
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 0%, transparent 3%);
}

.book.is-single .sheet__face::after,
.sheet__face.is-cover::after {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.35) 0%, transparent 3%);
}

.book.is-single .sheet__face--front {
    border-radius: 2px 6px 6px 2px;
}

/* めくり中に紙が光を受けて陰影が変わる表現 */
.sheet__shade {
    position: absolute;
    inset: 0;
    z-index: 6;
    pointer-events: none;
    opacity: 0;
}

.sheet__face--front .sheet__shade {
    background: linear-gradient(to left, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.15));
}

.sheet__face--back .sheet__shade {
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.15));
}

.sheet.is-turning-forward .sheet__face--front .sheet__shade,
.sheet.is-turning-backward .sheet__face--back .sheet__shade {
    animation: shade-in var(--flip-duration) ease-in forwards;
}

.sheet.is-turning-forward .sheet__face--back .sheet__shade,
.sheet.is-turning-backward .sheet__face--front .sheet__shade {
    animation: shade-out var(--flip-duration) ease-out forwards;
}

@keyframes shade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes shade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* 残りページの厚み（小口） */
.book__edge {
    position: absolute;
    top: 3px;
    bottom: 3px;
    background: repeating-linear-gradient(to right, #3a2e33 0 1px, #191215 1px 2px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    transition: width var(--flip-duration);
}

.book__edge--left {
    right: 50%;
    width: calc(var(--page-w) + var(--edge-left));
    border-radius: 6px 0 0 6px;
    opacity: var(--edge-left-on, 0);
}

.book__edge--right {
    left: 50%;
    width: calc(var(--page-w) + var(--edge-right));
    border-radius: 0 6px 6px 0;
    opacity: var(--edge-right-on, 0);
}

.book.is-single .book__edge--left {
    display: none;
}

.book.is-single .book__edge--right {
    left: 0;
}

/* ---------- ページ共通 ---------- */

.page {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    container-type: size;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E"),
        radial-gradient(ellipse 90% 70% at 50% 40%, #1a1216 0%, var(--paper) 70%);
}

.page__running {
    position: absolute;
    inset: 4.2cqh 7cqw auto;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 1.2cqh;
    border-bottom: 1px solid rgba(243, 237, 231, 0.14);
    font-family: var(--font-label);
    font-size: max(8px, 2.3cqw);
    letter-spacing: 0.22em;
    color: var(--ink-muted);
}

.page__running-mag {
    font-family: var(--font-masthead);
    font-weight: 600;
    letter-spacing: 0.16em;
}

/* ---------- 写真ページ ---------- */

.page__figure {
    position: absolute;
    inset: 11cqh 6cqw 9cqh;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.6cqh;
}

.page__photo {
    display: block;
    /* 幅・高さどちらかの上限に当たるまで拡大（上限は単ページ表示で上書き） */
    width: min(var(--photo-max-w, 88cqw), calc(var(--photo-max-h, 62cqh) * var(--ar)));
    height: auto;
    aspect-ratio: var(--ar);
    object-fit: cover;
    background: #1c1418;
    box-shadow:
        0 0 0 1px rgba(243, 237, 231, 0.08),
        0 1.4cqh 3cqh rgba(0, 0, 0, 0.6);
}

/* キャプション（アーティスト名）のないページ（告知など）は、その分の余白も使って大きく表示する */
.page--no-caption .page__photo {
    --photo-max-h: 79cqh;
}

/* ---------- 写真の保護ラッパー（b-gram-cms の shielded-image と同じ考え方） ----------
   写真を入れ子で包み、最前面に透明の覆い（veil）を重ねる。写真自体は pointer-events を
   持たないため、右クリックの「画像を保存」・iPhone の長押し保存・ドラッグが写真に届かない。
   ページ全体の右クリックは殺さない（画像・動画の上だけ flipbook.js で抑止）。
   ※ 時間稼ぎの層であって防御線ではない（DevTools で覆いは消せる・スクリーンショットは防げない）。
     別タブで直接開く取得は assets/.htaccess 側で塞いでいる */
.media {
    position: relative;
    display: block;
    line-height: 0;
}

/* 中間層はレイアウト上存在しない（深さだけを稼ぐ） */
.media__frame,
.media__stage {
    display: contents;
}

.media .page__photo {
    pointer-events: none;
}

.media__veil {
    position: absolute;
    inset: 0;
    display: block;
    background: transparent;
}

.page__caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8cqh;
    text-align: center;
    line-height: 1.2;
}

.page__caption::before {
    content: "";
    width: 7cqw;
    height: 2px;
    margin-bottom: 1cqh;
    background: var(--accent);
}

/* アーティスト名は明朝体 */
.page__artist {
    font-family: var(--font-mincho);
    font-size: max(14px, 6.4cqw);
    font-weight: 800;
    letter-spacing: 0.08em;
}

/* バンド名＋メンバー名の場合はバンド名を小さなラベルにする */
.page__caption--member .page__artist {
    font-size: max(10px, 3.4cqw);
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--accent-soft);
}

/* 字間を広げたバンド名の「.」は前後の空きを詰め、半角の点に見えるようにする
   （直前の文字に付く字間を負のマージンで打ち消し、「.」自身の後ろの字間も狭める） */
.page__caption--member .label-dot {
    margin-left: -0.16em;
    letter-spacing: 0.04em;
}

.page__member {
    font-family: var(--font-mincho);
    font-size: max(15px, 7cqw);
    font-weight: 800;
    letter-spacing: 0.14em;
}

.page__folio {
    position: absolute;
    inset: auto 7cqw 4.2cqh;
    display: flex;
    align-items: center;
    gap: 2.4cqw;
    font-family: var(--font-label);
    font-size: max(9px, 2.8cqw);
    letter-spacing: 0.16em;
    color: var(--ink-muted);
}

.page__folio-line {
    flex: 1;
    height: 1px;
    background: rgba(243, 237, 231, 0.14);
}

/* 右ページはノンブル（ページ番号）を右寄せ */
.page--recto .page__folio {
    flex-direction: row-reverse;
}

.page__folio-no {
    color: var(--ink);
}

/* ---------- 表紙 ---------- */

.page--cover {
    background: #0b0508;
}

.cover__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: 82% center;
    transform: scale(1.02);
}

.cover__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    /* 軽量版 → 標準版の入れ替えをフェードで見せる（flipbook.js の COVER_VIDEO_FADE と合わせる） */
    transition: opacity 0.8s ease;
}

/* 読み込み中の標準版は透明のまま軽量版の上に重ねておく */
.cover__video.is-incoming {
    opacity: 0;
}

.cover__fireworks {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    mix-blend-mode: screen;
}

.cover__shade {
    position: absolute;
    inset: 0;
    /* 背景動画（明るい花火・夕空）の上でもロゴが読めるよう、中央を含めて全体を少し落とす */
    background:
        radial-gradient(ellipse 90% 45% at 50% 38%, rgba(5, 2, 4, 0.45) 0%, transparent 100%),
        linear-gradient(to bottom, rgba(5, 2, 4, 0.55) 0%, transparent 30%),
        linear-gradient(to top, rgba(5, 2, 4, 0.75) 0%, transparent 28%),
        rgba(5, 2, 4, 0.15);
    pointer-events: none;
}

.cover__title {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* ステージ照明と重ならないよう、タイトルは夜空側（上寄り）に置く */
    padding-bottom: 34cqh;
    pointer-events: none;
}

.cover__logo {
    margin: 0;
    width: 84cqw;
    filter: drop-shadow(0 0 3cqw rgba(0, 0, 0, 0.6));
    opacity: 0;
    transform: translateY(2cqh) scale(0.96);
    transition: opacity 1.4s ease, transform 1.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cover__logo img {
    display: block;
    width: 100%;
    height: auto;
}

.cover__magazine {
    margin: 0;
    font-family: var(--font-masthead);
    font-size: 7cqw;
    font-weight: 600;
    letter-spacing: 0.16em;
    /* 字間の分だけ右にずれて見えるのを補正 */
    margin-right: -0.16em;
    color: #fff;
    text-shadow:
        0 0 1cqw rgba(0, 0, 0, 0.8),
        0 0 4cqw rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 1.4s ease 0.5s;
}

.page--cover.is-revealed .cover__logo {
    opacity: 1;
    transform: none;
}

.page--cover.is-revealed .cover__magazine {
    opacity: 1;
}

.cover__hint {
    position: absolute;
    inset: auto 0 5cqh;
    margin: 0;
    text-align: center;
    font-family: var(--font-label);
    font-size: max(9px, 2.6cqw);
    letter-spacing: 0.4em;
    color: rgba(255, 255, 255, 0.75);
    animation: hint-blink 2.4s ease-in-out infinite;
}

@keyframes hint-blink {
    0%,
    100% {
        opacity: 0.25;
    }
    50% {
        opacity: 0.9;
    }
}

/* ---------- 目次 ---------- */

.contents {
    position: absolute;
    inset: 13cqh 9cqw 8cqh;
    display: flex;
    flex-direction: column;
}

.contents__title {
    margin: 0 0 4cqh;
    font-family: var(--font-serif);
    font-size: 13cqw;
    font-weight: 500;
    font-style: italic;
    line-height: 1;
}

.contents__title::after {
    content: "";
    display: block;
    width: 10cqw;
    height: 2px;
    margin-top: 2.4cqh;
    background: var(--accent);
}

.contents__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    max-height: 60cqh;
}

.contents__list a {
    display: flex;
    align-items: baseline;
    gap: 4cqw;
    padding: 0.6cqh 0;
    color: var(--ink);
    text-decoration: none;
    font-size: max(11px, 4cqw);
    font-weight: 700;
    letter-spacing: 0.06em;
    transition: color 0.2s;
}

.contents__list a:hover,
.contents__list a:focus-visible {
    color: var(--accent-soft);
    outline: none;
}

.contents__name {
    font-family: var(--font-mincho);
    font-weight: 700;
}

.contents__no {
    min-width: 7cqw;
    font-family: var(--font-label);
    font-weight: 500;
    color: var(--accent);
}

/* ---------- 裏表紙 ---------- */

.page--back {
    background:
        radial-gradient(ellipse 80% 60% at 50% 100%, #4a0812 0%, transparent 70%),
        #0b0508;
}

.back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2cqh;
    text-align: center;
}

.back__logo {
    width: 52cqw;
    height: auto;
}

.back__magazine {
    margin: -1cqh -0.16em 0 0;
    font-family: var(--font-masthead);
    font-size: 5cqw;
    font-weight: 600;
    letter-spacing: 0.16em;
}

.back__thanks {
    margin: 4cqh 0 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: max(12px, 4cqw);
    color: var(--ink-muted);
}

.back__button {
    margin-top: 2cqh;
    padding: 1.4cqh 6cqw;
    background: none;
    border: 1px solid rgba(243, 237, 231, 0.35);
    border-radius: 999px;
    font-size: max(11px, 3cqw);
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.back__button:hover,
.back__button:focus-visible {
    background: rgba(224, 24, 47, 0.25);
    border-color: var(--accent);
}

/* ---------- ページ送り ---------- */

.controls {
    position: fixed;
    inset: auto 0 0;
    z-index: 20;
    height: var(--controls-h);
    padding-bottom: env(safe-area-inset-bottom);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.controls__button {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(243, 237, 231, 0.25);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, opacity 0.2s;
}

.controls__button svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.controls__button:hover:not(:disabled),
.controls__button:focus-visible {
    background: rgba(224, 24, 47, 0.3);
    border-color: var(--accent);
}

.controls__button:disabled {
    opacity: 0.25;
    cursor: default;
}

.controls__status {
    min-width: 120px;
    margin: 0;
    text-align: center;
    font-family: var(--font-label);
    font-size: 14px;
    letter-spacing: 0.18em;
}

.controls__status small {
    color: var(--ink-muted);
    font-size: 11px;
}

/* ---------- JS無効時：ページを縦に並べて表示 ---------- */

html:not(.js) .book {
    position: static;
    width: min(100%, 560px);
    height: auto;
    transform: none;
}

html:not(.js) .book__edge {
    display: none;
}

html:not(.js) .book__pages {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

html:not(.js) .page {
    aspect-ratio: 1 / 1.414;
    height: auto;
}

/* JS有効時は組み立てが終わるまで本を隠す
   （崩れて見えるのを防ぐ＋全ページの画像が一斉に読み込まれるのを防ぐ） */
html.js .book:not(.is-ready) .book__pages {
    display: none;
}

html:not(.js) body {
    overflow: auto;
}

html:not(.js) .stage {
    position: static;
    padding-top: calc(var(--header-h) + 12px);
    padding-bottom: calc(var(--controls-h) + 12px);
}

html:not(.js) .controls {
    display: none;
}

/* ---------- モーション軽減 ---------- */

@media (prefers-reduced-motion: reduce) {
    .cover__hint {
        animation: none;
        opacity: 0.7;
    }

    .cover__logo,
    .cover__magazine {
        transition: none;
    }
}

/* ---------- 単ページ表示（スマホなど）：余白を詰めて写真を最大化 ---------- */

/* 単ページ時はページの縦横比が画面に合わせて変わる（flipbook.js）ため、
   写真は「ページ幅いっぱい」か「キャプション分を除いた高さいっぱい」の小さい方で表示する */
.book.is-single .page__running {
    inset: 2.2cqh 4.5cqw auto;
    padding-bottom: 0.9cqh;
}

.book.is-single .page__figure {
    inset: 6.4cqh 0 5cqh;
    gap: 1.6cqh;
}

.book.is-single .page__photo {
    --photo-max-w: 100cqw;
    --photo-max-h: calc(83cqh - 58px);
}

/* キャプションのないページは、キャプション分の高さも写真に使う */
.book.is-single .page--no-caption .page__photo {
    --photo-max-h: 87cqh;
}

.book.is-single .page__caption::before {
    margin-bottom: 0.6cqh;
}

.book.is-single .page__folio {
    inset: auto 4.5cqw 1.8cqh;
}

@media (max-width: 600px) {
    :root {
        --header-h: 48px;
        --controls-h: 58px;
    }

    .stage {
        padding: 4px 6px;
    }

    .site-header__brand img {
        width: 56px;
    }

    .site-header__brand span {
        font-size: 13px;
    }

    .site-header__contents {
        padding: 5px 14px;
        font-size: 11px;
    }

    .controls__button {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   スマホ横向き時の案内（「画面を縦にしてご覧ください」）
   ========================================================================== */

.rotate-notice {
    display: none;
}

/* 横向きのスマホだけに出す。
   縦横比（orientation）だけで判定すると、折りたたみスマホを開いた正方形に近い画面
   （縦に持っていても横幅がわずかに長い）まで横向きと誤判定して閉じ込めてしまう
   （いわゆる「縦横デッドロック」）。そのため「高さが低い」「指で操作する端末」も条件にする。
   - iPhone 横向き：高さ 約 390〜430px → 表示
   - 折りたたみスマホを開いた画面・iPad：高さ 700px 前後以上 → 表示しない */
@media (orientation: landscape) and (max-height: 540px) and (hover: none) and (pointer: coarse) {
    html:not(.is-rotate-dismissed) .rotate-notice {
        position: fixed;
        inset: 0;
        z-index: 100;
        display: grid;
        place-items: center;
        padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
        background:
            radial-gradient(ellipse 70% 60% at 50% 50%, var(--bg-glow) 0%, transparent 70%),
            var(--bg);
        text-align: center;
    }

    /* 案内の裏でマガジンが動かないよう、スクロール・操作を止める */
    html:not(.is-rotate-dismissed) body {
        overflow: hidden;
    }
}

.rotate-notice__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rotate-notice__logo {
    width: 140px;
    height: auto;
}

/* スマホが横から縦へ回るアニメーション */
.rotate-notice__icon {
    width: 56px;
    height: 56px;
    fill: none;
    stroke: var(--ink);
    stroke-width: 2.5;
    stroke-linecap: round;
    animation: rotate-notice-turn 2.4s ease-in-out infinite;
}

@keyframes rotate-notice-turn {
    0%,
    20% {
        transform: rotate(-90deg);
    }
    55%,
    100% {
        transform: rotate(0deg);
    }
}

.rotate-notice__text {
    margin: 0;
    font-family: var(--font-ja);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.08em;
}

.rotate-notice__dismiss {
    margin-top: 4px;
    padding: 6px 16px;
    background: none;
    border: 1px solid rgba(243, 237, 231, 0.3);
    border-radius: 999px;
    font-family: var(--font-ja);
    font-size: 12px;
    color: var(--ink-muted);
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .rotate-notice__icon {
        animation: none;
    }
}
