@charset "UTF-8";

/* =========================================
   基本設定 & フォント
   ========================================= */
body {
    font-family: "Zen Maru Gothic", sans-serif;
    /* ポップな背景パターン (水玉) */
    background-color: #F0FFF4;
    background-image: 
        radial-gradient(#32D74B 1.5px, transparent 1.5px),
        radial-gradient(#32D74B 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    background-position: 0 0, 15px 15px;
    
    /* 文字の読みやすさを確保するために背景を少し白くブレンド */
    background-blend-mode: overlay;
}

/* 英語/数字用フォント */
.font-english, .font-mono {
    font-family: "Fredoka", "M PLUS Rounded 1c", sans-serif;
    letter-spacing: 0.05em;
}

/* =========================================
   ローディング画面 (通信中でっせ.png)
   ========================================= */
#loader {
    /* グラデーション背景で少しリッチに */
    background: linear-gradient(135deg, #32D74B 0%, #30D5C8 100%);
}

/* 画像の影 */
#loader img {
    filter: drop-shadow(0 4px 0 rgba(0,0,0,0.1));
}

/* =========================================
   UI コンポーネント装飾
   ========================================= */

/* ボタン等のタップ時のハイライトを無効化 (スマホ用) */
button, input, select {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* カレンダーの日付ボタン */
#calendarDays button {
    position: relative;
    overflow: hidden;
}

/* 選択中の日付にキラキラ効果 */
#calendarDays button.bg-pop-pink::after {
    content: "✨";
    position: absolute;
    top: -4px;
    right: -4px;
    font-size: 10px;
    animation: spin-slow 3s infinite linear;
}

/* 時間枠ボタンのホバー/アクティブ挙動 */
#timeSlotsContainer button:active {
    transform: scale(0.96);
}

/* =========================================
   モーダル & フォーム
   ========================================= */

/* モーダル背景のぼかし強化 */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* 入力フォームのフォーカスリング */
input:focus, select:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(48, 213, 200, 0.3); /* pop-cyanの薄い色 */
    transform: translateY(-2px);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* チェックボックスのカスタムカラー */
input[type="checkbox"] {
    accent-color: #FF69B4; /* pop-pink */
    width: 1.25rem;
    height: 1.25rem;
}

/* readonlyのinput (住所自動入力欄など) */
input[readonly] {
    background-color: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
    pointer-events: none;
}

/* =========================================
   アニメーション定義
   ========================================= */

/* キラキラ回転 */
@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* メッセージモーダルのアイコンアニメーション */
#msgIcon {
    display: inline-block;
    animation: bounce-icon 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounce-icon {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); }
}

/* モーダル出現アニメーション (JS制御クラス用) */
.animate-pop-in {
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* =========================================
   スクロールバー (可愛くカスタマイズ)
   ========================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 99px;
    border: 2px solid #fff; /* 白枠で浮いているように見せる */
}
::-webkit-scrollbar-thumb:hover {
    background: #FF69B4; /* ホバーでピンクに */
}

/* =========================================
   背景の無限スクロール（新規追加）
   ========================================= */
.bg-scroll-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background-color: #F0FFF4; /* ベース背景色 */
}
.bg-scroll-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    /* 「画像の背景.jpg」のパスは実際の環境に合わせて変更してください */
    background-image: url('./画像の背景.jpg'); 
    background-repeat: repeat;
    background-size: contain;
    opacity: 0.08; /* 薄く表示して存在を和らげる */
    animation: scrollBackground 40s linear infinite;
}
@keyframes scrollBackground {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* =========================================
   ★2026-08 日本語の改行の直し
   -----------------------------------------
   これまで、見出しが単語の途中で折り返していました。
       本格設備で「跳    ／    ぶ」楽しさを！
       地域唯一！「競技用トラン    ／    ポリン」
   端末のせいではなく、指定を足せば直せる問題です。

   ・word-break: auto-phrase … 単語のかたまりで折り返す
       ※Chrome と Edge で効きます。iPhoneのSafariでは
         今までどおりの折り返しになります（悪くはなりません）。
         特に目立つ見出しは、HTML側で「ここでは切らない」指定も入れてあります。
   ・line-break: strict … 小さい「っ」や長音「ー」が行頭に来ないようにする
   ・text-wrap: balance … 見出しの各行の長さをそろえる

   本文（p）には auto-phrase を入れていません。
   実際に試したところ、長い文章では行末がガタガタになって
   かえって読みにくくなったためです。
   ========================================= */
h1, h2, h3, h4, h5, h6,
.kb-phrase {
    word-break: auto-phrase;
    line-break: strict;
    text-wrap: balance;
}

p, li, dd, figcaption, label, button, .btn {
    line-break: strict;
    text-wrap: pretty;
}

/* HTMLの中で「ここでは切らないでほしい」ひとかたまりを囲むための印。
   Safariを含め、どの端末でも効きます。 */
.kb-nw {
    display: inline-block;
}

/* ★2026-08 追加：規約本文の箱を、画面の高さに合わせて縮める。
   スマホを横向きにしたり、文字を大きく設定している方の画面では、
   本文の箱が320px固定だと「同意して予約確定へ」のボタンが
   画面の外に出てしまい、指でスクロールしても届きませんでした
   （窓は position:fixed のため、ページのスクロールでは動きません）。 */
#termsReserveScroll.kb-terms-box {
  max-height: 45vh;
}

/* ★2026-08 追加：カレンダーの読みやすさ・押しやすさ。
   ・空き状況（空6／残2／満）が9pxで、老眼の保護者には読めませんでした。
     予約するかどうかを決める、いちばん大事な情報です。
   ・日付のボタンが実測38×38pxで、推奨の44pxに届いていませんでした。
     指の太い方・お年を召した方は、隣の日を押してしまいます。 */
.kb-cal-mark {
  font-size: 11px;
}
/* 狭い画面では、カードの余白と枠のすき間を詰めて、
   日付ボタンそのものを大きくします。
   むりに広げるとマスどうしが重なるので、置き場所のほうを広げます。 */
@media (max-width: 420px) {
  #calendarGrid,
  #calendarDays {
    gap: 2px;
    margin-left: -16px;
    margin-right: -16px;
  }
}
/* 月送りのボタンも、指で押しやすい大きさにします */
#prevMonthBtn,
#nextMonthBtn {
  min-width: 44px;
  min-height: 44px;
}
