/* メインスタイル - ザジ・ズー現代贋作劇場 */

/* デスクトップ */
.desktop {
    width: 100vw;
    height: 100vh;
    background: var(--desktop-bg);
    position: relative;
    overflow: hidden;
}

/* ===== Boot Screen ===== */
.boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: screen-flicker 0.1s ease-in-out 3;
}

@keyframes screen-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
}

.boot-content {
    text-align: center;
    max-width: 80%;
}

.ascii-art {
    color: var(--neon-cyan);
    font-family: 'Courier New', monospace;
    font-size: clamp(6px, 1.5vw, 14px);
    text-shadow: var(--neon-glow);
    line-height: 1;
    margin-bottom: 20px;
    animation: ascii-glow 2s ease-in-out infinite;
}

@keyframes ascii-glow {
    0%, 100% { text-shadow: var(--neon-glow); }
    50% { text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor; }
}

.boot-title {
    color: var(--neon-pink);
    font-size: clamp(18px, 4vw, 32px);
    text-shadow: var(--neon-glow);
    margin-bottom: 30px;
    font-weight: bold;
    animation: title-pulse 1.5s ease-in-out infinite;
}

@keyframes title-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.boot-info {
    margin-top: 30px;
}

.boot-text {
    color: var(--neon-green);
    font-family: 'Courier New', monospace;
    font-size: 14px;
    margin: 10px 0;
    animation: blink-cursor 1s step-end infinite;
}

.boot-text::after {
    content: '_';
    animation: blink 0.7s step-end infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.progress-bar {
    width: 400px;
    max-width: 80vw;
    height: 20px;
    background: #222;
    border: 2px solid var(--neon-cyan);
    margin: 20px auto;
    overflow: hidden;
    box-shadow: inset 0 0 10px rgba(0, 224, 184, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-purple));
    width: 0%;
    animation: progress-load 3s ease-out forwards;
    box-shadow: 0 0 15px var(--neon-cyan);
}

@keyframes progress-load {
    0% { width: 0%; }
    20% { width: 30%; }
    40% { width: 55%; }
    60% { width: 75%; }
    80% { width: 90%; }
    100% { width: 100%; }
}

.boot-status {
    color: var(--neon-yellow);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    margin-top: 15px;
    animation: fade-in-out 2s ease-in-out infinite;
}

@keyframes fade-in-out {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

#countdown-display {
    color: var(--neon-yellow);
    font-family: 'Courier New', monospace;
    font-size: 18px;
    text-shadow: 0 0 10px var(--neon-yellow);
    font-weight: bold;
}

/* コンテンツスタイル */
.hero-section h1 {
    font-size: 24px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    text-align: center;
}

.hero-section h2 {
    font-size: 16px;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    text-align: center;
    font-weight: normal;
}

.core-message {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: #F0F0F0;
    padding: 12px;
    border: 1px inset var(--button-face);
    margin: 16px 0;
}

/* 見どころセクション */
.highlights {
    margin: 24px 0;
}

.highlights h3 {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    border-bottom: 2px solid var(--button-shadow);
    padding-bottom: 4px;
}

.highlight-item {
    margin: 16px 0;
    padding: 12px;
    background: #F8F8F8;
    border: 1px inset var(--button-face);
}

.highlight-item h4 {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.highlight-item p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
}

/* 詳細セクション */
.details-section {
    margin: 24px 0;
}

.details-section summary {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    background: var(--button-face);
    border: 2px outset var(--button-face);
    margin-bottom: 8px;
}

.details-section summary:hover {
    background: #D4D0C8;
}

.details-content {
    padding: 12px;
    background: #F8F8F8;
    border: 1px inset var(--button-face);
}

.details-content h4 {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 12px 0 4px 0;
}

.details-content h4:first-child {
    margin-top: 0;
}

.details-content p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

/* チケットタブ */
.ticket-tabs {
    display: flex;
    margin-bottom: 16px;
}

.tab-btn {
    background: var(--button-face);
    border: 2px outset var(--button-face);
    border-bottom: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 8px 16px;
    cursor: pointer;
    flex: 1;
}

.tab-btn:hover {
    background: #D4D0C8;
}

.tab-btn.active {
    background: var(--window-bg);
    border: 2px inset var(--button-face);
    border-bottom: 2px solid var(--window-bg);
    position: relative;
    z-index: 1;
}

.tab-content {
    border: 2px inset var(--button-face);
    padding: 16px;
    background: var(--window-bg);
}

.tab-content h3 {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

/* 価格表 */
.price-table {
    margin: 16px 0;
    border: 2px inset var(--button-face);
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--button-shadow);
    background: #F8F8F8;
}

.price-row:last-child {
    border-bottom: none;
}

.stock-badge {
    font-size: 12px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 2px;
}

.stock-badge.available {
    background: #90EE90;
    color: #000080;
}

.stock-badge.limited {
    background: #FFD700;
    color: #000080;
}

.stock-badge.sold-out {
    background: #FF6B6B;
    color: white;
}

/* CTAボタン */
.purchase-buttons {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cta-button {
    background: var(--accent);
    border: 2px outset var(--accent);
    color: var(--text-inverse);
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    padding: 12px 16px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s;
}

.cta-button:hover {
    background: #FF99DD;
}

.cta-button:active {
    border: 2px inset var(--accent);
}

.cta-button.secondary {
    background: var(--link);
    border-color: var(--link);
}

.cta-button.secondary:hover {
    background: #33E6C4;
}

.cta-button.special {
    background: #FFD700;
    border-color: #FFD700;
    color: #000080;
}

.cta-button.special:hover {
    background: #FFED4E;
}

/* 特別イベント */
.special-event {
    margin: 24px 0;
    padding: 16px;
    background: #F0F0FF;
    border: 2px inset var(--button-face);
}

.special-event h4 {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.special-event p {
    font-size: 13px;
    color: var(--text-primary);
    margin: 4px 0;
}

/* 会場情報 */
.venue-info h3 {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 24px 0 12px 0;
    border-bottom: 2px solid var(--button-shadow);
    padding-bottom: 4px;
}

.venue-info h3:first-child {
    margin-top: 0;
}

.venue-details {
    padding: 12px;
    background: #F8F8F8;
    border: 1px inset var(--button-face);
    margin-bottom: 16px;
}

.venue-details p {
    font-size: 13px;
    color: var(--text-primary);
    margin: 4px 0;
}

.travel-time {
    display: inline-block;
    background: var(--link);
    color: white;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 2px;
    margin-top: 8px;
}

.map-placeholder {
    text-align: center;
    padding: 32px;
    background: #F0F0F0;
    border: 2px inset var(--button-face);
    margin: 16px 0;
}

.map-icon {
    font-size: 48px;
    margin-bottom: 8px;
}

/* お客様の声 */
.testimonials {
    margin: 0 0 24px 0;
}

.testimonial {
    margin: 16px 0;
    padding: 12px;
    background: #F8F8F8;
    border: 1px inset var(--button-face);
}

.testimonial blockquote {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    font-style: italic;
}

.testimonial cite {
    font-size: 12px;
    color: var(--button-shadow);
    font-style: normal;
}

.sns-embed h4 {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.tweet-mock,
.instagram-mock {
    padding: 12px;
    background: #E8F4FD;
    border: 1px inset var(--button-face);
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.4;
}

/* FAQ */
.faq-list {
    margin: 0;
}

.faq-item {
    margin: 8px 0;
}

.faq-item summary {
    font-size: 14px;
    font-weight: bold;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    background: var(--button-face);
    border: 2px outset var(--button-face);
    list-style: none;
}

.faq-item summary:hover {
    background: #D4D0C8;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::before {
    content: "▶ ";
}

.faq-item[open] summary::before {
    content: "▼ ";
}

.faq-item p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0;
    padding: 12px;
    background: #F8F8F8;
    border: 1px inset var(--button-face);
    border-top: none;
}

/* 固定フローティングCTA */
.floating-cta {
    position: fixed;
    bottom: 60px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 500;
}

.floating-btn {
    background: var(--accent);
    border: 2px outset var(--accent);
    color: var(--text-inverse);
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 2px 2px 0 var(--shadow);
    transition: all 0.2s;
}

.floating-btn:hover {
    background: #FF99DD;
    transform: translateY(-1px);
    box-shadow: 3px 3px 0 var(--shadow);
}

.floating-btn:active {
    border: 2px inset var(--accent);
    transform: translateY(0);
    box-shadow: 1px 1px 0 var(--shadow);
}

.floating-btn.cta-tokyo {
    background: var(--link);
    border-color: var(--link);
}

.floating-btn.cta-tokyo:hover {
    background: #33E6C4;
}

.floating-btn.cta-discord {
    background: #7289DA;
    border-color: #7289DA;
}

.floating-btn.cta-discord:hover {
    background: #99AAE5;
}

/* ============================
   追記：質感UP & 使いやすさUP
   ============================ */

/* 0) 微調整用のフォールバック（windows95.css未定義でも破綻しないように） */
:root{
  --desktop-bg: var(--desktop-bg, #008080);
  --window-bg: var(--window-bg, #FFFFFF);
  --button-face: var(--button-face, #D4D0C8);
  --button-shadow: var(--button-shadow, #808080);
  --text-primary: var(--text-primary, #000000);
  --text-inverse: var(--text-inverse, #000000);
  --link: var(--link, #00C1A6);
  --accent: var(--accent, #FF77CC);
  --shadow: var(--shadow, #000000);
}

/* 1) レトロ質感：デスクトップにうっすらCRTノイズ感 */
.desktop{
  background-image:
    radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(transparent 97%, rgba(0,0,0,0.08) 100%);
  background-size: 3px 3px, 100% 2px;
  image-rendering: pixelated;
}

/* 2) Boot進行アニメ（見た目のドライブ感） */
@keyframes bootFill {
  0% { width: 0; }
  35% { width: 42%; }
  55% { width: 58%; }
  80% { width: 86%; }
  100% { width: 100%; }
}
.progress-fill{
  animation: bootFill 3.2s ease-in-out forwards;
}

/* 3) ヒーローのコピーを“95っぽく”強調 */
.hero-section h1{
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #fff, 2px 2px 0 var(--button-shadow);
}
.core-message{
  box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 var(--button-shadow);
}

/* 4) ハイライトのカードを立たせる（奥行き感） */
.highlight-item{
  box-shadow: 2px 2px 0 var(--button-shadow);
}
.highlight-item h4{
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

/* 5) CTAボタン：a要素にも同スタイル適用＆フォーカス可視化 */
a.cta-button, .cta-button{
  display: inline-block;
  text-decoration: none;
  outline: none;
  
}
a.cta-button:focus-visible, .cta-button:focus-visible{
  outline: 2px dashed #000;
  outline-offset: 2px;
}

/* 6) 価格表の可読性UP（行の交互色） */
.price-row:nth-child(odd){
  background: #EFEFEF;
}

/* 7) スケジュールリスト（東京タブ用） */
.schedule-list{
  margin: 12px 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}
.schedule-list li{ margin: 2px 0; }

/* 8) 会場ブロック：地図リンクに“押せる感”を付与 */
.map-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  background: #EEF9F6;
  padding: 6px 8px;
  border: 2px outset var(--button-face);
}
.map-link:hover{ filter: brightness(0.98); }
.map-link:active{ border: 2px inset var(--button-face); }

/* 9) 既存の map-placeholder を“そのままリンク化”したときの見た目 */
.map-placeholder a{
  display: inline-block;
  padding: 10px 14px;
  background: #fff;
  border: 2px outset var(--button-face);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: bold;
}
.map-placeholder a:hover{ background: #F8F8F8; }
.map-placeholder a:active{ border: 2px inset var(--button-face); }

/* 10) フローティングCTA：安全域＆モバイル最適化 */
.floating-cta{
  right: max(20px, env(safe-area-inset-right));
  bottom: max(60px, env(safe-area-inset-bottom));
}
@media (max-width: 680px){
  .floating-cta{ right: 12px; bottom: 70px; }
  .floating-btn{ padding: 10px 12px; font-size: 12px; }
}

/* 11) FAQのアクセシビリティ（開閉時のアニメ軽く） */
.faq-item[open] p{
  animation: faqOpen 120ms ease-out;
}
@keyframes faqOpen{
  from{ opacity: 0; transform: translateY(-2px); }
  to{ opacity: 1; transform: translateY(0); }
}

/* 12) フォーカスリング（全体統一） */
:focus-visible{
  outline: 2px dashed #000;
  outline-offset: 2px;
}

/* 13) 動きが苦手な人向け：アニメ抑制 */
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; }
}

/* === Ambient Desktop UI === */
.desktop-context {
  position: absolute; z-index: 9999; min-width: 200px;
  background: #FFFFE1; border: 2px outset var(--button-face);
  box-shadow: 2px 2px 0 var(--shadow); padding: 4px;
}
.desktop-context.hidden { display: none; }
.desktop-context button {
  width: 100%; text-align: left; padding: 6px 8px; background: #FFF;
  border: 1px solid #D4D0C8; margin: 2px 0; font-size: 13px; cursor: pointer;
}
.desktop-context button:hover { background: #F0F0F0; }
.desktop-context hr { border: none; border-top: 1px dashed #aaa; margin: 4px 0; }

.tip-toasts { position: fixed; right: 12px; bottom: 70px; z-index: 9998; display: grid; gap: 8px; }
.tip-toasts .toast {
  background: #E6FFE0; border: 2px outset var(--button-face); color:#000;
  padding: 8px 10px; font-size: 12px; max-width: 240px; box-shadow: 2px 2px 0 var(--shadow);
  animation: toastIn .15s ease-out; opacity: .95;
}
@keyframes toastIn { from { transform: scale(.9); opacity: 0; } to { transform: scale(1); opacity: .95; } }

.screensaver {
  position: fixed; inset: 0; background: #000; color: #00FF00; display: grid; place-items: center;
  z-index: 10000; user-select: none;
}
.screensaver.hidden { display: none; }
.screensaver-logo {
  font-family: 'Courier New', monospace; font-size: 48px; text-shadow: 0 0 8px #00FF00;
  animation: saverFloat 3.5s ease-in-out infinite alternate;
}
.screensaver-hint { position: absolute; bottom: 24px; color: #7CFF7C; font-size: 12px; opacity: .8; }
@keyframes saverFloat { from { transform: translateY(-12px); } to { transform: translateY(12px); } }

/* カーソルトレイル用（軽量） */
.cursor-dot {
  position: fixed; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.75); box-shadow: 0 0 6px rgba(255,255,255,.6);
  pointer-events: none; z-index: 9997; transform: translate(-50%,-50%);
  animation: dotFade .6s ease-out forwards;
}
@keyframes dotFade { to { transform: translate(-50%,-50%) scale(.6); opacity: 0; } }

/* Flyer */
.flyer-toolbar { display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap; }
.gallery-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(180px,1fr)); gap:12px; }
.flyer-thumb { width:100%; height:auto; cursor:zoom-in; border:1px inset var(--button-face); background:#fff; }
#flyer-lightbox { padding:12px; border:none; }
#flyer-lightbox::backdrop { background: rgba(0,0,0,.6); }
#flyer-lightbox img { max-width: 86vw; max-height: 76vh; }

/* Cast */
.cast-search { display:flex; gap:8px; align-items:center; margin-bottom:8px; }
.cast-search input { flex:1; padding:8px; border:2px inset var(--button-face); background:#fff; }
.cast-section { margin: 12px 0; }
.cast-section summary { cursor:pointer; font-weight:bold; }
.cast-list { columns: 2 240px; column-gap: 16px; list-style: none; padding: 0; }
.cast-list li { break-inside: avoid; padding:2px 0; }
.roles { display: grid; gap: 10px; }
.role-item { padding:8px; background:#F8F8F8; border:1px inset var(--button-face); }
.role-item .person { font-weight: bold; margin-bottom:6px; }
.badges { display:flex; flex-wrap:wrap; gap:6px; }
.badge { background:#E8F4FD; border:1px solid #B0C4DE; padding:3px 6px; border-radius:2px; font-size:12px; }
.cast-footnote { margin-top:10px; font-size:12px; color: #555; }

/* ウィンドウを縦にflexにして、中身だけスクロール可能にする */
.window {
  position: absolute;
  display: flex;
  flex-direction: column;
  /* 画面からはみ出し過ぎない保険（ドラッグで移動してもOK） */
  max-width: min(92vw, 980px);
  max-height: calc(100vh - 60px); /* タスクバーぶん余白 */
}

.window-header { flex: 0 0 auto; }

.window-content {
  flex: 1 1 auto;
  min-height: 0;           /* ← これ大事！中身に高さを譲る */
  overflow: auto;          /* ← 中身だけスクロール */
  -webkit-overflow-scrolling: touch; /* モバイルの慣性スクロール */
}

/* 最大化したときはフルに使う（タスクバー40px想定なら調整可） */
.window.maximized {
  left: 0 !important;
  top: 0 !important;
  width: 100vw !important;
  height: calc(100vh - 40px) !important;
}

/* モバイル全画面用（既存のshowMobileFullscreenに合わせる） */
.window.mobile-fullscreen {
  left: 0 !important; top: 0 !important;
  width: 100vw !important; height: 100vh !important;
  border-radius: 0 !important;
}

/* スクロールしてる感のシャドウ（任意：見栄え向上） */
.window-content.scroll-top    { box-shadow: inset 0 8px 8px -8px rgba(0,0,0,.25); }
.window-content.scroll-bottom { box-shadow: inset 0 -8px 8px -8px rgba(0,0,0,.25); }

/* ==== 起動アニメーション強化 ==== */
.boot-screen {
  background: #000;
  color: #0f0;
  font-family: "MS UI Gothic", monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  overflow: hidden;
  position: relative;
}

/* ノイズ・点滅 */
.boot-glitch {
  font-size: 48px;
  letter-spacing: 2px;
  color: #0f0;
  text-shadow: 0 0 5px #0f0, 0 0 15px #0f0;
  animation: glitchBlink 1.2s infinite alternate;
}

@keyframes glitchBlink {
  0%, 90% { opacity: 1; transform: none; }
  95% { opacity: 0.3; transform: translateX(2px) skewX(10deg); }
  100% { opacity: 1; transform: translateX(-1px) skewX(-8deg); }
}

/* 走査線 */
.boot-scan::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0,255,0,0.06) 0px,
    rgba(0,0,0,0.15) 2px
  );
  animation: scanMove 3s linear infinite;
  pointer-events: none;
}
@keyframes scanMove {
  0% { background-position: 0 -50%; }
  100% { background-position: 0 100%; }
}

/* テキスト登場 */
.boot-textline {
  margin-top: 20px;
  font-size: 14px;
  opacity: 0;
  animation: fadeIn 2s ease 1s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* ローディングバー */
.progress {
  width: 240px;
  height: 10px;
  background: rgba(0,255,0,0.1);
  border: 1px solid #0f0;
  margin-top: 20px;
  overflow: hidden;
}
.fill {
  height: 100%;
  width: 0;
  background: #0f0;
  animation: fillUp 4s linear forwards;
}
@keyframes fillUp { to { width: 100%; } }

/* フラッシュアウト */
.flashout {
  animation: flashOut 1.5s ease forwards;
}
@keyframes flashOut {
  0% { background: #000; }
  40% { background: #fff; }
  100% { background: transparent; }
}

.hidden { display: none !important; }

/* ===== iPhone快適スクロールパッチ ===== */

/* 1) ビューポートの実サイズを使う（アドレスバー表示/非表示でも高さがズレない） */
.desktop {
  /* まずは従来 */
  height: 100vh;
}
@supports (height: 100dvh) {
  .desktop { height: 100dvh; }
  .window.maximized { height: calc(100dvh - 40px) !important; } /* タスクバーぶん調整 */
  .window.mobile-fullscreen { height: 100dvh !important; }
}

/* 2) flex 子の“つっかえ”を解消（min-height:0 が超重要） */
.window {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 60px);
}
.window-content {
  flex: 1 1 auto;
  min-height: 0;                 /* ← これがないと上に詰まる */
  overflow: auto;
  -webkit-overflow-scrolling: touch; /* iOSの慣性スクロールON */
  overscroll-behavior: contain;  /* バウンスで親がスクロールしない */
  touch-action: pan-y;           /* 縦スクロールの意図を明示 */
  padding-bottom: max(12px, env(safe-area-inset-bottom));
}

/* 3) ボディ側のバウンスで“戻される”のを抑制（必要なら有効化） */
/* body { overscroll-behavior-y: none; } */

/* 4) スムーズスクロール（内部アンカー用。不要なら外してOK） */
:root { scroll-behavior: smooth; }

/* スクリーンセーバー本体 */
.screensaver { position: fixed; inset: 0; background: #000; display: grid; place-items: center; z-index: 10000; }
#screensaver-canvas { position:absolute; inset:0; width:100%; height:100%; display:block; }

/* UI（ロゴ＆ヒント。お好みで消してOK） */
.screensaver-ui { position: absolute; inset: 0; display:grid; place-items:center; pointer-events:none; }
.screensaver-logo { font: 700 48px/1.1 "MS UI Gothic", system-ui, sans-serif; color:#0f0; text-shadow:0 0 20px #0f0, 0 0 60px #0f0; opacity:.12; }
.screensaver-hint { position:absolute; bottom:24px; left:50%; transform:translateX(-50%); color:#8aa; font: 12px/1.4 monospace; opacity:.6; }

/* 任意：CRT風スキャンライン */
.screensaver.crt::after{
  content:""; position:absolute; inset:0;
  background: repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 3px);
  mix-blend-mode: soft-light; pointer-events:none;
}

.bw-steps{display:flex;gap:8px;margin:0 0 8px;padding:0;list-style:none;font:12px/1.2 ui-monospace,monospace}
.bw-steps li{padding:4px 6px;border:2px solid #111;background:#eee}
.bw-steps li.active{background:#ffe08a}
.bw-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.bw-card{border:2px solid #111;background:#fff;padding:8px;cursor:pointer}
.bw-card[aria-selected="true"]{outline:3px solid #111;background:#e6f7ff}

/* 追加CSS（style.cssの末尾へ） */
#social-ticker .bubble{
  display:inline-block; background:#fff; border:2px solid #111; padding:4px 8px; margin:2px;
  font:12px/1.2 ui-monospace,monospace;
}
.dialog .field-row-stacked input[readonly]{width:100%; padding:.4rem; border:2px solid #111; background:#f8f8f8}
.badge-pop{display:inline-block;padding:2px 6px;border:2px solid #111;background:#ffe08a;font:11px ui-monospace,monospace;margin-left:6px}

.dialog .field-row-stacked input[readonly]{width:100%; padding:.4rem; border:2px solid #111; background:#f8f8f8}
.cta-button.ghost{background:#fff;border:2px dashed #111}
.cta-button.linklike{background:transparent;border:none;text-decoration:underline; padding:0}
.badge-pop{display:inline-block;padding:2px 6px;border:2px solid #111;background:#ffe08a;font:11px ui-monospace,monospace;margin-left:6px}

#share-drawer { z-index: 10050; }  /* warning-dialog より手前に */


/* ZAZI INVADERS */
#zzi-cv{image-rendering:pixelated;touch-action:manipulation}
#zzi-pad{position:absolute;inset:auto 0 8px 0;display:flex;gap:8px;justify-content:center}
#zzi-pad button{border:2px solid #111;background:#fff;padding:.5rem .8rem}
#zzi-overlay{position:absolute;left:0;right:0;top:0;bottom:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.5)}
#zzi-panel{background:#fff;border:3px solid #111;box-shadow:6px 6px 0 #111;max-width:420px;padding:12px;font:13px ui-monospace,monospace}
#zzi-panel .row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
#zzi-panel .btn{border:2px solid #111;background:#fff;padding:.4rem .8rem;cursor:pointer}
#zzi-panel .btn.primary{background:#ffe08a}

/* ===== Priority Ribbon ===== */
.priority-ribbon{
  position:fixed; left:8px; right:8px; top:8px; z-index:9999;
  background:#fffceb; border:3px solid #111; box-shadow:4px 4px 0 #111; padding:0;
  font:14px/1.3 "MS UI Gothic",system-ui,ui-sans-serif;
}
.priority-ribbon .pr-body{ display:flex; gap:8px; align-items:center; padding:8px 10px; }
.pr-emoji{ font-size:18px; }
.pr-cta{
  margin-left:auto; text-decoration:none; color:#111;
  background:#fff; border:3px solid #111; box-shadow:3px 3px 0 #111; padding:6px 10px; font-weight:800;
}
.pr-alt{ border:2px solid #111; background:#fff; box-shadow:2px 2px 0 #111; padding:4px 8px; }
.pr-close{ border:none; background:transparent; font-weight:700; font-size:16px; padding:0 4px; cursor:pointer; }

/* ===== FastBuy (bottom sheet on mobile / modal on desktop) ===== */
.fastbuy-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:10000; display:grid; place-items:end center;
}
.fastbuy-sheet{
  width:min(720px, 96vw); background:#fff; border:3px solid #111; box-shadow:6px -6px 0 #111;
  border-bottom-width:5px; border-radius:8px 8px 0 0; padding:12px; transform:translateY(0);
}
@media (min-width:880px){
  .fastbuy-overlay{ place-items:center; }
  .fastbuy-sheet{ border-radius:8px; }
}
.fb-head{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.fb-title{ font-weight:800; }
.fb-close{ margin-left:auto; border:2px solid #111; background:#fff; box-shadow:2px 2px 0 #111; padding:2px 8px; cursor:pointer; }

.fb-form{ display:grid; gap:10px; }
.fb-fieldset{ border:2px solid #111; padding:8px; }
.fb-seg{ display:flex; gap:10px; align-items:center; }
.fb-hint{ color:#444; font-size:12px; }

.fb-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.fb-cta{
  text-decoration:none; color:#111; background:#fff;
  border:3px solid #111; box-shadow:3px 3px 0 #111; padding:8px 12px; font-weight:800;
}
.fb-ghost{
  text-decoration:none; color:#111; background:#eef7ff;
  border:2px solid #111; box-shadow:2px 2px 0 #111; padding:6px 10px; font-weight:700;
}
.fb-opt{ display:flex; align-items:center; gap:6px; font-size:12px; }

/* ===== Priority Ribbon ===== */
.priority-ribbon{
  position:fixed; left:8px; right:8px; top:8px; z-index:9999;
  background:#fffceb; border:3px solid #111; box-shadow:4px 4px 0 #111; padding:0;
  font:14px/1.3 "MS UI Gothic",system-ui,ui-sans-serif;
}
.priority-ribbon .pr-body{ display:flex; gap:8px; align-items:center; padding:8px 10px; }
.pr-emoji{ font-size:18px; }
.pr-cta{
  margin-left:auto; text-decoration:none; color:#111;
  background:#fff; border:3px solid #111; box-shadow:3px 3px 0 #111; padding:6px 10px; font-weight:800;
}
.pr-alt{ border:2px solid #111; background:#fff; box-shadow:2px 2px 0 #111; padding:4px 8px; }
.pr-close{ border:none; background:transparent; font-weight:700; font-size:16px; padding:0 4px; cursor:pointer; }

/* ===== FastBuy ===== */
.fastbuy-overlay{ position:fixed; inset:0; background:rgba(0,0,0,.35); z-index:10000; display:grid; place-items:end center; }
.fastbuy-sheet{
  width:min(720px, 96vw); background:#fff; border:3px solid #111; box-shadow:6px -6px 0 #111;
  border-bottom-width:5px; border-radius:8px 8px 0 0; padding:12px;
}
@media (min-width:880px){ .fastbuy-overlay{ place-items:center; } .fastbuy-sheet{ border-radius:8px; } }
.fb-head{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.fb-title{ font-weight:800; }
.fb-close{ margin-left:auto; border:2px solid #111; background:#fff; box-shadow:2px 2px 0 #111; padding:2px 8px; cursor:pointer; }
.fb-form{ display:grid; gap:10px; }
.fb-fieldset{ border:2px solid #111; padding:8px; }
.fb-seg{ display:flex; gap:10px; align-items:center; }
.fb-hint{ color:#444; font-size:12px; }
.fb-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.fb-cta{
  text-decoration:none; color:#111; background:#fff;
  border:3px solid #111; box-shadow:3px 3px 0 #111; padding:8px 12px; font-weight:800;
}
.fb-ghost{
  text-decoration:none; color:#111; background:#eef7ff;
  border:2px solid #111; box-shadow:2px 2px 0 #111; padding:6px 10px; font-weight:700;
}
/* utility */
[hidden]{ display:none !important; }

.pill-badge{display:inline-block;padding:6px 10px;border-radius:999px;background:#000080;color:#fff;
  font-weight:bold;text-decoration:none;border:2px outset #000080}
.pill-badge:hover{background:#3346a8}

.priority-ribbon{position:fixed;left:0;right:0;top:0;z-index:10000;background:#000;color:#fff;border-bottom:3px solid #111}
.priority-ribbon .pr-body{max-width:960px;margin:0 auto;padding:8px 12px;display:flex;gap:10px;align-items:center}
.priority-ribbon .pr-cta,.priority-ribbon .pr-alt{background:#fff;color:#000;border:2px outset #000;padding:4px 8px;text-decoration:none}
.priority-ribbon .pr-close{margin-left:auto;background:#111;color:#fff;border:2px inset #555;padding:0 8px}

  .vendor-countdowns{ margin:10px 0; }
  .vendor-counter{ background:#fff; border:2px solid #111; box-shadow:3px 3px 0 #111; padding:8px; margin:8px 0; }
  .vendor-counter .vc-head{ display:flex; gap:8px; align-items:center; font-weight:800; }
  .vendor-counter .vc-badge{ border:2px solid #111; background:#f0f0f0; padding:2px 6px; font:11px ui-monospace,monospace; }
  .vendor-counter .vc-badge.live{ background:#ffe08a; }
  .vendor-counter .vc-time{ font:20px ui-monospace,monospace; margin:6px 0; }
  .vendor-counter .cta-button[aria-disabled="true"]{ pointer-events:none; opacity:.6; }

/* ===== Top Countdown Ribbon ===== */
.countdown-ribbon{
  position: fixed; top: 8px; left: 50%; transform: translateX(-50%);
  z-index: 100000;
  background:#fff; border:2px solid #111; box-shadow:3px 3px 0 #111;
  padding:8px 10px; display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  font:12px/1.2 ui-monospace, monospace; max-width: min(94vw, 1024px);
}
.cd-item{ display:flex; gap:8px; align-items:center; }
.cd-badge{ border:2px solid #111; background:#f0f0f0; padding:2px 6px; font-weight:700; }
.cd-badge.live{ background:#ffe08a; }
.cd-time{ font:16px ui-monospace, monospace; }
.cd-btn[aria-disabled="true"]{ pointer-events:none; opacity:.6; }
@media (max-width:480px){ .cd-time{ font-size:14px; } }

/* ===== Countdown Banner ===== */
.countdown-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #ff0080, #8000ff, #0080ff, #00ff80);
    background-size: 300% 100%;
    animation: gradient-shift 3s ease infinite;
    padding: 10px 0;
    z-index: 99;
    border-bottom: 3px solid var(--neon-yellow);
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.banner-content {
    color: white;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

#countdown-display {
    color: var(--neon-yellow);
    font-family: 'Courier New', monospace;
    font-size: 18px;
    text-shadow: 0 0 10px var(--neon-yellow);
    font-weight: bold;
}


