/*
 * プレリリース表示（バッジ + 帯バナー）
 * 全表示を OFF にするには body[data-preview="true"] を外す。
 *
 * 注: _variables.css 側の [data-theme="light"] span セレクタとの specificity 同等問題、
 *     および CSS 変数経由のテーマ切替で background-color が再評価されない Chrome 挙動を
 *     回避するため、ダーク値は変数ではなく直接色で上書きする。
 */

/* バッジ（ロゴ・ローディング画面） */
body .preview-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  background-color: #ff6b35 !important;
  color: #ffffff !important;
  font-size: 0.55em;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  vertical-align: middle;
  border-radius: 4px;
  pointer-events: none;
  user-select: none;
}

[data-theme='dark'] body .preview-badge {
  background-color: #ff8a65 !important;
  color: #1a1f29 !important;
}

body:not([data-preview="true"]) .preview-badge {
  display: none !important;
}

/* 帯バナー */
body .preview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 32px;
  padding: 6px 16px;
  background-color: #fff4ec !important;
  color: #8a3a10 !important;
  border-bottom: 1px solid #ffb591;
  font-size: 12px;
  line-height: 1.4;
  position: sticky;
  top: 0;
  z-index: 1090;
}

[data-theme='dark'] body .preview-banner {
  background-color: #2a1f17 !important;
  color: #ffd2b8 !important;
  border-bottom-color: #663d22;
}

body:not([data-preview="true"]) .preview-banner {
  display: none !important;
}

/* モバイルヘッダーとサブページ（position:fixed top:0）を、バナー実高さ分下げる */
body[data-preview="true"] .mobile-header,
body[data-preview="true"] .mobile-subpage {
  top: 44px;
}

@media (max-width: 480px) {
  body[data-preview="true"] .mobile-header,
  body[data-preview="true"] .mobile-subpage {
    top: 42px;
  }
}

body .preview-banner__message {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #8a3a10 !important;
}

[data-theme='dark'] body .preview-banner__message {
  color: #ffd2b8 !important;
}

body .preview-banner__icon {
  margin-right: 6px;
}

body .preview-banner__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background-color: #ff6b35 !important;
  color: #ffffff !important;
  border: none;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

[data-theme='dark'] body .preview-banner__cta {
  background-color: #ff8a65 !important;
  color: #1a1f29 !important;
}

body .preview-banner__cta:hover,
body .preview-banner__cta:focus-visible {
  opacity: 0.85;
  text-decoration: none;
}

@media (max-width: 480px) {
  body .preview-banner {
    font-size: 11px;
    padding: 5px 10px;
  }
  body .preview-banner__cta {
    font-size: 10px;
    padding: 3px 8px;
  }
}
