/* ===== noa-photogallery / modern minimal ===== */

:root {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-muted: #8a8a8a;
    --border: #ececec;
    --accent: #1a1a1a;
    --radius: 14px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, .08);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, .18);
    --ease: cubic-bezier(.22, .61, .36, 1);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans",
        "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Segoe UI", Meiryo, sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    text-size-adjust: 100%;
}

/* タッチ端末ではボタン類のタップ領域を確保 */
@media (pointer: coarse) {
    .btn { min-height: 44px; }
}

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

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

/* ===== Header ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    padding-top: calc(14px + env(safe-area-inset-top));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    background: rgba(250, 250, 250, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--border);
}
@media (max-width: 600px) {
    .site-header { padding-left: 16px; padding-right: 16px; }
    .brand { font-size: 1.05rem; }
}

.brand {
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav__link {
    color: var(--text-muted);
    font-size: .92rem;
    transition: color .2s var(--ease);
}
.nav__link:hover { color: var(--text); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform .15s var(--ease), background .2s var(--ease),
        box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.btn:active { transform: scale(.97); }

.btn--primary {
    background: var(--accent);
    color: #fff;
}
.btn--primary:hover { box-shadow: var(--shadow-md); }

.btn--ghost {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}
.btn--ghost:hover { border-color: #d4d4d4; box-shadow: var(--shadow-sm); }

.btn--danger {
    background: #fff;
    border-color: #f0caca;
    color: #c0352c;
}
.btn--danger:hover { background: #fdeeee; border-color: #e6a9a9; }

/* ===== Layout ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 28px 80px;
    padding-left: max(28px, env(safe-area-inset-left));
    padding-right: max(28px, env(safe-area-inset-right));
}
@media (max-width: 600px) {
    .container { padding: 24px 16px 64px; }
}
.container--narrow { max-width: 680px; }

.hero {
    text-align: center;
    padding: 28px 0 44px;
}
.hero__title {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -.03em;
}
.hero__sub {
    margin: 10px 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.page-title {
    margin: 8px 0 4px;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
}
.page-sub {
    margin: 0 0 28px;
    color: var(--text-muted);
    font-size: .95rem;
}

/* ===== Alerts ===== */
.alert {
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 0 0 24px;
    font-size: .92rem;
}
.alert ul { margin: 0; padding-left: 18px; }
.alert--success {
    background: #eef9f0;
    color: #1c7a3a;
    border: 1px solid #cdeed5;
}
.alert--error {
    background: #fdeeee;
    color: #b3261e;
    border: 1px solid #f6d2d0;
}

/* ===== Masonry gallery (CSS columns) ===== */
.masonry {
    column-count: 4;
    column-gap: 18px;
}
@media (max-width: 1100px) { .masonry { column-count: 3; } }
@media (max-width: 760px)  { .masonry { column-count: 2; column-gap: 10px; } }

.masonry__item {
    margin: 0 0 18px;
    break-inside: avoid;
}
@media (max-width: 760px) { .masonry__item { margin-bottom: 10px; } }

.card {
    display: block;
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .22), transparent 45%);
    opacity: 0;
    transition: opacity .35s var(--ease);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.card:hover::after { opacity: 1; }

.card__img {
    width: 100%;
    height: auto;
    transition: transform .6s var(--ease);
}
.card:hover .card__img { transform: scale(1.04); }

.hero--album { padding: 12px 0 36px; }

/* ===== Album grid (top page) ===== */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 22px;
}
@media (max-width: 600px) {
    .album-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}

.album-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.album-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.album-card__cover {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #f0f0f0;
    overflow: hidden;
}
.album-card__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease);
}
.album-card:hover .album-card__cover img { transform: scale(1.05); }
.album-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bcbcbc;
    font-size: .85rem;
    letter-spacing: .04em;
}
.album-card__body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px 16px;
}
.album-card__title {
    flex: 1;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.4;
    letter-spacing: -.01em;
    /* 全文表示：長いタイトルは折り返す */
    overflow-wrap: anywhere;
    word-break: break-word;
}
.album-card__count {
    flex: none;
    padding-top: 2px;
    color: var(--text-muted);
    font-size: .82rem;
}

/* ===== Empty state ===== */
.empty {
    text-align: center;
    padding: 80px 20px;
    border: 1.5px dashed var(--border);
    border-radius: 20px;
    background: var(--surface);
}
.empty__title { margin: 0; font-size: 1.3rem; font-weight: 700; }
.empty__hint { margin: 8px 0 22px; color: var(--text-muted); }

/* ===== Uploader ===== */
.uploader { display: flex; flex-direction: column; gap: 20px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field__label { font-size: .88rem; font-weight: 600; color: var(--text-muted); }
.field__input {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    background: var(--surface);
}
.field__input:focus { outline: none; border-color: var(--accent); }

.dropzone {
    display: block;
    position: relative;
    border: 2px dashed #d8d8d8;
    border-radius: 18px;
    background: var(--surface);
    padding: 52px 24px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s var(--ease), background .2s var(--ease);
}
.dropzone:hover { border-color: #b9b9b9; }
.dropzone.is-dragover {
    border-color: var(--accent);
    background: #f4f4f4;
}
.dropzone__input { display: none; }
.dropzone__icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    opacity: .6;
}
.dropzone__title { margin: 0; font-weight: 700; }
.dropzone__hint { margin: 4px 0 0; color: var(--text-muted); font-size: .9rem; }

.preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
}
.preview:empty { display: none; }
.preview__thumb {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

/* ===== Management dashboard ===== */
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 22px 24px;
    margin: 0 0 22px;
}
.panel__title {
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.panel__note {
    margin: 0;
    color: var(--text-muted);
    font-size: .9rem;
}

/* 横並びフォーム（入力＋ボタン） */
.row-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.row-form .field__input { flex: 1 1 200px; }

select.field__input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.album-admin {
    border-top: 1px solid var(--border);
    padding: 20px 0 4px;
}
.album-admin:first-of-type { border-top: none; padding-top: 4px; }
.album-admin__head {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
}
.album-admin__head .row-form { flex: 1 1 260px; }
.album-admin__head form { margin: 0; }
.album-admin__meta {
    margin: 8px 0 12px;
    color: var(--text-muted);
    font-size: .82rem;
}

.photo-admin {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 10px;
}
.photo-admin__item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.photo-admin__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-admin__item form { margin: 0; }
.photo-admin__del {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s var(--ease), background .2s var(--ease);
}
.photo-admin__item:hover .photo-admin__del { opacity: 1; }
.photo-admin__del:hover { background: #c0352c; }
@media (hover: none) {
    .photo-admin__del { opacity: 1; } /* タッチ端末では常時表示 */
}

/* ===== Lightbox ===== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(12, 12, 12, .92);
    padding: 24px;
    touch-action: none; /* スワイプ操作をブラウザのスクロールに奪われないように */
}
.lightbox.is-open {
    display: flex;
    animation: lb-fade .25s var(--ease);
}
@keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }

.lightbox__img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    animation: lb-zoom .3s var(--ease);
    transform-origin: center center;
    will-change: transform;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
}
@keyframes lb-zoom { from { transform: scale(.96); } to { transform: scale(1); } }

.lightbox__close,
.lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: none;
    cursor: pointer;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s var(--ease), transform .15s var(--ease);
}
.lightbox__close:hover,
.lightbox__nav:hover { background: rgba(255, 255, 255, .24); }
.lightbox__close:active,
.lightbox__nav:active { transform: scale(.92); }

.lightbox__close {
    top: calc(16px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
    width: 46px;
    height: 46px;
    font-size: 1.5rem;
}
.lightbox__nav {
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    font-size: 2rem;
}
.lightbox__nav--prev { left: 18px; }
.lightbox__nav--next { right: 18px; }
.lightbox__nav:active { transform: translateY(-50%) scale(.92); }

/* スマホでは画像下部に「スワイプで送る」ヒントを表示し、矢印ボタンは隠す */
.lightbox__hint {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .6);
    font-size: .78rem;
    letter-spacing: .03em;
    pointer-events: none;
}
@media (hover: none) and (pointer: coarse) {
    .lightbox__nav { display: none; }
    .lightbox__hint { display: block; }
}

/* ===== ギャラリー上部のムービーボタン ===== */
.gallery-bar {
    display: flex;
    justify-content: center;
    margin: 0 0 26px;
}
.movie-btn {
    font-size: .95rem;
    padding: 12px 26px;
    box-shadow: var(--shadow-md);
}

/* ホーム（ムービーを止めたとき／トップに見える画面）：ロゴ＋再生ボタン */
.home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    min-height: 62vh;
    text-align: center;
}
.home__logo { display: inline-flex; align-items: center; justify-content: center; }
.home__logo img { max-width: min(72vw, 440px); max-height: 42vh; width: auto; }
.home__logo-text {
    font-size: clamp(2.2rem, 8vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--text);
}

/* ===== Cinema（映画風スライドショー） ===== */
.cinema {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: none;
    background: #000;
    overflow: hidden;
    touch-action: none;
}
.cinema.is-open {
    display: block;
    animation: lb-fade .35s var(--ease);
}
.cinema__stage {
    position: absolute;
    inset: 0;
    perspective: 1400px;   /* 3Dフリップ演出用 */
}
/* 1枚分のレイヤー（切り替え演出は wrapper、Ken Burns は中の img で別々にかける） */
.cinema__slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    will-change: transform, opacity, filter;
    backface-visibility: hidden;
}
.cinema__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
}

/* 切り替え時の白フラッシュ（派手さ用） */
.cinema__flash {
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}
@keyframes cinema-flash {
    0%   { opacity: 0; }
    16%  { opacity: .8; }
    100% { opacity: 0; }
}

/* 写真の入場演出（スライドごとに切り替えて派手に。ブラー＆拡大でパンチを出す） */
@keyframes enter-fade    { from { opacity: 0; filter: blur(16px); transform: scale(1.14); } to { opacity: 1; filter: blur(0); transform: scale(1); } }
@keyframes enter-right   { from { opacity: 0; transform: translateX(100%) scale(1.1); filter: blur(6px); } to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); } }
@keyframes enter-left    { from { opacity: 0; transform: translateX(-100%) scale(1.1); filter: blur(6px); } to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); } }
@keyframes enter-up      { from { opacity: 0; transform: translateY(100%) scale(1.1); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes enter-zoom    { from { opacity: 0; transform: scale(2.3); filter: blur(12px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes enter-zoomout { from { opacity: 0; transform: scale(.35); filter: blur(4px); } to { opacity: 1; transform: scale(1); filter: blur(0); } }
@keyframes enter-rotate  { from { opacity: 0; transform: scale(1.5) rotate(12deg); filter: blur(8px); } to { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); } }
@keyframes enter-flip    { from { opacity: 0; transform: rotateY(88deg) scale(1.1); } to { opacity: 1; transform: rotateY(0) scale(1); } }

/* 退場演出（前の写真も動かして勢いを出す） */
@keyframes leave-fade { from { opacity: 1; transform: scale(1); }              to { opacity: 0; transform: scale(1.18); filter: blur(10px); } }
@keyframes leave-left { from { opacity: 1; transform: translateX(0); }          to { opacity: 0; transform: translateX(-62%) scale(.9); filter: blur(6px); } }
@keyframes leave-zoom { from { opacity: 1; transform: scale(1); }               to { opacity: 0; transform: scale(.45); filter: blur(6px); } }
@keyframes leave-up   { from { opacity: 1; transform: translateY(0); }          to { opacity: 0; transform: translateY(-62%) scale(.9); } }

/* 縁を少し暗くして映画館のような没入感を出す */
.cinema::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 180px rgba(0, 0, 0, .55);
    z-index: 1;
}

.cinema__progress {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: rgba(255, 255, 255, .15);
    z-index: 3;
}
.cinema__progress span {
    display: block;
    height: 100%;
    width: 0;
    background: #fff;
}

.cinema__controls {
    position: absolute;
    left: 0; right: 0;
    bottom: calc(26px + env(safe-area-inset-bottom));
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    z-index: 3;
    opacity: 0;
    transition: opacity .3s var(--ease);
}
.cinema.is-open .cinema__controls { opacity: 1; }
.cinema__btn,
.cinema__close {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border-radius: 999px;
    transition: background .2s var(--ease), transform .15s var(--ease);
}
.cinema__btn:hover,
.cinema__close:hover { background: rgba(255, 255, 255, .26); }
.cinema__btn:active,
.cinema__close:active { transform: scale(.92); }
.cinema__btn {
    width: 56px;
    height: 56px;
    font-size: 1.7rem;
    line-height: 1;
}
.cinema__close {
    position: absolute;
    top: calc(16px + env(safe-area-inset-top));
    right: calc(16px + env(safe-area-inset-right));
    width: 46px;
    height: 46px;
    font-size: 1.5rem;
    z-index: 8;
}

/* フィナーレ：写真が宙に浮かぶ */
.cinema.is-finale .cinema__controls,
.cinema.is-finale .cinema__progress { display: none; }

.cinema__finale {
    position: absolute;
    inset: 0;
    display: none;
    z-index: 4;
    background: rgba(8, 8, 8, .94);
}
.cinema__finale.is-on {
    display: block;
    animation: lb-fade .5s var(--ease);
}
/* フィナーレ上部のロゴ（クリックで公式サイトへ） */
.cinema__logo {
    position: absolute;
    top: calc(20px + env(safe-area-inset-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.cinema__logo img { max-height: 60px; max-width: 200px; width: auto; }
.cinema__logo-text { color: #fff; font-weight: 800; font-size: 1.6rem; letter-spacing: -.02em; }

/* 写真を等間隔のグリッドで浮かべる */
.cinema__field {
    position: absolute;
    inset: 0;
    overflow: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 38px 30px;
    align-content: center;
    justify-items: center;
    padding: 112px 32px calc(96px + env(safe-area-inset-bottom));
}
@media (max-width: 600px) {
    .cinema__field { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 26px 18px; padding: 100px 20px 90px; }
}
.cinema__float {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .5);
    cursor: pointer;
    opacity: 0;
    will-change: transform, opacity;
}
.cinema__float:hover {
    filter: brightness(1.12);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .7);
}
@keyframes float-in { from { opacity: 0; } to { opacity: 1; } }
/* 各写真に少しランダムなズレ（--ox/--oy）を与えつつ、その場でゆらゆら浮かせる */
@keyframes bob {
    from { transform: translate(var(--ox, 0px), calc(var(--oy, 0px) + 5px)); }
    to   { transform: translate(var(--ox, 0px), calc(var(--oy, 0px) - 6px)); }
}

.cinema__replay {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border: none;
    border-radius: 999px;
    padding: 10px 22px;
    font-size: .9rem;
    cursor: pointer;
    transition: background .2s var(--ease);
}
.cinema__replay:hover { background: rgba(255, 255, 255, .28); }

.cinema__zoom {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .82);
    z-index: 7;
    cursor: zoom-out;
    padding: 24px;
}
.cinema__zoom.is-on {
    display: flex;
    animation: lb-fade .25s var(--ease);
}
.cinema__zoom img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    animation: lb-zoom .3s var(--ease);
}

@media (prefers-reduced-motion: reduce) {
    .cinema__float { animation: float-in .6s ease both !important; }
}

/* Ken Burns（ゆっくりズーム＆パン）。スライドごとに動きを変える */
@keyframes kb1 { from { transform: scale(1)    translate(0, 0); }       to { transform: scale(1.18) translate(-3%, -2%); } }
@keyframes kb2 { from { transform: scale(1.18) translate(2%, 1%); }     to { transform: scale(1)    translate(0, 0); } }
@keyframes kb3 { from { transform: scale(1.06) translate(-2%, 2%); }    to { transform: scale(1.2)  translate(2%, -2%); } }
@keyframes kb4 { from { transform: scale(1.2)  translate(2%, 2%); }     to { transform: scale(1.05) translate(-2%, -1%); } }
@keyframes kb5 { from { transform: scale(1.04) translate(0, -2%); }     to { transform: scale(1.16) translate(0, 2%); } }
@keyframes kb6 { from { transform: scale(1.16) translate(-2%, 0); }     to { transform: scale(1.04) translate(2%, 0); } }

@media (prefers-reduced-motion: reduce) {
    .cinema__img { animation: none !important; }
}

/* ===== Intro splash (アクセス時の演出) ===== */
.intro {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    /* 奥行きを出すための、ごく淡い中央ハイライト */
    background: radial-gradient(120% 120% at 50% 42%, #ffffff 0%, var(--bg) 72%);
    transition: opacity .5s ease;
    /* ※ iPhone Safari 対策：animation ショートハンドの中で var() を使うと
       時間値を解釈できず再生されないことがあるため、すべて個別プロパティで指定する */
    animation-name: intro-hide;
    animation-duration: .55s;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
    animation-delay: var(--intro-dur, 2600ms);
    will-change: opacity;
}
.intro.is-skipped {
    animation: none;
    opacity: 0;
    visibility: hidden;
}
.intro__logo {
    max-width: min(62vw, 360px);
    max-height: 42vh;
    object-fit: contain;
}
.intro__video {
    max-width: 92vw;
    max-height: 80vh;
    object-fit: contain;
}
.intro__text {
    font-size: clamp(2rem, 9vw, 3.4rem);
    font-weight: 800;
    letter-spacing: -.03em;
    color: var(--text);
}
.intro__logo,
.intro__text {
    animation-name: intro-in;
    animation-duration: var(--intro-dur, 2600ms);
    animation-timing-function: cubic-bezier(.22, .61, .36, 1);
    animation-fill-mode: both;
    will-change: transform, opacity, filter;
}
.intro__skip {
    position: absolute;
    top: calc(14px + env(safe-area-inset-top));
    right: calc(12px + env(safe-area-inset-right));
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: .85rem;
    letter-spacing: .02em;
    cursor: pointer;
    padding: 8px 10px;
    z-index: 1;
}
/* ムービー風：少し大きめからゆっくり収まり、ピントが合うように現れる */
@keyframes intro-in {
    0%   { opacity: 0; transform: scale(1.14); filter: blur(8px); }
    30%  { opacity: 1; filter: blur(0); }
    78%  { opacity: 1; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.03); filter: blur(0); }
}
@keyframes intro-hide {
    to { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
    .intro__logo, .intro__text { animation: none; }
    .intro { animation-delay: 1200ms; }
}

/* ===== Footer ===== */
.site-footer {
    text-align: center;
    padding: 32px 20px 48px;
    padding-bottom: calc(48px + env(safe-area-inset-bottom));
    color: var(--text-muted);
    font-size: .85rem;
    border-top: 1px solid var(--border);
}
.site-footer p { margin: 0; }
