/* -------------------------------------------------------------
 * 女性専用パーソナルジム フレイム 生徒管理アプリ
 * デザインコンセプト: フレイム公式サイトカラーパレット ＆ プレミアムヨガアプリUI
 * ------------------------------------------------------------- */

/* 基本設定とリセット */
:root {
    --bg-primary: #fffaf9;         /* フレイムサイトに合わせた極めて淡いピンクベージュ */
    --text-main: #5a4d4a;          /* フレイムサイト主色の大人っぽいソフトブラウン */
    --text-muted: #a89b99;         /* フレイムサイトで使われるピンクグレー */
    --text-light: #d0c5c3;         /* 薄いベージュグレー */
    
    --flame-rose: #e3a6a9;         /* フレイムサイトのメイン桜ローズ（桜色） */
    --flame-peach: #fdb5c0;        /* 華やかなコーラルピンク */
    --flame-beige: #e0d5d3;        /* 境界線やバッジに使用されるベージュ */
    --flame-accent: #fcfbf9;       /* バッジ背景等のオフホワイト */
    
    --card-bg: #ffffff;
    --shadow-premium: 0 16px 40px rgba(90, 77, 74, 0.04); /* 非常にソフトなブラウンシャドウ */
    
    --font-jp: 'Noto Serif JP', 'Hiragino Mincho ProN', 'Yu Mincho', serif; /* フレイムサイトのセリフ調フォント */
    --font-en: 'Outfit', sans-serif;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--flame-rose) !important;
}

#gym-app-root {
    font-family: var(--font-en), var(--font-jp), sans-serif;
    color: var(--text-main);
    background-color: var(--bg-primary);
    min-height: 100vh;
    box-sizing: border-box;
    position: relative;
    overflow-x: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    -webkit-text-size-adjust: 100%; /* iOSでの意図しないテキストサイズ調整を防止 */
}

#gym-app-root * {
    box-sizing: border-box;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* -------------------------------------------------------------
 * モバイル専用レイアウト・シミュレーター
 * ------------------------------------------------------------- */
.gym-app-content,
.gym-login-wrapper {
    width: 100%;
    max-width: 412px;
    min-height: 100vh;
    background-color: var(--bg-primary);
    padding: 30px 24px 100px; /* 下部ナビゲーション用にpadding-bottomを広げる */
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

/* -------------------------------------------------------------
 * ログイン画面 (テンキー・PINコード・フレイムカラー)
 * ------------------------------------------------------------- */
.gym-login-wrapper {
    justify-content: space-between;
    align-items: center;
    text-align: center;
    padding-top: 60px;
    padding-bottom: 60px;
}

.gym-login-logo {
    margin-top: 20px;
}

.gym-login-logo img {
    max-height: 38px;
    width: auto;
}

.gym-login-logo p {
    font-family: var(--font-en);
    font-size: 10px;
    letter-spacing: 0.25em;
    color: var(--text-muted);
    margin: 10px 0 0;
    text-transform: uppercase;
    font-weight: 600;
}

.gym-login-title {
    font-family: var(--font-jp);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin: 30px 0 10px;
    letter-spacing: 0.05em;
}

/* PINコード入力用の下線 (8桁レスポンシブ対応) */
.gym-pin-lines {
    display: flex;
    justify-content: center;
    gap: 10px !important;
    margin: 35px 0;
}

.gym-pin-line {
    width: 16px !important;
    height: 3px;
    background-color: var(--flame-beige);
    border-radius: 2px;
    position: relative;
}

.gym-pin-line.filled::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--flame-rose); /* フレイムの桜色ドット */
}

.gym-pin-line.error {
    background-color: #e3a6a9;
    animation: shake 0.4s ease-in-out;
}

/* キーパッド */
.gym-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 30px;
    width: 100%;
    max-width: 260px;
    margin: 20px auto;
    touch-action: manipulation; /* iOSでのダブルタップズームを防止 */
}

.gym-key-btn {
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-en);
    font-size: 30px;
    font-weight: 300;
    color: var(--text-main);
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    touch-action: manipulation; /* iOSでのダブルタップズームを防止 */
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.gym-key-btn:active {
    background-color: rgba(227, 166, 169, 0.15);
    transform: scale(0.9);
}

.gym-key-btn.empty {
    pointer-events: none;
}

.gym-key-btn.delete {
    font-size: 18px;
    color: var(--text-muted);
}

.gym-login-error {
    font-size: 12px;
    color: var(--flame-rose);
    min-height: 20px;
    margin-top: 10px;
    font-weight: 600;
}

/* 成功時のWell done! 画面 (フレイム仕様) */
.gym-well-done-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
}

.gym-well-done-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background-color: var(--flame-rose); /* 桜色の南京錠サークル */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(227, 166, 169, 0.3);
    animation: bounce-in 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gym-well-done-icon svg {
    width: 30px;
    height: 30px;
}

.gym-well-done-wrap h3 {
    font-family: var(--font-en);
    font-size: 26px;
    font-weight: 700;
    margin: 24px 0 8px;
    letter-spacing: -0.01em;
    color: var(--text-main);
}

.gym-well-done-wrap p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

@keyframes bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.08); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-dot {
    0%   { box-shadow: 0 0 0 0 rgba(227, 166, 169, 0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(227, 166, 169, 0); }
    100% { box-shadow: 0 0 0 0 rgba(227, 166, 169, 0); }
}

/* -------------------------------------------------------------
 * マイページ (フレイム × ヨガアプリUIの完全再現)
 * ------------------------------------------------------------- */

/* ヘッダーデザイン */
.gym-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    width: 100%;
}

.gym-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 丸型ハンバーガーメニューボタン */
.gym-menu-btn,
.gym-bell-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 1px solid rgba(90, 77, 74, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(90, 77, 74, 0.02);
    color: var(--text-main);
}

.gym-header-title {
    display: flex;
    flex-direction: column;
}

.gym-header-title h4 {
    margin: 0;
    font-family: var(--font-jp);
    font-size: 14.5px;
    font-weight: 700;
}

.gym-next-lesson-badge {
    display: inline-block;
    align-self: flex-start;
    margin-top: 4px;
    font-family: var(--font-jp);
    font-size: 11px;
    font-weight: 700;
    color: var(--flame-rose);
    background: rgba(227, 166, 169, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    border: 1px solid rgba(227, 166, 169, 0.2);
    letter-spacing: 0.02em;
}

.gym-header-title p {
    margin: 2px 0 0;
    font-size: 10px;
    color: var(--text-muted);
}

/* プレミアムカード */
.gym-card {
    background: var(--card-bg);
    border-radius: 28px;
    padding: 24px 22px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-premium);
    border: none;
    position: relative;
    overflow: hidden;
}

/* ① Today's Plan (ヒーローグラデーションカード - 画像2枚目トップの再現) */
.gym-hero-card {
    background: linear-gradient(135deg, #fff2f0 0%, #fbe3de 100%);
    border: 1px solid rgba(227, 166, 169, 0.15);
    padding: 26px 22px;
}

.gym-hero-badge {
    display: inline-block;
    font-family: var(--font-en);
    font-size: 9px;
    font-weight: 600;
    color: var(--flame-rose);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.gym-hero-title {
    font-family: var(--font-jp);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.4;
    margin: 0 0 10px;
    letter-spacing: 0.02em;
}

.gym-hero-meta {
    font-family: var(--font-en);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gym-hero-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--text-light);
}

/* ヒーローカード用のアクションボタン */
.gym-hero-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--flame-rose);
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 12px 24px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(227, 166, 169, 0.35);
}

.gym-hero-action-btn:hover {
    background-color: #d19598;
    transform: translateY(-1px);
}

/* 装飾イラスト */
.gym-hero-illustration {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 130px;
    height: 130px;
    opacity: 0.08;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50,100 C25,70 25,30 35,15 C40,8 45,15 50,20 C55,15 60,8 65,15 C75,30 75,70 50,100 Z' fill='%235a4d4a'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* -------------------------------------------------------------
 * Goal Progress (半円ゲージ進捗カード - 画像右側の再現)
 * ------------------------------------------------------------- */
.gym-goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.gym-goal-header h3 {
    margin: 0;
    font-family: var(--font-en);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.gym-goal-edit-btn {
    background: #fdf2f0 !important;
    border: none !important;
    color: var(--flame-rose) !important;
    font-family: var(--font-en) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    padding: 6px 14px !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    box-shadow: none !important;
    text-transform: none !important;
}

/* 半円アーチゲージ容器 */
.gym-gauge-container {
    position: relative;
    width: 100%;
    height: 180px; /* バッジ追加分、高さを拡張 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 10px;
}

.gym-gauge-svg {
    width: 220px;
    height: 110px;
}

.gym-gauge-track {
    fill: none;
    stroke: #fdf2f0;
    stroke-width: 10;
    stroke-linecap: round;
}

.gym-gauge-fill {
    fill: none;
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 283; /* 半円の円周: PI * r (r=90 の場合 282.7) */
    stroke-dashoffset: 283; /* 100%のとき0になる */
    transition: stroke-dashoffset 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ゲージ中央 of 数値 */
.gym-gauge-inner-text {
    position: absolute;
    top: 50px; /* SVGの内側中央に綺麗に収まる位置に調整 */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gym-gauge-inner-text .now-lbl {
    font-family: var(--font-en);
    font-size: 9px;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.gym-gauge-inner-text .weight-val {
    font-family: var(--font-en);
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1;
    letter-spacing: -0.02em;
}

/* ゲージ下の目標差分バッジ */
.gym-gauge-badge-wrap {
    margin-top: 15px; /* 半円の底部から十分に離す */
    z-index: 5;
}

.gym-gauge-badge {
    background: #fff0f1; /* 淡い上品な桜ピンク背景 */
    color: var(--flame-rose);
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(227, 166, 169, 0.08);
    display: inline-block;
    letter-spacing: 0.02em;
}

/* 左右の限界ラベル */
.gym-gauge-limits {
    position: absolute;
    bottom: 0px; /* 最下部に配置して半円軌道との重なりを完全回避 */
    width: 250px; /* 横幅を広げて半円の外側両端に配置 */
    display: flex;
    justify-content: space-between;
    padding: 0;
}

.gym-gauge-limits span {
    font-family: var(--font-jp);
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* -------------------------------------------------------------
 * 縦スクロールドラムホイール体重入力UI (0.1kg単位 - 画像左側の再現)
 * ------------------------------------------------------------- */
.gym-drum-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
}

.gym-drum-card h3 {
    margin: 0 0 15px;
    font-family: var(--font-jp);
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-main);
}

.gym-drum-picker-container {
    position: relative;
    width: 100%;
    max-width: 220px;
    height: 160px; /* アイテム5個分表示 */
    overflow: hidden;
    margin: 15px auto;
    border-radius: 20px;
    background: #fffdfd;
}

/* 縦スクロールエリア */
.gym-drum-scroll-view {
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox用非表示 */
    padding: 64px 0; /* 上下に余白を入れて中央寄せにする */
    position: relative;
    z-index: 2; /* マスクより手前に配置 */
    background: transparent;
}

.gym-drum-scroll-view::-webkit-scrollbar {
    display: none; /* Chrome/Safari用非表示 */
}

/* ドラム要素 */
.gym-drum-item {
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-en);
    font-size: 18px;
    font-weight: 400;
    color: var(--text-muted);
    scroll-snap-align: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 3; /* マスクより手前 */
}

/* 中央ハイライトマスク */
.gym-drum-highlight-mask {
    position: absolute;
    top: 64px; /* 中央のアイテム位置 (高さ32px) */
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 32px;
    background-color: var(--flame-rose);
    border-radius: 10px;
    pointer-events: none; /* 下の要素をスクロールできるようにする */
    z-index: 1; /* スクロールビューや文字の背後に配置 */
    box-shadow: 0 4px 12px rgba(227, 166, 169, 0.25);
}

/* ハイライトされているドラムアイテムの文字色 */
.gym-drum-item.active {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    z-index: 4;
    transition: all 0.15s ease-out;
}

.gym-drum-unit {
    position: absolute !important;
    right: 28px !important;
    top: 50% !important;
    transform: translateY(-50%) !important; /* 縦中央揃えに修正し、崩れを防止 */
    font-family: var(--font-en) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    pointer-events: none !important;
}

/* 記録送信ボタン */
.gym-btn-drum-submit {
    margin-top: 15px !important;
    background-color: #ffd68a !important;
    background: #ffd68a !important;
    color: var(--text-main) !important;
    border: none !important;
    border-radius: 24px !important;
    padding: 14px 45px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    width: 100% !important;
    max-width: 220px !important;
    box-shadow: 0 8px 18px rgba(255, 214, 138, 0.4) !important;
    letter-spacing: 0.05em !important;
    text-decoration: none !important;
    text-transform: none !important;
}

.gym-btn-drum-submit:active {
    transform: scale(0.97) !important;
}

/* -------------------------------------------------------------
 * 日付指定選択用タブ ＆ カレンダー
 * ------------------------------------------------------------- */
.gym-date-selector {
    display: flex !important;
    justify-content: space-between !important;
    background: #fdf2f0 !important;
    padding: 4px !important;
    border-radius: 14px !important;
    width: 100% !important;
    max-width: 220px !important;
    margin: 0 auto 10px !important;
    border: none !important;
}

.gym-date-tab {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    border-width: 0 !important;
    font-family: var(--font-jp) !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    padding: 8px 0 !important;
    border-radius: 10px !important;
    cursor: pointer !important;
    text-align: center !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    text-decoration: none !important;
    text-transform: none !important;
}

.gym-date-tab.active {
    background: #ffffff !important;
    color: var(--text-main) !important;
    box-shadow: 0 4px 10px rgba(90, 77, 74, 0.03) !important;
    border: none !important;
}

.gym-custom-date-input-wrap {
    width: 100%;
    max-width: 220px;
    margin: 0 auto 10px;
    animation: gym-fade-in 0.3s ease-out;
}

.gym-custom-date-input-wrap input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--flame-beige);
    background: #ffffff;
    font-family: var(--font-en), var(--font-jp), sans-serif;
    font-size: 12.5px;
    color: var(--text-main);
    outline: none;
    text-align: center;
    font-weight: 600;
}

.gym-custom-date-input-wrap input:focus {
    border-color: var(--flame-rose);
}

@keyframes gym-fade-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------------------------
 * Current Streak (週間習慣トラッカー - 画像1枚目中央の再現)
 * ------------------------------------------------------------- */
.gym-streak-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 16px;
}

.gym-streak-fire-icon {
    font-size: 32px;
    line-height: 1;
    animation: pulse 2s infinite ease-in-out;
}

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

.gym-streak-info h4 {
    margin: 0;
    font-family: var(--font-en);
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
}

.gym-streak-info p {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--text-muted);
}

/* 曜日と✓バッジ */
.gym-streak-tracker {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid #fdf2f0;
}

.gym-streak-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.gym-streak-day-name {
    font-family: var(--font-en);
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.gym-streak-check-circle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid var(--flame-beige);
    background-color: var(--flame-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: transparent;
}

.gym-streak-check-circle.checked {
    background-color: var(--flame-rose);
    border-color: var(--flame-rose);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(227, 166, 169, 0.2);
}

/* -------------------------------------------------------------
 * Statistics (折れ線グラフカード - 画像右側の再現)
 * ------------------------------------------------------------- */
.gym-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.gym-card-header h3 {
    margin: 0;
    font-family: var(--font-en);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.gym-period-selector-wrap {
    position: relative;
}

.gym-period-select-btn {
    background: #fff;
    border: 1px solid rgba(90, 77, 74, 0.08);
    color: var(--text-main);
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(90, 77, 74, 0.01);
}

.gym-period-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border-radius: 12px;
    border: 1px solid rgba(90, 77, 74, 0.05);
    box-shadow: 0 8px 24px rgba(90, 77, 74, 0.08);
    z-index: 100;
    padding: 4px;
    margin-top: 6px;
    display: none;
    min-width: 80px;
}

.gym-period-dropdown.active {
    display: block;
}

.gym-period-option {
    padding: 6px 12px;
    font-family: var(--font-en);
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 8px;
    font-weight: 500;
    text-align: right;
}

.gym-period-option:hover,
.gym-period-option.active {
    background: #fdf2f0;
    color: var(--text-main);
    font-weight: 600;
}

.gym-chart-container {
    position: relative;
    width: 100%;
    height: 180px;
}

/* -------------------------------------------------------------
 * ビフォーアフター写真比較
 * ------------------------------------------------------------- */
.gym-photos-comparer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.photo-compare-item {
    background: #fffdfd;
    border-radius: 20px;
    padding: 14px;
    border: 1px solid rgba(227, 166, 169, 0.05);
}

.photo-compare-label {
    font-family: var(--font-en);
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: center;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.photo-compare-split {
    display: flex;
    gap: 10px;
}

.photo-frame {
    flex: 1;
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-frame .tag {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(90, 77, 74, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 8px;
    padding: 2px 6px;
    border-radius: 5px;
}

/* ⑧ 応援メッセージバナー */
.gym-inspirational-banner {
    background: linear-gradient(135deg, #fff0f2 0%, #fbe6eb 100%);
    border-radius: 24px;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(227, 166, 169, 0.1);
}

.gym-inspirational-banner p {
    margin: 0;
    font-family: var(--font-en), var(--font-jp), sans-serif;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-main);
    font-weight: 500;
    position: relative;
    z-index: 2;
}

.gym-inspirational-banner .heart {
    color: var(--flame-rose);
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
    animation: beat 1.2s infinite alternate ease-in-out;
}

.gym-inspirational-banner .leaf-deco {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 70px;
    height: 70px;
    opacity: 0.12;
    transform: rotate(-15deg);
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50,100 C25,70 25,30 35,15 C40,8 45,15 50,20 C55,15 60,8 65,15 C75,30 75,70 50,100 Z' fill='%23e3a6a9'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

@keyframes beat {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* -------------------------------------------------------------
 * ボトムナビゲーション
 * ------------------------------------------------------------- */
.gym-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 412px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(90, 77, 74, 0.04);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    z-index: 100;
}

.gym-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    font-family: var(--font-en);
    font-size: 9px;
    font-weight: 600;
    gap: 4px;
}

.gym-nav-item svg {
    width: 20px;
    height: 20px;
}

.gym-nav-item.active {
    color: var(--flame-rose);
}

/* -------------------------------------------------------------
 * モーダルシート (チェックイン ＆ 目標体重編集)
 * ------------------------------------------------------------- */
.gym-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background: rgba(90, 77, 74, 0.15);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden; /* タップバグを完全に防ぐ */
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gym-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.gym-modal-sheet {
    background: #fffaf9;
    width: 100%;
    max-width: 412px;
    border-radius: 32px 32px 0 0;
    padding: 30px 24px 45px;
    transform: translateY(100%);
    box-shadow: 0 -10px 40px rgba(90, 77, 74, 0.05);
}

.gym-modal-overlay.active .gym-modal-sheet {
    transform: translateY(0);
}

.gym-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.gym-modal-header h3 {
    margin: 0;
    font-family: var(--font-jp);
    font-size: 16px;
    font-weight: 700;
}

.gym-modal-close {
    background: rgba(90, 77, 74, 0.03);
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gym-btn-ripple {
    background: var(--text-main) !important;
    color: #fff !important;
    border: none !important;
    border-width: 0 !important;
    border-radius: 24px !important;
    padding: 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: 0.15em !important;
    cursor: pointer !important;
    width: 100% !important;
    text-transform: uppercase !important;
    box-shadow: 0 8px 20px rgba(90, 77, 74, 0.1) !important;
    text-decoration: none !important;
}

.gym-btn-ripple:hover {
    background: #000;
}

/* チェックイン画面 新デザイン用スタイル */
.gym-radio-card,
.gym-checkin-emoji-card,
.gym-checkin-check-card {
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    user-select: none;
    -webkit-user-select: none;
}
.gym-radio-card:hover,
.gym-checkin-emoji-card:hover,
.gym-checkin-check-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(90, 77, 74, 0.06);
    border-color: var(--flame-rose) !important;
}
.gym-radio-card:active,
.gym-checkin-emoji-card:active,
.gym-checkin-check-card:active {
    transform: scale(0.97);
}

/* -------------------------------------------------------------
 * チェックインモーダル内のグリッド ＆ タグスタイル
 * ------------------------------------------------------------- */
.cycle-options-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 25px;
}

.cycle-option-card {
    background: #ffffff;
    border: 1px solid var(--flame-beige);
    border-radius: 14px;
    padding: 14px 6px;
    text-align: center;
    cursor: pointer;
    font-family: var(--font-jp);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(90, 77, 74, 0.01);
}

.cycle-option-card.selected {
    background-color: var(--flame-rose);
    border-color: var(--flame-rose);
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(227, 166, 169, 0.25);
}

.symptom-tag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.symptom-tag-item {
    background: #ffffff;
    border: 1px solid var(--flame-beige);
    border-radius: 18px;
    padding: 8px 14px;
    font-family: var(--font-jp);
    font-size: 11.5px;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(90, 77, 74, 0.01);
}

.symptom-tag-item.selected {
    background-color: var(--flame-rose);
    border-color: var(--flame-rose);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(227, 166, 169, 0.2);
}

/* -------------------------------------------------------------
 * 目標体重編集フォーム用スタイル
 * ------------------------------------------------------------- */
.gym-input-group {
    margin-bottom: 20px;
}

.gym-input-group label {
    display: block;
    font-family: var(--font-en), var(--font-jp), sans-serif;
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gym-input-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--flame-beige);
    background: #ffffff;
    font-family: var(--font-en);
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    font-weight: 600;
}

.gym-input-group input:focus {
    border-color: var(--flame-rose);
    box-shadow: 0 0 0 3px rgba(227, 166, 169, 0.1);
}

/* -------------------------------------------------------------
 * トースト通知用プレミアムスタイル (成功フィードバック用)
 * ------------------------------------------------------------- */
.gym-toast {
    position: fixed;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(90, 77, 74, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 14px 28px;
    border-radius: 24px;
    font-family: var(--font-jp);
    font-size: 12.5px;
    font-weight: 600;
    z-index: 3000;
    box-shadow: 0 10px 30px rgba(90, 77, 74, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.gym-toast.show {
    top: 30px;
    opacity: 1;
}

/* -------------------------------------------------------------
 * 共通ローダー (水滴リップル)
 * ------------------------------------------------------------- */
.gym-app-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    width: 100%;
}

.ripple-loader {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.ripple-loader div {
    position: absolute;
    border: 4px solid var(--flame-rose);
    opacity: 1;
    border-radius: 50%;
    animation: ripple-loader-anim 1.5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.ripple-loader div:nth-child(2) {
    animation-delay: -0.5s;
}

@keyframes ripple-loader-anim {
    0% { top: 36px; left: 36px; width: 0; height: 0; opacity: 0; }
    5% { top: 36px; left: 36px; width: 0; height: 0; opacity: 1; }
    100% { top: 0px; left: 0px; width: 72px; height: 72px; opacity: 0; }
}

/* -------------------------------------------------------------
 * ワンタップチェックインUI ＆ スタイル
 * ------------------------------------------------------------- */
.gym-simple-checkin-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    margin-bottom: 10px;
}

.gym-simple-checkin-btn {
    background: #ffffff;
    border: 1px solid rgba(90, 77, 74, 0.05);
    border-radius: 24px;
    padding: 22px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(90, 77, 74, 0.02);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    outline: none;
}

.gym-simple-checkin-btn:active {
    transform: scale(0.94);
    background: #fff0f2;
    border-color: var(--flame-rose);
    box-shadow: 0 4px 10px rgba(227, 166, 169, 0.15);
}

.gym-simple-checkin-btn .emoji {
    font-size: 28px;
    margin-bottom: 10px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.gym-simple-checkin-btn:active .emoji {
    transform: scale(1.15);
}

.gym-simple-checkin-btn .label {
    font-family: var(--font-jp);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

/* -------------------------------------------------------------
 * 経過写真の拡大表示 (Lightbox) スタイル
 * ------------------------------------------------------------- */
/* タイムライン経過写真の横スクロールスタイル */
.gym-photo-timeline-row {
    margin-bottom: 24px;
}

.gym-photo-timeline-row:last-child {
    margin-bottom: 0;
}

.gym-photo-timeline-label {
    font-family: var(--font-jp);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    padding-left: 2px;
}

.gym-photo-timeline-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin: 0 -15px; /* 親カードのパディングを打ち消して画面端までスクロールさせる */
    padding: 0 15px;
}

/* スクロールバーの非表示 */
.gym-photo-timeline-scroll::-webkit-scrollbar {
    display: none;
}

.gym-photo-timeline-track {
    display: flex;
    gap: 12px;
    padding-bottom: 8px; /* シャドウ切れを防ぐためのパディング */
}

/* タイムラインカード */
.gym-photo-timeline-card {
    flex: 0 0 45%; /* 画面幅の45%にし、gapと合わせて常に2.1枚（2枚全見え＋3枚目がチラ見え）見せる */
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(90, 77, 74, 0.05);
    border: 1px solid rgba(90, 77, 74, 0.03);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.gym-photo-timeline-card:active {
    transform: scale(0.96);
}

.gym-photo-timeline-img-wrap {
    position: relative;
    width: 100%;
    height: 140px; /* 縦横比が違う写真であっても縦サイズを一律で140pxに揃える */
    background: #f7f5f4;
}

.gym-photo-timeline-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 各ステータスタグ */
.gym-photo-timeline-tag {
    position: absolute;
    bottom: 6px;
    left: 6px;
    color: #ffffff;
    font-size: 8.5px;
    font-weight: 700;
    padding: 2.5px 7px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.gym-photo-timeline-tag.tag-latest {
    background: rgba(227, 166, 169, 0.85); /* 桜色 (最新) */
}

.gym-photo-timeline-tag.tag-initial {
    background: rgba(144, 185, 204, 0.85); /* 水色 (初回) */
}

.gym-photo-timeline-tag.tag-progress {
    background: rgba(90, 77, 74, 0.6); /* グレー (経過) */
}

.gym-photo-timeline-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    background: #fff;
    border-top: 1px solid rgba(90, 77, 74, 0.02);
}

.gym-photo-timeline-meta .date {
    font-family: var(--font-en);
    font-size: 9.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.gym-photo-timeline-meta .weight {
    font-family: var(--font-en);
    font-size: 11px;
    color: var(--flame-rose);
    font-weight: 700;
}

/* 拡大モーダルのプレミアムリデザイン（純白ジャーナル風） */
.gym-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(253, 252, 251, 0.97); /* 非常に上品なホワイトベージュ透過背景 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden; /* タップバグを完全に防ぐ */
    transition: opacity 0.35s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.gym-lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* カールーセルコンテナ */
.gym-lightbox-container-wrapper {
    width: 100%;
    max-width: 500px; /* 380px ➔ 500px に拡張 */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gym-lightbox-carousel {
    position: relative;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 20px 0;
    box-sizing: border-box;
}

.gym-lightbox-carousel::-webkit-scrollbar {
    display: none;
}

.gym-lightbox-track {
    display: flex;
    box-sizing: border-box;
    padding-left: calc((100% - 370px) / 2 - 15px); /* 最初のスライドが画面中央に完璧にスナップする余白 */
    padding-right: 0;
}

.gym-lightbox-track::after {
    content: '';
    display: block;
    flex: 0 0 calc((100% - 370px) / 2 - 15px); /* 最後のスライドが画面中央にスナップするための右端バッファ */
    width: calc((100% - 370px) / 2 - 15px);
    height: 1px;
}

/* スライドカード本体 */
.gym-lightbox-slide {
    flex: 0 0 370px; /* 幅を370pxに拡張 */
    margin: 0 15px; /* 余白を左右15px（合計30px）に調整 */
    scroll-snap-align: center;
    opacity: 0.35;
    transform: scale(0.93); /* サイズ差を縮めて（0.93 ➔ 1.00）変形によるガタつきを防止 */
    will-change: transform, opacity; /* GPUレイヤーに載せてスクロール中の再描画負荷を撲滅 */
    transition: opacity 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); /* より滑らかな高級イージング */
}

.gym-lightbox-slide.active {
    opacity: 1;
    transform: scale(1.00); /* 拡大しすぎず、100%サイズに着地させてノイズをなくす */
}

.gym-lightbox-card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16; /* 縦横比をスマホ写真標準の9:16に縦長化 */
    max-height: 58vh; /* 画面縦幅の58%を上限とし、低い画面（ノートPC/モバイル等）でも絶対にはみ出さないよう自動調整 */
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(90, 77, 74, 0.18);
    border: 1px solid rgba(90, 77, 74, 0.06);
    background: #ffffff;
}

.gym-lightbox-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* クローズボタンの高級化 */
.gym-lightbox-close {
    position: absolute;
    top: 25px;
    right: 25px;
    background: rgba(90, 77, 74, 0.05);
    border: 1px solid rgba(90, 77, 74, 0.08);
    color: var(--text-main);
    font-size: 22px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    transition: background 0.2s, transform 0.2s;
    z-index: 1200;
}

.gym-lightbox-close:hover {
    background: rgba(90, 77, 74, 0.1);
    transform: scale(1.08);
}

/* カレンダー風の月日オーバーレイ */
.gym-lightbox-date-overlay {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    font-family: var(--font-en);
    line-height: 0.9;
}

.gym-lightbox-date-overlay .day {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.gym-lightbox-date-overlay .month {
    font-size: 14px;
    font-weight: 700;
    margin-top: 2px;
    letter-spacing: 0.05em;
    opacity: 0.95;
}

/* インデックス表示オーバーレイ */
.gym-lightbox-index-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #ffffff;
    font-family: var(--font-en);
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 12px;
}

/* 下部の詳細情報エリア */
.gym-lightbox-details-wrapper {
    width: 90%;
    max-width: 440px; /* カルーセル画像幅と調和する最大幅 */
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px; /* マージンを詰めてはみ出しを防止 */
    gap: 8px;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

/* 統合されたプレミアム振り返りカード（アドバイス・体重・自主メモを一本化） */
.gym-lightbox-reflection-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 12px 18px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 10px 25px rgba(90, 77, 74, 0.05);
    border: 1px solid rgba(90, 77, 74, 0.03);
    font-family: var(--font-jp);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 測定データカプセル (互換性維持のため残しつつ、マージン等を最適化) */
.gym-lightbox-meta-capsule {
    background: #ffffff;
    padding: 8px 20px;
    border-radius: 30px;
    display: flex;
    gap: 12px;
    align-items: center;
    box-shadow: 0 8px 20px rgba(90, 77, 74, 0.06);
    border: 1px solid rgba(90, 77, 74, 0.04);
}

.gym-lightbox-badge-icon {
    font-size: 13px;
}

.gym-lightbox-meta-capsule .date-label {
    font-family: var(--font-jp);
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.gym-lightbox-meta-capsule .divider {
    color: rgba(90, 77, 74, 0.15);
    font-size: 10px;
}

.gym-lightbox-meta-capsule .weight-label {
    font-family: var(--font-en);
    font-size: 14.5px;
    color: var(--flame-rose);
    font-weight: 800;
}

/* メモカード (互換性維持のため残しつつ、マージン等を最適化) */
.gym-lightbox-memo-card {
    margin-top: 6px;
    background: #ffffff;
    color: var(--text-main);
    font-size: 12px;
    line-height: 1.5;
    padding: 12px 18px;
    border-radius: 16px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 20px rgba(90, 77, 74, 0.05);
    border: 1px solid rgba(90, 77, 74, 0.03);
    font-family: var(--font-jp);
    font-weight: 500;
    position: relative;
}



/* レスポンシブ調整 */
@media (max-width: 600px) {
    .gym-lightbox-close {
        top: 15px;
        right: 15px;
        width: 34px;
        height: 34px;
        font-size: 18px;
    }
    .gym-lightbox-slide {
        flex: 0 0 300px; /* 小画面用も幅を300pxに拡張して大きく表示 */
        margin: 0 10px;
        transform: scale(0.93); /* モバイルでも変形落差を縮小 */
    }
    .gym-lightbox-track {
        padding-left: calc((100% - 300px) / 2 - 10px);
        padding-right: 0;
    }
    .gym-lightbox-track::after {
        flex: 0 0 calc((100% - 300px) / 2 - 10px);
        width: calc((100% - 300px) / 2 - 10px);
    }
}

/* -------------------------------------------------------------
 * 経過写真アップロードモーダル プレミアムリデザイン
 * ------------------------------------------------------------- */
.gym-select-wrapper {
    position: relative;
    width: 100%;
}

.gym-select-wrapper select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid var(--flame-beige);
    background: #ffffff;
    font-family: var(--font-jp);
    font-size: 13.5px;
    color: var(--text-main);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    font-weight: 600;
    cursor: pointer;
}

.gym-select-wrapper::after {
    content: "▼";
    font-size: 9px;
    color: var(--text-muted);
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

/* プレミアム日付入力 */
.gym-input-date-wrapper {
    position: relative;
    width: 100%;
}

.gym-input-date-wrapper input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--flame-beige);
    background: #ffffff;
    font-family: var(--font-en);
    font-size: 14.5px;
    color: var(--text-main);
    outline: none;
    font-weight: 600;
    -webkit-appearance: none;
    appearance: none;
    height: 48px;
}

.gym-input-date-wrapper input[type="date"]:focus {
    border-color: var(--flame-rose);
    box-shadow: 0 0 0 3px rgba(227, 166, 169, 0.12);
}

/* 体重プラスマイナスアジャスター */
.gym-weight-adjust-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--flame-beige);
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    height: 48px;
    box-sizing: border-box;
    margin-top: 5px;
}

.gym-weight-adjust-wrap:focus-within {
    border-color: var(--flame-rose);
    box-shadow: 0 0 0 3px rgba(227, 166, 169, 0.12);
}

.gym-weight-adjust-btn {
    width: 40px;
    height: 100%;
    border: none;
    background: rgba(90, 77, 74, 0.02);
    color: var(--text-main);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

.gym-weight-adjust-btn:active {
    background: rgba(227, 166, 169, 0.15);
    color: var(--flame-rose);
}

.gym-weight-adjust-wrap input[type="number"] {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none !important;
    padding: 0 4px !important;
    text-align: center;
    font-family: var(--font-en);
    font-size: 16px;
    font-weight: 700;
    color: var(--flame-rose);
    outline: none;
    background: transparent;
    -webkit-appearance: none;
    margin: 0;
    -moz-appearance: textfield;
}

.gym-weight-adjust-wrap input[type="number"]::-webkit-outer-spin-button,
.gym-weight-adjust-wrap input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* メモ欄 */
#gym-photo-upload-modal textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--flame-beige);
    background: #ffffff;
    font-family: var(--font-jp);
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    resize: none;
    font-weight: 500;
    min-height: 70px;
    margin-top: 5px;
}

#gym-photo-upload-modal textarea:focus {
    border-color: var(--flame-rose);
    box-shadow: 0 0 0 3px rgba(227, 166, 169, 0.12);
}

/* プレミアム画像アップロードゾーン */
.gym-photo-upload-zone {
    width: 100%;
    border: 2px dashed rgba(227, 166, 169, 0.35);
    border-radius: 20px;
    background: rgba(255, 253, 253, 0.6);
    cursor: pointer;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, background-color 0.25s;
    box-sizing: border-box;
    padding: 10px;
    margin-top: 5px;
}

.gym-photo-upload-zone:hover {
    border-color: var(--flame-rose);
    background-color: rgba(227, 166, 169, 0.03);
}

.upload-zone-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.upload-zone-prompt .upload-icon {
    font-size: 32px;
    opacity: 0.85;
}

.upload-zone-prompt .upload-text {
    font-family: var(--font-jp);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
}

.upload-zone-preview {
    position: relative;
    width: 90px;
    aspect-ratio: 9 / 16;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 6px 15px rgba(90, 77, 74, 0.15);
    border: 1px solid rgba(90, 77, 74, 0.05);
}

.upload-zone-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.upload-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s;
}

.upload-preview-remove:hover {
    background: rgba(227, 166, 169, 0.95);
}

/* 測定履歴の複数スワイプグラフ */
.gym-chart-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 15px 0 25px;
    margin-top: -10px;
}

.gym-chart-carousel-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    width: 100%;
    padding: 0 4.5%;
    box-sizing: border-box;
}

.gym-chart-carousel-scroll::-webkit-scrollbar {
    display: none;
}

.gym-chart-slide {
    flex: 0 0 91%;
    width: 91%;
    scroll-snap-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    padding: 22px 20px;
    background: #ffffff;
    border: 1px solid var(--flame-beige);
    border-radius: 24px;
    box-shadow: 0 10px 36px rgba(90, 77, 74, 0.04);
    margin: 0 5px;
    
    /* 3Dイージング演出 */
    transform: scale(0.96);
    opacity: 0.85;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.4s;
}

.gym-chart-slide.active {
    transform: scale(1.0);
    opacity: 1;
    box-shadow: 0 12px 40px rgba(90, 77, 74, 0.07);
}

.gym-chart-canvas-wrap {
    position: relative;
    width: 100%;
    height: 306px;
}

.gym-chart-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
}

.gym-chart-carousel-dots .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(90, 77, 74, 0.15);
    transition: background 0.25s, width 0.25s;
}

.gym-chart-carousel-dots .dot.active {
    background: var(--flame-rose);
    width: 14px;
    border-radius: 3px;
}

/* カルーセルスライド内の数値テーブル装飾 */
.gym-slide-metric-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    text-align: center;
    margin-bottom: 12px;
    background: rgba(227, 166, 169, 0.08);
    padding: 6px 12px;
    border-radius: 10px;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    position: relative;
}

.gym-slide-table-wrap {
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--flame-beige);
    border-radius: 18px;
    padding: 10px 14px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(90, 77, 74, 0.03);
}

.gym-slide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.gym-slide-table th {
    padding: 8px 4px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 2px solid rgba(90, 77, 74, 0.06);
    font-size: 11px;
    text-align: center !important;
}

.gym-slide-table td {
    padding: 10px 4px;
    border-bottom: 1px solid rgba(90, 77, 74, 0.03);
    color: var(--text-main);
    text-align: center !important;
}

/* チェックイン修正ボタンホバーエフェクト */
#gym-btn-edit-checkin:hover {
    color: #3d9e6a !important;
    background: rgba(92, 186, 137, 0.08) !important;
}
#gym-btn-edit-checkin:active {
    opacity: 0.8;
}

/* iOSのSafari等でインプットフォーカス時に自動ズームするのを防止 */
.gym-app-container input[type="text"],
.gym-app-container input[type="number"],
.gym-app-container input[type="password"],
.gym-app-container input[type="tel"],
.gym-app-container input[type="date"],
.gym-app-container select,
.gym-app-container textarea {
    font-size: 16px !important;
}
