@charset "UTF-8";

/* =========================
   legal page base
   ========================= */
.pwa-legal-page{
  padding: 16px;
}

/* h1（タイトル）は legal.jsp 側で1回だけ出す想定 */
.pwa-legal-title{
  font-size: 18px;
  margin: 8px 0 14px;
  scroll-margin-top: 72px; /* iOSの慣性/アンカーでヘッダー被り軽減 */
}

.pwa-legal-body h2{
  font-size: 15px;
  margin: 16px 0 8px;
}

.pwa-legal-body p,
.pwa-legal-body li{
  line-height: 1.8;
  font-size: 14px;
}

.pwa-legal-hr{
  border: none;
  border-top: 1px solid rgba(0,0,0,.12);
  margin: 18px 0;
}

/* =========================
   company list (k/v)
   ========================= */
.pwa-legal-list{
  list-style: none;
  padding: 0;
  margin: 0;
}

.pwa-legal-list li{
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(0,0,0,.10);
}

.pwa-legal-list .k{
  width: 90px;
  opacity: .75;
  flex: 0 0 auto;
}

.pwa-legal-list .v{
  flex: 1 1 auto;
}

/* =========================
   tokusho table
   ========================= */
.pwa-legal-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

.pwa-legal-table th,
.pwa-legal-table td{
  border: 1px solid rgba(0,0,0,.12);
  padding: 10px;
  vertical-align: top;
}

.pwa-legal-table th{
  width: 34%;
  background: rgba(0,0,0,.03);
  text-align: left;
  font-weight: 900;
}

/* =========================
   Floating Back Button
   - header.jsp を壊さないため、ヘッダー外に別置き
   ========================= */
.pwa-floating-back{
  position: fixed;
  right: 14px;
  top: 76px;             /* ヘッダーの少し下（必要なら調整） */
  z-index: 3000;

  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.95);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  text-decoration: none;
  color: inherit;
  font-size: 20px;
  line-height: 1;

  box-shadow: 0 8px 18px rgba(0,0,0,.10);
}

/* ノッチ端末の安全領域を考慮（対応ブラウザのみ） */
@supports (top: env(safe-area-inset-top)){
  .pwa-floating-back{
    top: calc(76px + env(safe-area-inset-top));
  }
}

/* =========================
   Legal footer (settings用のリンク群)
   ========================= */
.pwa-legal-footer{
  margin-top: 18px;
  padding: 18px 14px;
  border-top: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.92);
}

.pwa-legal-footer__inner{
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.pwa-legal-footer__brand{
  font-weight: 900;
  font-size: 14px;
  margin-bottom: 8px;
}

.pwa-legal-footer__copy{
  font-size: 12px;
  opacity: .75;
  margin-bottom: 10px;
}

.pwa-legal-footer__links{
  font-size: 13px;
  line-height: 1.9;
}

.pwa-legal-footer__links a{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.pwa-legal-footer__links .sep{
  margin: 0 6px;
  opacity: .5;
}

/* =========================
   Bottom Sheet (more detail)
   ========================= */
.no-scroll{
  overflow: hidden;
}

.pwa-legal-sheet{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  pointer-events: none;         /* ←閉じてる時は絶対にクリックを吸わない */
}

/* 念のため：閉じてる時は見た目も完全に消す（既存実装に合わせて） */
.pwa-legal-sheet[aria-hidden="true"]{
  visibility: hidden;
}

.pwa-legal-sheet.is-open{
  display: block;
  visibility: visible;
  pointer-events: auto;  /* ←これが無いのが致命的 */
}

.pwa-legal-sheet__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  pointer-events: auto;  /* ←念のため（iOSで安定） */
}

.pwa-legal-sheet__panel{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: 66vh;
  max-height: 720px;

  background: #fff;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -12px 30px rgba(0,0,0,.20);

  display: flex;
  flex-direction: column;
  overflow: hidden;

  pointer-events: auto;  /* ←念のため（iOSで安定） */
}

.pwa-legal-sheet__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(0,0,0,.10);
}

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

.pwa-legal-sheet__close{
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  background: #fff;
  font-size: 20px;
  line-height: 1;
}

.pwa-legal-sheet__body{
  padding: 14px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.pwa-legal-loading{
  opacity: .75;
}

.pwa-legal-sheet__footer{
  padding: 10px 14px;
  border-top: 1px solid rgba(0,0,0,.10);
  display: flex;
  justify-content: flex-end;
}

.pwa-legal-sheet__openpage{
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: inherit;
}

