:root {
    /* 公式サイト website/css/style.css 完全準拠トークン（案B：ライト・エディトリアル） */
    --love-theme: #c15e72;
    --love-theme-light: #d87a8c;
    --love-theme-dark: #a04a5c;
    --love-theme-deep: #3d262c;
    --love-theme-deep-card: #4d3138;

    /* Surface Colors */
    --surface-white: #ffffff;
    --surface-blush: #f6eeec;
    --surface-blush-soft: #fbf6f5;
    --surface-warm-gray: #f5efed;
    --surface-predicted: #f5e9e2;
    --surface-border: #eadedd;
    --surface-border-subtle: #efe6e4;

    /* Icon / Data Accent Colors */
    --sex-icon-color: #f47891;
    --period-icon-color: #e7bb9f;
    --period-predicted-color: #d4c4b8;
    --premium-gold: #d4a634;

    /* Text Colors */
    --text-heading: #362529;
    --text-default: #362529;
    --text-body: #484645;
    --text-calendar: #362529;
    --text-calendar-muted: #d4c4b8;
    --text-gray: #756b6a;

    /* Typography */
    --font-en: "Jost", -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ja: "Plus Jakarta Sans", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Shadows */
    --shadow-card: 0 8px 28px rgba(61, 38, 44, 0.06);
    --shadow-card-hover: 0 12px 36px rgba(193, 94, 114, 0.12);
    --shadow-cell: 0 2px 8px rgba(61, 38, 44, 0.04);

    /* Legacy Aliases */
    --app-bg: var(--surface-warm-gray);
    --sidebar-bg: var(--surface-warm-gray);
    --calendar-bg-top: var(--surface-blush);
    --calendar-bg-bottom: var(--surface-white);
    --cell-bg: var(--surface-white);
    --panel-gray: var(--surface-blush-soft);
    --panel-gray-alt: var(--surface-blush-soft);
    --panel-pink-tint: var(--surface-blush-soft);
    --item-whitesmoke: var(--surface-blush-soft);
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--surface-warm-gray);
    color: var(--text-body);
    font-family: var(--font-ja);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    min-height: 100dvh;
}

/* デスクトップ 2カラム / モバイル 1画面切替 ワークスペース */
.desktop-workspace {
    display: flex;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    background-color: var(--surface-warm-gray);
}

.calendar-column {
    flex: 0 0 740px;
    max-width: 740px;
    height: 100%;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--surface-blush) 0%, var(--surface-white) 100%);
    border-right: 1px solid var(--surface-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
}

.sidebar-column {
    flex: 1;
    min-width: 340px;
    height: 100%;
    overflow: hidden;
    background-color: var(--surface-warm-gray);
    display: flex;
    flex-direction: column;
}

.sidebar-scroll-content {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.recent-panel-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.recent-events-scroll-card {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    margin-bottom: 0;
}

/* PC用 トップナビゲーション（案B：白背景＋繊細枠線＋濃色アクティブピル #3d262c） */
.win-top-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    gap: 6px;
    background-color: var(--surface-white);
    border-bottom: 1px solid var(--surface-border);
    flex-shrink: 0;
}

.win-nav-items {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.win-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-gray);
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-ja);
    border-radius: 9999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.win-nav-btn:hover {
    background: var(--surface-blush-soft);
    color: var(--love-theme-deep);
}

.win-nav-btn.active {
    background-color: var(--surface-blush);
    color: var(--love-theme-deep);
}

/* カレンダー領域 */
.calendar-top-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 22px 20px 10px 20px;
    position: relative;
}

.calendar-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 9999px;
    background-color: var(--surface-blush);
    border: 1px solid var(--love-theme);
    color: var(--love-theme-deep);
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.calendar-filter-badge:hover {
    background-color: var(--love-theme);
    color: #ffffff;
}

.month-nav-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.month-nav-btn {
    width: 36px;
    height: 36px;
    background: var(--surface-white);
    border: 1px solid var(--surface-border);
    color: var(--text-heading);
    border-radius: 50%;
    padding: 0;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-cell);
    transition: all 0.15s ease;
}

.month-nav-btn:hover {
    border-color: var(--love-theme-deep);
    background: var(--surface-blush-soft);
    transform: translateY(-1px);
}

.month-year-title {
    font-family: var(--font-en), var(--font-ja);
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--text-heading);
    min-width: 190px;
    text-align: center;
}

.calendar-body-wrap {
    padding: 8px 24px 18px 24px;
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

.weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    height: 38px;
    align-items: center;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.weekday-sun {
    color: var(--love-theme);
    font-weight: 700;
}

.weekday-sat {
    color: #7a9e9f;
    font-weight: 700;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    justify-items: center;
}

/* 円形の日付セル */
.day-circle {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background-color: var(--surface-white);
    border: 1px solid var(--surface-border-subtle);
    box-shadow: var(--shadow-cell);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 9px;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.day-circle:hover {
    border-color: var(--love-theme);
    transform: translateY(-1px);
    box-shadow: var(--shadow-card-hover);
}

.day-circle.is-today {
    border: 2px solid var(--love-theme-deep);
    background-color: var(--surface-white);
}

.day-circle.is-today .day-circle-num {
    color: var(--love-theme);
    font-weight: 700;
}

.day-circle.other-month {
    background-color: transparent;
    border-color: transparent;
    box-shadow: none;
}

.day-circle-num {
    font-family: var(--font-en);
    font-size: 20px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--text-heading);
    margin-bottom: 3px;
}

.day-circle.has-events .day-circle-num {
    color: var(--text-heading);
}

.day-circle.other-month .day-circle-num {
    color: var(--text-calendar-muted);
}

.day-icons-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 32px;
}

.day-event-icon {
    flex-shrink: 0;
}

.day-event-icon-1 {
    width: 30px;
    height: 30px;
}

.day-event-icon-2 {
    width: 24px;
    height: 24px;
}

.day-event-icon-3 {
    width: 19px;
    height: 19px;
}

.day-event-icon-4 {
    width: 15px;
    height: 15px;
}

.day-more-dots {
    font-size: 10px;
    line-height: 1;
    color: var(--text-gray);
    margin-top: -2px;
}

/* PC用 カレンダー下部クイック追加フッター */
.calendar-footer-bar {
    background: var(--surface-white);
    border-top: 1px solid var(--surface-border);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
    overflow: visible;
}

.calendar-footer-date {
    width: 132px;
    flex-shrink: 0;
}

@media (max-width: 1240px) {
    .calendar-footer-bar {
        padding: 12px 10px;
        gap: 6px;
    }

    .calendar-footer-date {
        width: 122px;
    }

    .calendar-footer-bar .quick-circle-btn {
        width: 40px;
        height: 40px;
    }

    .calendar-footer-bar .quick-circle-btn svg {
        width: 20px;
        height: 20px;
    }

    .calendar-footer-bar .partner-select-wrap {
        width: 118px !important;
    }
}

/* スマホ専用エリア（PC非表示） */
.mobile-today-quickadd {
    display: none;
}

.mobile-bottom-tabbar {
    display: none;
}

/* 公式サイト .btn-outline-pill 準拠のリンク・ピルボタン */
.today-link-btn {
    background: var(--surface-white);
    border: 1px solid var(--text-heading);
    color: var(--text-heading);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-ja);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 9999px;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.today-link-btn:hover:not(:disabled) {
    border-color: var(--love-theme);
    color: var(--love-theme);
    background: var(--surface-blush-soft);
}

.today-link-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.quick-circle-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(61, 38, 44, 0.14);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.quick-circle-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.quick-circle-btn:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

/* カード（公式サイト準拠：白背景＋繊細枠線 #eadedd ＋ 柔らかい影＋角丸16px） */
.win-card {
    background: var(--surface-white);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
}

.win-card.win-card-collapsed {
    background: var(--surface-blush-soft);
    box-shadow: none;
}

.win-card.win-card-collapsed .win-card-title {
    color: var(--text-gray);
    opacity: 0.85;
}

.summary-drag-handle {
    background: transparent;
    border: none;
    color: var(--text-gray);
    opacity: 0.65;
    padding: 4px 6px;
    cursor: grab;
    touch-action: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

.summary-drag-handle:hover {
    opacity: 1;
    background-color: rgba(54, 37, 41, 0.05);
}

.summary-drag-handle:active {
    cursor: grabbing;
}

.win-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-heading);
    margin: 0;
    letter-spacing: 0.01em;
}

.win-card-desc {
    font-size: 12.5px;
    color: var(--text-gray);
    margin: 3px 0 0 0;
    line-height: 1.5;
}

.win-subpanel,
.win-subpanel-gray,
.win-subpanel-pink {
    background: var(--surface-blush-soft);
    border: 1px solid var(--surface-border-subtle);
    border-radius: 12px;
    padding: 12px 14px;
}

/* プレミアムバッジ（公式サイト --premium-gold #d4a634 固定カプセル形状 20px高） */
.win-premium-badge {
    background-color: var(--premium-gold);
    color: var(--surface-white);
    font-family: var(--font-en), var(--font-ja);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    height: 20px;
    padding: 0 9px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
    flex-shrink: 0;
    vertical-align: middle;
}

/* 全ボタン・インタラクティブ要素のフォーカスリング統一（キーボード操作時のみ表示） */
button:focus-visible,
a:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--love-theme);
    outline-offset: 2px;
}

/* プライマリ・セカンダリボタン（ピル型統一） */
.win-accent-btn {
    background-color: var(--love-theme);
    color: var(--surface-white);
    border: 1px solid var(--love-theme);
    border-radius: 9999px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-ja);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.win-accent-btn:hover:not(:disabled) {
    background-color: var(--love-theme-light);
    border-color: var(--love-theme-light);
}

.win-accent-btn:active:not(:disabled) {
    background-color: var(--love-theme-dark);
    border-color: var(--love-theme-dark);
}

.win-accent-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.win-secondary-btn {
    background-color: var(--surface-white);
    color: var(--text-heading);
    border: 1px solid var(--surface-border);
    border-radius: 9999px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-ja);
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.win-secondary-btn:hover:not(:disabled) {
    border-color: var(--love-theme);
    color: var(--love-theme);
    background-color: var(--surface-blush-soft);
}

.win-secondary-btn:active:not(:disabled) {
    background-color: var(--surface-blush);
}

.win-icon-circle-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: var(--love-theme-deep);
    border: none;
    color: var(--surface-white);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, filter 0.15s ease, transform 0.12s ease;
}

.win-icon-circle-btn:hover {
    background-color: #52363e;
    transform: translateY(-1px);
}

.win-icon-circle-btn:active {
    background-color: #2a191e;
    transform: translateY(0);
}

/* ピルトグル（ON時は濃色 #3d262c でメリハリをつける） */
.win-pill-toggle {
    background-color: #d8cecc;
    color: var(--surface-white);
    border: none;
    border-radius: 9999px;
    min-width: 72px;
    height: 30px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: var(--font-en), var(--font-ja);
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.win-pill-toggle:hover:not(:disabled) {
    background-color: #c5b9b6;
}

.win-pill-toggle.checked {
    background-color: var(--love-theme-deep);
}

.win-pill-toggle.checked:hover:not(:disabled) {
    background-color: #52363e;
}

.win-pill-toggle:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.win-record-circle-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background-color: #d8cecc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.win-record-circle-toggle:hover {
    background-color: #c5b9b6;
    transform: translateY(-1px);
}

.win-record-circle-toggle.checked {
    background-color: var(--love-theme);
    box-shadow: 0 4px 12px rgba(193, 94, 114, 0.25);
}

.win-record-circle-toggle.checked:hover {
    background-color: var(--love-theme-light);
    transform: translateY(-1px);
}

/* 履歴フィルター用コンパクト円形アイコントグル */
.win-filter-icon-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background-color: #d8cecc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease;
}

.win-filter-icon-toggle:hover {
    background-color: #c5b9b6;
}

.win-filter-icon-toggle.checked {
    background-color: var(--love-theme);
}

.win-filter-icon-toggle.checked:hover {
    background-color: var(--love-theme-light);
}

.win-filter-partner-toggle {
    min-width: 0;
    height: 28px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* イベントリスト明細 */
.win-event-item {
    background-color: var(--surface-blush-soft);
    border: 1px solid var(--surface-border-subtle);
    padding: 10px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.win-event-item:hover {
    border-color: var(--surface-border);
    background-color: var(--surface-blush);
}

/* ダイアログ / ボトムシート */
.win-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(61, 38, 44, 0.45);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
}

.win-dialog-box {
    background: var(--surface-white);
    border: 1px solid var(--surface-border);
    border-radius: 20px;
    width: 100%;
    max-width: 460px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(61, 38, 44, 0.22);
}

.win-dialog-box.dialog-overflow-visible {
    overflow: visible;
}

.win-dialog-title {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-heading);
    text-align: center;
    margin: 0 0 18px 0;
}

.bottomsheet-quickadd-section {
    border-top: 1px solid var(--surface-border-subtle);
    padding-top: 14px;
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.win-type-circle-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--surface-white);
    border: 2px solid var(--surface-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s ease;
}

.win-type-circle-btn.selected {
    border-color: var(--love-theme-deep);
    border-width: 2.5px;
    background: var(--surface-blush-soft);
    box-shadow: 0 4px 12px rgba(61, 38, 44, 0.12);
}

.win-input, .win-select, .win-textarea {
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13.5px;
    color: var(--text-heading);
    background: var(--surface-white);
    font-family: inherit;
    transition: border-color 0.15s ease;
}

/* カラー飾丸付きパートナー選択プルダウン */
.partner-select-backdrop {
    position: fixed;
    inset: 0;
    z-index: 140;
}

.partner-select-wrap {
    position: relative;
    display: inline-block;
}

.partner-select-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 8px 10px 8px 12px;
    font-size: 13.5px;
    color: var(--text-heading);
    background: var(--surface-white);
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    text-align: left;
}

.partner-select-trigger.compact {
    padding: 5px 8px 5px 10px;
    font-size: 13px;
}

.partner-select-trigger:hover,
.partner-select-trigger.open {
    border-color: var(--love-theme);
}

.partner-select-value {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
    flex: 1;
}

.partner-select-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.partner-select-label.placeholder {
    color: var(--text-gray);
}

.partner-select-chevron {
    color: var(--text-gray);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.partner-select-trigger.open .partner-select-chevron {
    transform: rotate(180deg);
}

.partner-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.partner-dot-outline {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 1.5px solid var(--surface-border);
    display: inline-block;
    flex-shrink: 0;
}

.partner-select-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    min-width: 100%;
    max-height: min(240px, 42dvh);
    overflow-y: auto;
    background: var(--surface-white);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(61, 38, 44, 0.14);
    padding: 4px;
    z-index: 150;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.partner-select-menu.upward {
    top: auto;
    bottom: calc(100% + 4px);
}

.partner-select-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-heading);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: background-color 0.12s ease;
}

.partner-select-option:hover {
    background-color: var(--surface-blush-soft);
}

.partner-select-option.selected {
    background-color: var(--surface-blush);
    font-weight: 600;
}

.win-input:focus, .win-select:focus, .win-textarea:focus {
    outline: none;
    border-color: var(--love-theme-deep);
}

input[type="range"].win-slider {
    width: 100%;
    accent-color: var(--love-theme-deep);
    cursor: pointer;
}

/* =========================================================================
   スマホ・縦画面レイアウト (<= 900px: 案B ライト・エディトリアル + 下部タブバー)
   ========================================================================= */
@media (max-width: 900px) {
    .desktop-workspace {
        flex-direction: column;
        height: auto;
        min-height: 100dvh;
        overflow: visible;
        padding-bottom: calc(66px + env(safe-area-inset-bottom));
    }

    .sidebar-column {
        height: auto;
        overflow: visible;
        min-width: 0;
        width: 100%;
        padding: 0;
        flex: 1;
    }

    .sidebar-scroll-content {
        overflow-y: visible;
        padding: 12px;
    }

    .recent-events-scroll-card {
        overflow-y: visible;
    }

    .mobile-hidden {
        display: none !important;
    }

    .pc-only-sidebar-toggle {
        display: none !important;
    }

    .win-top-nav {
        display: none !important;
    }

    .calendar-column {
        flex: 1;
        max-width: 100%;
        width: 100%;
        height: auto;
        min-height: calc(100dvh - 66px - env(safe-area-inset-bottom));
        border-right: none;
        padding: 8px 12px 12px 12px;
        justify-content: flex-start;
    }

    .calendar-top-bar {
        padding: 10px 4px 8px 4px;
    }

    .month-nav-group {
        width: 100%;
        justify-content: space-between;
    }

    .month-year-title {
        font-size: 20px;
        color: var(--text-heading);
        min-width: 0;
    }

    .month-nav-btn {
        background: var(--surface-white);
        border: 1px solid var(--surface-border);
        color: var(--text-heading);
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .calendar-body-wrap {
        padding: 0;
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .weekday-row {
        height: 32px;
        font-size: 12px;
        margin-bottom: 4px;
    }

    .days-grid {
        gap: 5px;
    }

    .day-circle {
        width: 12.2vw;
        height: 12.2vw;
        max-width: 56px;
        max-height: 56px;
        min-width: 42px;
        min-height: 42px;
        padding-top: 5px;
    }

    .day-circle-num {
        font-size: 14px;
        margin-bottom: 1px;
    }

    .day-icons-row {
        min-height: 18px;
        gap: 1px;
    }

    .day-event-icon-1 {
        width: 18px;
        height: 18px;
    }

    .day-event-icon-2 {
        width: 16px;
        height: 16px;
    }

    .day-event-icon-3 {
        width: 14px;
        height: 14px;
    }

    .day-event-icon-4 {
        width: 12px;
        height: 12px;
    }

    .calendar-footer-bar {
        display: none !important;
    }

    .mobile-today-quickadd {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin-top: auto;
        padding: 12px 0 4px 0;
    }

    .mobile-today-label {
        font-size: 12px;
        font-weight: 700;
        color: var(--text-heading);
        letter-spacing: 0.03em;
    }

    .mobile-today-buttons {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .mobile-quick-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        border: none;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        box-shadow: 0 4px 12px rgba(61, 38, 44, 0.14);
    }

    .mobile-view-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
        background: var(--surface-white);
        border-bottom: 1px solid var(--surface-border);
    }

    .mobile-view-title {
        font-size: 17px;
        font-weight: 700;
        color: var(--text-heading);
        margin: 0;
    }

    /* スマホ用 下部固定タブバー（案B：白背景＋#eadedd境界線＋#f6eeecピル＆#3d262cアクティブ） */
    .mobile-bottom-tabbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(64px + env(safe-area-inset-bottom));
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(8px);
        border-top: 1px solid var(--surface-border);
        box-shadow: 0 -4px 20px rgba(61, 38, 44, 0.05);
        z-index: 150;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-tab-btn {
        flex: 1;
        height: 100%;
        background: transparent;
        border: none;
        color: #9c8f8e;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        font-size: 11px;
        font-weight: 600;
        font-family: var(--font-ja);
        cursor: pointer;
        padding: 6px 0;
        transition: color 0.15s ease;
    }

    .mobile-tab-btn svg {
        background: transparent;
        border-radius: 9999px;
        padding: 3px 12px;
        width: 44px;
        height: 26px;
        box-sizing: border-box;
        transition: background-color 0.15s ease;
    }

    .mobile-tab-btn.active {
        color: var(--love-theme-deep);
    }

    .mobile-tab-btn.active svg {
        background: var(--surface-blush);
    }

    /* スマホ時のボトムシート */
    .win-dialog-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .win-dialog-box {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--surface-border);
        padding: 18px 18px calc(22px + env(safe-area-inset-bottom)) 18px;
        max-height: 85dvh;
        animation: slideUpSheet 0.18s ease-out;
    }
}

@keyframes slideUpSheet {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes spin360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spin-icon {
    animation: spin360 0.9s linear infinite;
}
