* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ffeef5 0%, #e8f5ff 100%);
    min-height: 100vh;
    color: #5a5a5a;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.header h1 {
    color: #ff69b4;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.nav a {
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    cursor: pointer;
}

.nav a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-container {
    max-width: 400px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ff69b4;
    font-weight: bold;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ffe4e1;
    border-radius: 15px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #ff69b4;
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

.btn {
    background: linear-gradient(45deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.btn:active {
    transform: translateY(0px);
    transition: all 0.05s ease;
}

/* ダッシュボード */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.dashboard-card {
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    color: white;
}

.dashboard-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.dashboard-card p {
    margin-bottom: 20px;
}

.dashboard-card .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* ビュータブ */
.view-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.view-tab {
    padding: 12px 24px;
    background: white;
    border: 2px solid #ffe4e1;
    border-radius: 25px;
    text-decoration: none;
    color: #ff69b4;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
}

.view-tab:hover, .view-tab.active {
    background: #ff69b4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
}

/* カレンダー */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.3);
}

.calendar-nav {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
}

.calendar-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.calendar-header-day {
    background: linear-gradient(135deg, #87ceeb, #add8e6);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.calendar-day {
    background: white;
    min-height: 120px;
    padding: 10px;
    position: relative;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.calendar-day:hover {
    background: #ffeef5;
}

.calendar-day.other-month {
    background: #f8f9fa;
    color: #999;
}

.calendar-day.today {
    background: linear-gradient(135deg, #ffb6c1, #ffc0cb);
    color: white;
    font-weight: bold;
}

.day-number {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
}

.event-item {
    background: linear-gradient(135deg, #dda0dd, #da70d6);
    color: white;
    padding: 4px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 3px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 2px 8px rgba(221, 160, 221, 0.3);
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

.event-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(221, 160, 221, 0.4);
}

.event-item:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(221, 160, 221, 0.5);
}

.event-item.private {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
}

.event-item.public {
    background: linear-gradient(135deg, #98fb98, #90ee90);
}

/* ユーザー別色分け */
.event-item.user-nana {
    background: linear-gradient(135deg, #ff69b4, #ff1493) !important;
    border-left: 4px solid #ff1493;
}

.event-item.user-shinya {
    background: linear-gradient(135deg, #2196F3, #1976D2) !important;
    border-left: 4px solid #1976D2;
}

/* 週表示 */
.week-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #87ceeb, #add8e6);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 25px rgba(135, 206, 235, 0.3);
}

.week-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 2px;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.time-slot {
    background: linear-gradient(135deg, #dda0dd, #da70d6);
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.day-header {
    background: linear-gradient(135deg, #98fb98, #90ee90);
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: bold;
}

.day-header.today {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
}

.time-cell {
    background: white;
    min-height: 60px;
    padding: 5px;
    position: relative;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.time-cell:hover {
    background: #ffeef5;
}

.event-block {
    background: linear-gradient(135deg, #ffb6c1, #ffc0cb);
    color: white;
    padding: 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-bottom: 2px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 182, 193, 0.3);
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.event-block:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 182, 193, 0.4);
}

.event-block:active {
    transform: scale(0.95);
    box-shadow: 0 2px 6px rgba(255, 182, 193, 0.5);
}

.event-block.private {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
}

.event-block.public {
    background: linear-gradient(135deg, #98fb98, #90ee90);
}

.event-block.user-nana {
    background: linear-gradient(135deg, #ff69b4, #ff1493) !important;
    border-left: 4px solid #ff1493;
}

.event-block.user-shinya {
    background: linear-gradient(135deg, #2196F3, #1976D2) !important;
    border-left: 4px solid #1976D2;
}

/* 日表示 */
.day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #98fb98, #90ee90);
    border-radius: 20px;
    color: white;
    box-shadow: 0 8px 25px rgba(152, 251, 152, 0.3);
}

.day-schedule {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hour-slot {
    display: flex;
    border-bottom: 1px solid #eee;
    min-height: 60px;
}

.hour-label {
    background: linear-gradient(135deg, #dda0dd, #da70d6);
    color: white;
    padding: 20px;
    width: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

.hour-content {
    flex: 1;
    padding: 10px;
    background: white;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.hour-content:hover {
    background: #ffeef5;
}

.event-card {
    background: linear-gradient(135deg, #ffb6c1, #ffc0cb);
    color: white;
    padding: 12px;
    border-radius: 15px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 182, 193, 0.3);
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 182, 193, 0.4);
}

.event-card:active {
    transform: scale(0.95);
    box-shadow: 0 3px 10px rgba(255, 182, 193, 0.5);
}

.event-card.private {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
}

.event-card.public {
    background: linear-gradient(135deg, #98fb98, #90ee90);
}

.event-card.user-nana {
    background: linear-gradient(135deg, #ff69b4, #ff1493) !important;
    border-left: 4px solid #ff1493;
}

.event-card.user-shinya {
    background: linear-gradient(135deg, #2196F3, #1976D2) !important;
    border-left: 4px solid #1976D2;
}

.event-title {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 4px;
}

.event-time {
    font-size: 12px;
    opacity: 0.9;
}

.event-description {
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.9;
}

/* モーダル */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow: auto;
}

.modal-content {
    background: white;
    border-radius: 25px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    min-width: 300px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    max-height: 85vh;
    overflow-y: auto;
    margin: 20px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #ff69b4;
}

/* イベントメニュー */
.event-menu {
    position: fixed;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    padding: 10px;
    z-index: 9999;
    border: 2px solid #ffe4e1;
    min-width: 150px;
    touch-action: manipulation;
}

.event-menu-item {
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 10px;
    margin: 2px 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    text-decoration: none;
    color: #333;
}

.event-menu-item:hover {
    background: #ffeef5;
    transform: translateX(5px);
}

.event-menu-item.view {
    color: #87ceeb;
}

.event-menu-item.edit {
    color: #98fb98;
}

.event-menu-item.delete {
    color: #ff69b4;
}

/* フローティングアクションボタン */
.floating-action-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.floating-action-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.4);
    transition: all 0.1s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.floating-action-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 12px 35px rgba(255, 105, 180, 0.6);
}

.floating-action-btn:active {
    transform: scale(0.95);
}

.action-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    padding: 15px;
    min-width: 200px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: menuSlideUp 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes menuSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.action-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    border: none;
    background: transparent;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.1s ease;
    width: 100%;
    touch-action: manipulation;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    margin-bottom: 8px;
    font-size: 16px;
    touch-action: manipulation;
}

.action-menu-item:last-child {
    margin-bottom: 0;
}

.action-menu-item:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffeef5, #f0f8ff);
    transform: translateX(5px);
}

.action-menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    background: transparent !important;
}

.action-menu-item.new-action:hover:not(:disabled) {
    background: linear-gradient(135deg, #e8f5e8, #f0fff0);
    color: #4CAF50;
}

.action-menu-item.edit-action:hover:not(:disabled) {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    color: #2196F3;
}

.action-menu-item.delete-action:hover:not(:disabled) {
    background: linear-gradient(135deg, #ffebee, #fff5f5);
    color: #f44336;
}

.action-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.action-text {
    font-weight: 600;
    color: #333;
}

.action-menu-item:disabled .action-text {
    color: #999;
}

/* イベント専用ポップアップメニュー */
.event-popup-menu {
    position: fixed;
    background: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    min-width: 220px;
    opacity: 0;
    transform: scale(0.8) translateY(10px);
    transition: all 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: 1px solid rgba(255, 105, 180, 0.2);
}

.event-popup-menu.show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.event-popup-menu.hide {
    opacity: 0;
    transform: scale(0.8) translateY(10px);
}

.event-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #ff69b4, #ff1493);
    color: white;
    border-radius: 15px 15px 0 0;
    font-size: 0; /* 余計なテキストノードを非表示 */
}

.event-popup-header > * {
    font-size: 16px; /* 子要素のフォントサイズを復元 */
}

.event-popup-header.user-nana {
    background: linear-gradient(135deg, #ff69b4, #ff1493);
}

.event-popup-header.user-shinya {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.event-popup-title {
    font-weight: bold;
    font-size: 16px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.event-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.event-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.event-popup-actions {
    padding: 10px;
}

.event-popup-action {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border: none;
    background: transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    margin-bottom: 5px;
    font-size: 15px;
    touch-action: manipulation;
}

.event-popup-action:last-child {
    margin-bottom: 0;
}

.event-popup-action:hover {
    transform: translateX(5px);
}

.event-popup-action.view-action:hover {
    background: linear-gradient(135deg, #e3f2fd, #f0f8ff);
    color: #2196F3;
}

.event-popup-action.edit-action:hover {
    background: linear-gradient(135deg, #e8f5e8, #f0fff0);
    color: #4CAF50;
}

.event-popup-action.delete-action:hover {
    background: linear-gradient(135deg, #ffebee, #fff5f5);
    color: #f44336;
}

/* ローディングスケルトン */
.loading-skeleton {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading-header {
    height: 60px;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    border-radius: 15px;
    margin-bottom: 20px;
}

.loading-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    padding: 10px;
}

.loading-day-cell {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    height: 80px;
    border-radius: 8px;
}

.loading-week-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 2px;
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    padding: 10px;
}

.loading-time-column, .loading-day-column {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.loading-time-slot, .loading-time-cell {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    height: 40px;
    border-radius: 4px;
}

.loading-content {
    background: linear-gradient(135deg, #f5f5f5, #e8e8e8);
    height: 400px;
    border-radius: 15px;
}

.selected-event-info {
    position: fixed;
    bottom: 20px;
    right: 90px;
    background: rgba(255, 105, 180, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    max-width: 200px;
    word-break: break-word;
    box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
    z-index: 50;
}

/* イベント選択ハイライト */
.event-item.selected,
.event-block.selected,
.event-card.selected,
.event-list-item.selected {
    border: 3px solid #ff69b4 !important;
    box-shadow: 0 0 15px rgba(255, 105, 180, 0.6) !important;
    transform: scale(1.05) !important;
}

/* リスト表示 */
.event-list {
    max-width: 800px;
    margin: 0 auto;
}

.event-list-item {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    user-select: none;
}

.event-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.event-list-item:active {
    transform: scale(0.98);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.event-list-title {
    font-size: 18px;
    font-weight: bold;
    color: #ff69b4;
    margin-bottom: 10px;
}

.event-list-time {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.event-list-description {
    color: #888;
    font-size: 14px;
}

/* メッセージ */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 15px;
    z-index: 2000;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.message.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .nav {
        gap: 10px;
    }
    
    .nav a {
        padding: 10px 18px;
        font-size: 14px;
    }
    
    .content {
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        margin-top: 20px !important;
    }
    
    .dashboard-card {
        padding: 20px !important;
    }
    
    .dashboard-card h3 {
        font-size: 20px !important;
        margin-bottom: 10px !important;
    }
    
    .dashboard-card p {
        margin-bottom: 15px !important;
    }
    
    .calendar-header {
        padding: 15px;
        margin-bottom: 20px;
    }
    
    .calendar-header h2 {
        font-size: 1.4em;
    }
    
    .calendar-nav {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 5px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .event-item {
        font-size: 10px;
        padding: 2px 6px;
    }
    
    .view-tabs {
        gap: 5px;
        margin-bottom: 20px;
    }
    
    .view-tab {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .event-menu {
        min-width: 200px;
    }
    
    .event-menu-item {
        padding: 18px 25px;
        font-size: 18px;
        min-height: 50px;
        touch-action: manipulation;
    }
    
    /* モバイルでのイベントタッチ改善 */
    .event-item {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .event-block {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .event-card {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .event-list-item {
        cursor: pointer;
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .event-menu {
        touch-action: manipulation;
        min-width: 200px;
    }
    
    /* モバイル向けフローティングアクションボタン */
    .floating-action-container {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-action-btn {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    .action-menu {
        bottom: 70px;
        right: 0;
        min-width: 180px;
        padding: 10px;
    }
    
    .action-menu-item {
        padding: 12px 16px;
        font-size: 14px;
        gap: 12px;
        margin-bottom: 6px;
        min-height: 44px; /* タッチ対応の最小サイズ */
    }
    
    .action-icon {
        font-size: 18px;
        width: 20px;
    }
    
    .selected-event-info {
        position: fixed;
        bottom: 20px;
        right: 90px;
        background: rgba(255, 105, 180, 0.9);
        color: white;
        padding: 8px 12px;
        border-radius: 20px;
        font-size: 12px;
        max-width: 200px;
        word-break: break-word;
        box-shadow: 0 4px 15px rgba(255, 105, 180, 0.3);
        z-index: 50;
    }
    
    .week-grid {
        grid-template-columns: 60px repeat(7, 1fr);
        gap: 1px;
    }
    
    .time-slot {
        padding: 8px 4px;
        font-size: 10px;
    }
    
    .day-header {
        padding: 10px 4px;
        font-size: 12px;
    }
    
    .time-cell {
        min-height: 50px;
        padding: 2px;
    }
    
    .event-block {
        font-size: 10px;
        padding: 4px;
    }
    
    .hour-slot {
        min-height: 50px;
    }
    
    .hour-label {
        width: 60px;
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .hour-content {
        padding: 5px;
    }
    
    .event-card {
        padding: 8px;
        margin-bottom: 6px;
    }
    
    .event-title {
        font-size: 12px;
    }
    
    .event-time {
        font-size: 10px;
    }
    
    .event-description {
        font-size: 10px;
    }
    
    /* モバイル向けモーダル調整 */
    .modal-content {
        width: 95%;
        min-width: 280px;
        max-width: 400px;
        padding: 20px;
        margin: 10px;
        max-height: 90vh;
    }
    
    .modal h2 {
        font-size: 1.2em;
        margin-bottom: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px; /* iOS自動ズーム防止 */
        padding: 12px;
    }
}