/* ost-final.css　R05 最終統合（静寂の回廊）
 * 音楽の操作部と、音に従う光。無音のあいだは、何も動かず、何も光らない。
 * 色：藍 #0E1838／金 #D5AC5C／金の明るいところ #F1DFA8／和紙 #F4EFE4
 */

/* ---- 操作部（音楽を選んだあとにだけ、画面の左下に出る） ---- */
.ost-chip{position:fixed;left:max(1rem,env(safe-area-inset-left));bottom:calc(1rem + env(safe-area-inset-bottom));z-index:44;display:flex;align-items:center;flex-wrap:wrap;gap:.5rem;max-width:calc(100vw - 2rem);font:400 .8125rem/1.6 "Hiragino Sans","BIZ UDPGothic","Yu Gothic Medium","Noto Sans JP",Meiryo,sans-serif;color:#F4EFE4;text-align:start}
.ost-chip[hidden],.ost-chip [hidden]{display:none}
.ost-chip__b,.ost-chip__r{display:inline-flex;align-items:center;gap:.55rem;min-height:2.75rem;padding:0 1.05rem 0 .85rem;border:1px solid rgba(213,172,92,.6);border-radius:2rem;background:rgba(14,24,56,.95);color:#F4EFE4;font:inherit;font-weight:700;letter-spacing:.08em;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ost-chip__r{padding-left:1.05rem;border-color:#D5AC5C;color:#F1DFA8}
.ost-chip__b[aria-expanded="true"]{background:#D5AC5C;border-color:#D5AC5C;color:#0E1838}
.ost-chip__b[aria-expanded="true"] .ost-ring{border-color:#0E1838}
.ost-chip__b[aria-expanded="true"] .ost-ring::before{background:#0E1838}
.ost-chip button:focus-visible,.ost-inv__b:focus-visible,.ost-box input:focus-visible{outline:2px solid #F1DFA8;outline-offset:3px}
@media (max-width:56rem){ .ost-bar .ost-chip{bottom:calc(5.1rem + env(safe-area-inset-bottom))} }

/* 円相のしるし：無音は輪だけ。鳴っているあいだは、中に金が点る */
.ost-ring{flex:none;position:relative;width:1.05rem;height:1.05rem;border:1.5px solid #D5AC5C;border-radius:50%}
.ost-ring::before{content:"";position:absolute;inset:.24rem;border-radius:50%;background:#D5AC5C;opacity:0;transition:opacity .9s}
.ost-on .ost-ring::before{opacity:1}

/* 小窓（題・状態・再生と停止・音量） */
.ost-box{position:absolute;left:0;bottom:calc(100% + .55rem);width:min(21rem,calc(100vw - 2rem));padding:1.1rem 1.2rem 1.2rem;background:#0E1838;color:#E4E6EC;border:1px solid rgba(213,172,92,.5);box-shadow:0 1rem 2.5rem rgba(4,8,24,.45);font-weight:400;letter-spacing:0;white-space:normal}
/* 背の低い画面（スマートフォンの横向きなど）でも、小窓が画面の上に出ていかないようにする */
.ost-box{max-height:calc(100vh - 5.5rem);max-height:calc(100svh - 5.5rem);overflow:auto;overscroll-behavior:contain}
@media (max-width:56rem){ .ost-bar .ost-box{max-height:calc(100vh - 9.6rem);max-height:calc(100svh - 9.6rem)} }
.ost-box > p{margin:0;max-width:none}
.ost-box > .ost-box__ti{font-family:"Shippori Mincho","Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",serif;font-weight:500;font-size:1.0625rem;letter-spacing:.12em;line-height:1.5;color:#D5AC5C}
.ost-box__ti span{display:block;font-family:Georgia,"Times New Roman",serif;font-style:italic;font-size:.9375rem;letter-spacing:.01em;color:#B0B7C9}
html[lang="en"] .ost-box > .ost-box__ti{font-family:Georgia,"Times New Roman",serif;font-style:italic;letter-spacing:.02em}
html[lang="en"] .ost-box__ti span{font-family:"Shippori Mincho","Hiragino Mincho ProN","Yu Mincho",serif;font-style:normal;letter-spacing:.12em}
.ost-box > .ost-box__st{margin-top:.55rem;color:#E4E6EC}
.ost-box > .ost-box__tm{margin-top:.15rem;font-variant-numeric:tabular-nums;color:#B0B7C9}
.ost-box > .ost-box__ctl{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem 1rem;margin-top:.75rem}
.ost-box__ctl button{min-height:2.75rem;min-width:5.5rem;padding:0 1rem;border:1.5px solid #D5AC5C;border-radius:0;background:none;color:#D5AC5C;font:inherit;font-weight:700;letter-spacing:.06em;cursor:pointer}
.ost-box__ctl button[disabled]{opacity:.45;cursor:default}
.ost-box__ctl label{display:inline-flex;align-items:center;gap:.6rem;color:#E4E6EC}
.ost-box__ctl input[type="range"]{width:8.5rem;min-height:2.75rem;margin:0;accent-color:#D5AC5C}
.ost-box > .ost-box__nt{margin-top:.7rem;font-size:.75rem;line-height:1.7;color:#B0B7C9}

/* ---- 頁のはじめに置く、静かな誘い ---- */
.ost-inv{display:flex;flex-wrap:wrap;align-items:center;gap:.55rem 1rem;max-width:36rem;margin:1.75rem 0 0;padding:.95rem 0 0;border-top:1px solid rgba(213,172,92,.5);font-size:.875rem;line-height:1.7;color:inherit;text-align:start}
.ost-inv > p{margin:0;max-width:none}
.ost-inv > .ost-inv__t{display:flex;flex-direction:column;margin-right:auto}
.ost-inv__k{font-size:.75rem;letter-spacing:.14em;opacity:.78}
.ost-inv__ti{font-family:"Shippori Mincho","Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",serif;font-weight:500;font-size:1.0625rem;letter-spacing:.12em}
.ost-inv__ti span{margin-left:.75em;font-family:Georgia,"Times New Roman",serif;font-style:italic;font-weight:400;font-size:.9375rem;letter-spacing:.01em;opacity:.82}
html[lang="en"] .ost-inv__ti{font-family:Georgia,"Times New Roman",serif;font-style:italic;letter-spacing:.02em}
html[lang="en"] .ost-inv__ti span{font-family:"Shippori Mincho","Hiragino Mincho ProN","Yu Mincho",serif;font-style:normal;letter-spacing:.12em}
.ost-inv__b{min-height:2.75rem;padding:0 1.2rem;border:1px solid currentColor;border-radius:2rem;background:none;color:inherit;font:inherit;font-weight:700;letter-spacing:.08em;cursor:pointer;-webkit-tap-highlight-color:transparent}
.ost-inv__b[disabled]{opacity:.5;cursor:default}
.ost-inv[data-state="on"] .ost-inv__b{background:#D5AC5C;border-color:#D5AC5C;color:#0E1838}
.ost-inv > .ost-inv__n{flex-basis:100%;font-size:.75rem;opacity:.78}
.hero .ost-inv,.bwl-landing .ost-inv{margin-left:auto;margin-right:auto}
.r2-yoru__t .ost-inv{margin-top:1.4rem}

/* ---- 音に従う光 ---- */
/* 音の線：鳴っているあいだだけ、画面のいちばん上に、細い金の線が一本 */
.ost-light{position:fixed;inset:0;z-index:70;pointer-events:none;overflow:hidden}
.ost-light::before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:linear-gradient(90deg,rgba(213,172,92,0),#D5AC5C 30%,#F1DFA8 50%,#D5AC5C 70%,rgba(213,172,92,0));background-size:200% 100%;opacity:0;transition:opacity 1.4s}
.ost-on .ost-light::before{opacity:.9}
/* はじまりの光：音が出はじめたときに一度だけ、金の光がゆっくり画面を渡る。長さは、その曲の最初の高まりまでの実測（--ost-cue） */
.ost-light::after{content:"";position:absolute;inset:-10% -60%;background:linear-gradient(100deg,rgba(241,223,168,0) 42%,rgba(241,223,168,.13) 50%,rgba(241,223,168,0) 58%);transform:translateX(-45%);opacity:0}
@media (prefers-reduced-motion:no-preference){
  html.ost-on:not([data-motion="reduce"]):not([data-reduce="true"]) .ost-light::before{animation:ost-line 26s linear infinite}
  html.ost-on:not([data-motion="reduce"]):not([data-reduce="true"]) .ost-ring{animation:ost-breath 7s ease-in-out infinite}
  html.ost-cue:not([data-motion="reduce"]):not([data-reduce="true"]) .ost-light::after{animation:ost-pass var(--ost-cue,8s) cubic-bezier(.4,0,.3,1) 1 both}
}
@keyframes ost-line{from{background-position:0 0}to{background-position:-200% 0}}
@keyframes ost-breath{0%,100%{box-shadow:0 0 0 .18rem rgba(213,172,92,.10)}50%{box-shadow:0 0 0 .42rem rgba(213,172,92,.24)}}
@keyframes ost-pass{0%{transform:translateX(-45%);opacity:0}18%{opacity:1}82%{opacity:1}100%{transform:translateX(45%);opacity:0}}
html[data-motion="reduce"] .ost-light::after,html[data-reduce="true"] .ost-light::after{display:none}
@media print{.ost-chip,.ost-inv,.ost-light{display:none!important}}
