@charset "UTF-8";

:root{
  --footer-h: 64px; /* layoutと揃える */
}

/* ===== 共通：固定フッターの土台 ===== */
.pwa-footer{
  position: fixed !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;

  z-index: 3000;
  background: rgba(255,255,255,.96);
  border-top: 1px solid rgba(0,0,0,.08);
  backdrop-filter: blur(8px);

  padding-bottom: env(safe-area-inset-bottom);
}

.pwa-footer__inner{
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 14px;
}

/* ===== ① legal footer（home/settings） ===== */
.pwa-footer--legal .pwa-footer__inner{
  display: grid;
  gap: 8px;
  text-align: center;
}

.pwa-legal-brand{
  font-weight: 900;
  font-size: 14px;
}

.pwa-legal-copy{
  font-size: 12px;
  opacity: .75;
  line-height: 1.5;
}

/* フッターのリンク全体 */
.pwa-legal-links{
  display: block;        /* ← ここが重要 */
  font-size: 13px;
  line-height: 1.4;      /* ← 明示的に固定 */
  text-align: center;
}

/* 各リンク */
.pwa-legal-links a{
  display: inline-block;   /* ← flex禁止 */
  padding: 6px 6px;        /* タップしやすさ確保 */
  margin: 0;
  white-space: nowrap;     /* ← 勝手な折返し防止 */
  line-height: 1.4;        /* ← Safari対策 */
  position: relative;
  z-index: 1;              /* ← 区切りより前面に */
}

/* 区切り線 | */
.pwa-legal-links .sep{
  display: inline-block;
  margin: 0 2px;
  opacity: .6;
  pointer-events: none;  /* ← これが決定打 */
}

/* ===== ② 星 footer（占い結果画面） ===== */

.pwa-footer--stars .pwa-footer__inner{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  align-items: center;
  justify-items: center;
  text-align: left;
}

.pwa-footer--stars .pwa-footer__item{
  display: grid;
  grid-template-columns: 44px auto;
  column-gap: 2px;
  align-items: center;

  width: min(100%, 168px);

  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
}

.pwa-footer--stars .pwa-footer__label{
  font-weight: 900;
  opacity: .75;
  text-align: right;
}

.pwa-footer--stars .pwa-footer__value{
  font-weight: 900;
  text-align: left;
}

/* =========================================
   iOS App Legal Footer Bridge
   ========================================= */

.ios-app-footer {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 24px 16px calc(26px + env(safe-area-inset-bottom));
  text-align: center;
  color: #70645a;
}

.ios-app-footer__brand {
  color: #2d2118;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.ios-app-footer__text {
  margin: 8px auto 14px;
  max-width: 520px;
  font-size: 12px;
  line-height: 1.7;
}

.ios-app-footer__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

.ios-app-footer__links a {
  color: #5b3518;
  text-decoration: none;
  font-weight: 700;
}

.ios-app-footer__copy {
  margin-top: 12px;
  font-size: 11px;
  color: rgba(70, 55, 42, 0.68);
}