/*
========================================
ぽちっと - デザイナー向けフィードバックツール
統合スタイルシート
========================================
*/

/* ===========================================
   ベーススタイル & リセット
=========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #FAFAFA;
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
}

/* ===========================================
   共通コンポーネント
=========================================== */

/* ボタン */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    user-select: none;
    outline: none;
}

.btn:hover {
    opacity: 0.85;
}

.btn:active {
    opacity: 0.7;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #4FAA00;
    color: white;
    border-color: #4FAA00;
}

.btn-primary:hover {
    background: #3D8800;
}

.btn-secondary {
    background: #2C2C2C;
    color: #fff;
    border-color: #2C2C2C;
}

.btn-secondary:hover {
    background: #1A1A1A;
}

.btn-outline {
    background: transparent;
    color: #4FAA00;
    border-color: #4FAA00;
}

.btn-outline:hover {
    background: #4FAA00;
    color: white;
}

.btn-danger {
    background: #E74C3C;
    color: white;
    border-color: #E74C3C;
}

.btn-danger:hover {
    background: #C0392B;
}

.btn-small {
    padding: 4px 12px;
    font-size: 12px;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.btn-icon-only {
    width: 40px;
    height: 40px;
    padding: 6px;
}

.btn-link {
    background: none;
    border: none;
    color: #4FAA00;
    text-decoration: underline;
    padding: 0;
    font-size: inherit;
    cursor: pointer;
}

.btn-link:hover {
    color: #3D8800;
}

/* フォーム要素 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2C2C2C;
    font-size: 14px;
}

/* 基本的なinputスタイル */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
select,
.form-input,
.search-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #D6D6D6;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
    font-family: inherit;
    line-height: 1.5;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
select:focus,
.form-input:focus,
.search-input:focus {
    outline: none;
    border-color: #4FAA00;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="search"]::placeholder,
.form-input::placeholder,
.search-input::placeholder {
    color: #999999;
}

/* iOS Safari向けの日付フィールド横幅修正 */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box !important;
    height: 42px;
    min-height: 42px;
}

/* iOS Safariの日付ピッカーアイコン調整 */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    width: 20px;
    height: 20px;
    cursor: pointer;
    opacity: 0.6;
    margin-left: 4px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover,
input[type="week"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* 日付の値表示部分の調整 */
input[type="date"]::-webkit-date-and-time-value,
input[type="time"]::-webkit-date-and-time-value,
input[type="datetime-local"]::-webkit-date-and-time-value,
input[type="month"]::-webkit-date-and-time-value,
input[type="week"]::-webkit-date-and-time-value {
    text-align: left;
    padding: 0;
}

/* 無効化されたinput */
input:disabled,
select:disabled,
.form-input:disabled {
    background-color: #F5F5F5;
    color: #666666;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ファイル入力 */
input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 2px solid #D6D6D6;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    transition: all 0.2s ease;
}

input[type="file"]:focus {
    outline: none;
    border-color: #4FAA00;
}

/* チェックボックスとラジオボタン */
input[type="checkbox"],
input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: #4FAA00;
}

/* テキストエリア */
textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 2px solid #D6D6D6;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
}

textarea:focus {
    outline: none;
    border-color: #4FAA00;
}

/* アラート・メッセージ */
.alert,
.message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.5;
    border: 2px solid;
}

.alert-success,
.message.success {
    background: #E8F5E9;
    color: #2E7D32;
    border-color: #4FAA00;
}

.alert-error,
.message.error {
    background: #FFEBEE;
    color: #C62828;
    border-color: #E74C3C;
}

.alert-warning {
    background: #FFF9E6;
    color: #F57C00;
    border-color: #FFC107;
}

.alert-info {
    background: #E3F2FD;
    color: #1565C0;
    border-color: #2196F3;
}

/* モーダル共通スタイル */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 8px;
    border: 2px solid #D6D6D6;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid #E0E0E0;
    background: #F9F9F9;
    position: relative;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
}

.close-modal {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    position: absolute;
    top: calc(50% - 20px);
    right: 20px;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-modal:hover {
    color: #2C2C2C;
    background: #E0E0E0;
}

.modal-body {
    padding: 40px;
}

/* 共通レイアウト */
main.container {
    margin-top: 50px;
}

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

.header {
    background: white;
    border-bottom: 2px solid #E0E0E0;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.page-title {
    margin-bottom: 32px;
}

.page-title h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2C2C2C;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .page-title h1 {
        font-size: 18px;
    }
}

.page-title p {
    font-size: 14px;
    color: #666666;
}

/* エンプティステート */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666666;
}

.empty-state-icon {
    font-size: 48px;
    color: #CCCCCC;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2C2C2C;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
}

/* ===========================================
   ダッシュボードページ（dashboard.php）
=========================================== */

/* ダッシュボードヘッダー */
.dashboard-header {
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.dashboard-header .header {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-left .logo {
    margin: 0;
}

.header-left .logo img {
    height: 36px;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #FFFFFF;
    border-radius: 4px;
    font-size: 14px;
    color: #4FAA00;
    font-weight: 500;
    line-height: 1.6;
    border: 2px solid #4FAA00;
}

.notification-btn {
    position: relative;
    background: #FFC107;
    color: #2C2C2C;
    border: 2px solid #FFC107;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    line-height: 1.6;
}

.notification-btn:hover {
    background: #FFB300;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E74C3C;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid #fff;
}

.logout-btn {
    background: #2C2C2C;
    color: white;
    border: 2px solid #2C2C2C;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
    line-height: 1.6;
}

.logout-btn:hover {
    background: #E74C3C;
    border-color: #E74C3C;
}

@media (max-width: 768px) {
    .dashboard-header {
        height: 66px;
    }

    .header-right .text {
        display: none;
    }

    .user-info {
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        position: relative;
    }

    .notification-btn {
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .logout-btn {
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* プロジェクト作成セクション */
.create-section {
    background: white;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
    padding: 24px;
    margin-bottom: 32px;
}

.create-section h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2C2C2C;
}

@media (max-width: 768px) {
    .create-section h2 {
        font-size: 16px;
    }
    .create-section{
        padding: 20px 15px;
    }
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* ファイルアップロードエリア */
.upload-area {
    border: 2px dashed #CCCCCC;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #FAFAFA;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: #4FAA00;
    background: #F1F8EC;
}

.upload-icon {
    color: #999999;
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 8px;
}

.upload-description {
    font-size: 14px;
    color: #666666;
    margin-bottom: 16px;
}

.upload-btn {
    background: #4FAA00;
    color: white;
    border: 2px solid #4FAA00;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-btn:hover {
    background: #3D8800;
}

.file-input-hidden {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    display: none;
}

/* ファイルプレビュー */
.file-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.clear-files-btn {
    background: #E74C3C;
    color: white;
    border: 2px solid #E74C3C;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #F5F5F5;
    border-radius: 4px;
    border: 2px solid #E0E0E0;
}

.file-item-icon {
    color: #4FAA00;
    font-size: 18px;
}

.file-item-info {
    flex: 1;
}

.file-item-name {
    font-size: 14px;
    font-weight: 500;
    color: #2C2C2C;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.file-item-size {
    font-size: 12px;
    color: #666666;
}

.file-item-remove {
    background: #E74C3C;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
    border-radius: 4px;
    background: #4FAA00;
    border: 2px solid #4FAA00;
    color: #fff;
    cursor: pointer;
}

.create-btn:hover {
    background: #3D8800;
}

/* プロジェクト一覧セクション */
.projects-section {
    background: white;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
    padding: 24px;
}

.projects-header {
    margin-bottom: 24px;
}

.projects-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(255px, 1fr));
    gap: 20px;
}

.project-card {
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.project-image {
    width: 100%;
    height: auto;
    display: block;
    background: #F5F5F5;
}

.project-info-open {
    display: none;
    transition: all 0.3s ease;
    background: #fff;
    width: calc(100% - 40px - 25px);
    position: absolute;
    top: 5px;
    right: 55px;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
}

.project-info-open .project-name {
    border-bottom: 2px solid #E0E0E0;
    padding: 10px 7px;
}

.project-info-open .project-name .ttl {
    font-size: 14px;
    font-weight: bold;
    color: #2C2C2C;
}

.project-info-open .project-name .date {
    font-size: 12px;
    color: #666666;
}

.project-info-open .project-actions {
    padding: 10px 7px;
}

.project-info-open .project-actions .project-actions-btn {
    font-size: 14px;
    display: block;
    text-decoration: none;
    border: none;
    background: #fff;
    width: 100%;
    text-align: left;
    color: #2C2C2C;
}

.project-info-open .project-actions .project-actions-btn .fa {
    width: 14px;
}

.project-info-open .project-actions .project-actions-btn:hover {
    opacity: 0.7;
}

.project-info-open.open {
    display: block;
}

.project-info-more {
    position: absolute;
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 4px;
    border: 2px solid #E0E0E0;
    top: 5px;
    right: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.project-info-more span {
    width: 4px;
    height: 4px;
    background: #2C2C2C;
    border-radius: 50%;
    margin: 3px;
}

.project-info-more:hover {
    background: #F5F5F5;
}

.project-card .project-image {
    height: 12rem;
    max-height: 12rem;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
}

.project-card-link{
    text-decoration: none;
}

.project-card-link:hover .project-image{
    border-color: #4FAA00;
}

.project-info {
    padding: 10px 0;
}

.project-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 5px;
    color: #2C2C2C;
}

.project-deadline {
    color: #FFC107;
    font-size: 13px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.project-date {
    font-size: 12px;
    color: #666666;
    margin-bottom: 5px;
}

.project-actions {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.project-actions .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* 通知モーダル */
.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.notification-modal.active {
    opacity: 1;
    visibility: visible;
}

.notification-content {
    background: white;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
    width: 90vw;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.notification-modal.active .notification-content {
    transform: scale(1);
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 2px solid #E0E0E0;
    background: #F9F9F9;
    position: relative;
}

.notification-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
}

.close-notification {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 40px;
    height: 40px;
    position: absolute;
    top: calc(50% - 20px);
    right: 20px;
    font-size: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.close-notification:hover {
    color: #2C2C2C;
    background: #E0E0E0;
}

.notification-actions {
    padding: 16px 24px;
    border-bottom: 2px solid #E0E0E0;
    display: flex;
    gap: 12px;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 16px 24px;
    border-bottom: 1px solid #F5F5F5;
    cursor: pointer;
    transition: background 0.2s ease;
}

.notification-item:hover {
    background: #FAFAFA;
}

.notification-item.unread {
    background: #FFF9E6;
    border-left: 4px solid #FFC107;
}

.notification-info {
    display: flex;
    gap: 12px;
}

.notification-icon {
    color: #FFC107;
    font-size: 20px;
    margin-top: 2px;
}

.notification-details {
    flex: 1;
}

.notification-title {
    font-size: 14px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 4px;
}

.notification-text {
    font-size: 13px;
    color: #666666;
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.notification-time {
    font-size: 12px;
    color: #999999;
}

.notification-empty {
    text-align: center;
    padding: 40px 20px;
    color: #666666;
}

.notification-empty h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2C2C2C;
}

/* 複製モーダル */
.duplicate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.duplicate-modal.active {
    opacity: 1;
    visibility: visible;
}

.duplicate-content {
    background: white;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
    width: 90vw;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.duplicate-modal.active .duplicate-content {
    transform: scale(1);
}

.duplicate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    border-bottom: 2px solid #E0E0E0;
    background: #F9F9F9;
}

.duplicate-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-duplicate {
    background: none;
    border: none;
    font-size: 24px;
    color: #666666;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    line-height: 1;
}

.close-duplicate:hover {
    color: #2C2C2C;
    background: #E0E0E0;
}

.duplicate-body {
    padding: 24px;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
}

.project-preview {
    margin-bottom: 24px;
    padding: 16px;
    background: #FAFAFA;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
}

.project-preview h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2C2C2C;
    display: flex;
    align-items: center;
    gap: 8px;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
}

.preview-stat {
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 4px;
    border: 2px solid #E0E0E0;
}

.preview-stat-icon {
    color: #4FAA00;
    font-size: 20px;
    margin-bottom: 8px;
}

.preview-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 4px;
}

.preview-stat-label {
    font-size: 12px;
    color: #666666;
}

.duplicate-options {
    margin-bottom: 24px;
}

.option-card {
    border: 2px solid #E0E0E0;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-card:hover {
    border-color: #4FAA00;
    background: #FAFAFA;
}

.option-card.selected {
    border-color: #4FAA00;
    background: #F1F8EC;
}

.option-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.option-checkbox {
    margin: 0;
}

.option-icon {
    color: #4FAA00;
    font-size: 18px;
}

.option-title {
    font-size: 14px;
    font-weight: 600;
    color: #2C2C2C;
}

.option-description {
    font-size: 13px;
    color: #666666;
    line-height: 1.5;
    margin-left: 40px;
}

.sub-option {
    margin-top: 12px;
    margin-left: 20px;
    padding: 12px;
    background: white;
    border-radius: 4px;
    border: 2px solid #E0E0E0;
}

.name-suffix-input {
    margin-top: 8px;
    margin-left: 40px;
    max-width: 200px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 16px;
    display: none;
}

.progress-fill {
    height: 100%;
    background: #4FAA00;
    transition: width 0.3s ease;
    width: 0%;
}

.status-message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 16px;
    display: none;
    font-size: 14px;
    border: 2px solid;
}

.status-message.success {
    background: #E8F5E9;
    color: #2E7D32;
    border-color: #4FAA00;
}

.status-message.error {
    background: #FFEBEE;
    color: #C62828;
    border-color: #E74C3C;
}

.duplicate-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 2px solid #E0E0E0;
}

.cancel-btn {
    background: #2C2C2C;
    color: #fff;
    border: 2px solid #2C2C2C;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-align: center;
}

.cancel-btn:hover {
    background: #1A1A1A;
}

.duplicate-btn {
    background: #4FAA00;
    color: white;
    border: 2px solid #4FAA00;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.duplicate-btn:hover {
    background: #3D8800;
}

.duplicate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .duplicate-actions {
        display: flex;
        justify-content: center;
        gap: 8px;
    }

    .duplicate-actions .cancel-btn {
        width: 48%;
    }

    .duplicate-actions .duplicate-btn {
        width: 48%;
    }
}

/* ===========================================
   プロジェクト表示ページ（project-view.php）
=========================================== */

/* プロジェクトヘッダー */
.project-header {
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.project-header .header {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-header .header .header-left {
    position: absolute;
    left: 20px;
}

.project-header .header .header-logo img {
    height: 36px;
}

.project-header .header .header-controls {
    position: absolute;
    right: 20px;
}

.project-title {
    margin-left: 20px;
}

@media (max-width: 768px) {
    .project-header {
        height: 66px;
    }

    .project-title {
        font-size: 16px !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 200px;
    }

    .project-deadline-badge {
        display: none;
    }

    .header-controls {
        gap: 8px;
    }

    .header-controls .btn {
        padding: 6px 8px;
        font-size: 12px;
    }

    .btn-icon-only {
        width: 38px;
        height: 38px;
        padding: 4px;
    }
}

.back-btn {
    background: #2C2C2C;
    color: #fff;
    padding: 8px 16px;
    border: 2px solid #2C2C2C;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.back-btn:hover {
    background: #1A1A1A;
}

@media (max-width: 768px) {
    .back-btn{
        width: 40px;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0;
    }
}

.project-title {
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-deadline-badge {
    background: #FFF9E6;
    color: #F57C00;
    padding: 4px 12px;
    border-radius: 4px;
    border: 2px solid #FFC107;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

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

/* メインコンテナ */
.main-container {
    display: flex;
    height: calc(100vh - 80px);
    overflow: hidden;
}

@media (max-width: 768px) {
    .main-container {
        height: calc(100vh - 66px);
        flex-direction: column;
    }
}

.project-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #FAFAFA;
    position: relative;
}

@media (max-width: 768px) {
    .project-container {
        flex: none;
        height: 100%;
        background: #ffffff;
    }
}

/* 画像セクション */
.image-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.image-container {
    flex: 1;
    position: relative;
    overflow: auto;
    background: #F5F5F5;
    display: block;
    cursor: crosshair;
}

.image-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.image-hover-overlay {
    position: fixed;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    pointer-events: none;
    z-index: 5;
}

.image-hover-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
}

@media (hover: none) and (pointer: coarse) {
    .image-container {
        cursor: default;
    }

    .image-hover-overlay {
        display: none !important;
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.project-image {
    width: 100%;
    height: auto;
    display: block;
}

/* コメントピン */
.comment-pin {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    cursor: pointer;
    transform: translate(-50%, -50%);
    z-index: 10;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.comment-pin::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
}

.comment-pin:hover {
    transform: translate(-50%, -50%) scale(1.3);
    z-index: 11;
}

.comment-pin.highlighted {
    transform: translate(-50%, -50%) scale(1.5);
    z-index: 12;
    animation: pinPulse 1s ease-in-out infinite;
}

@keyframes pinPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.comment-pin.status-pending {
    background: #FFC107;
}

.comment-pin.status-resolved {
    background: #4FAA00;
}

.comment-pin.temp-pin {
    background: #2196F3;
    z-index: 15;
}

/* ページナビゲーション */
.page-navigation {
    background: white;
    border-top: 2px solid #E0E0E0;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.page-navigation .page-count {
    font-size: 14px;
    font-weight: bold;
    color: #2C2C2C;
}

@media (max-width: 768px) {
    .page-navigation {
        display: none !important;
    }
}

.page-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #666666;
}

.page-select {
    padding: 4px 8px;
    border: 2px solid #D6D6D6;
    border-radius: 4px;
    font-size: 13px;
}

.page-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-btn {
    color: #2C2C2C;
    border: none;
    padding: 6px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: none;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 統合コメントパネル */
.unified-comments-panel {
    width: 380px;
    background: white;
    border-left: 2px solid #E0E0E0;
    display: flex;
    flex-direction: column;
    position: relative;
}

@media (max-width: 768px) {
    .unified-comments-panel {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        order: 2;
        width: 100%;
        height: 70vh;
        max-height: 70vh;
        border-left: none;
        border-top: 2px solid #E0E0E0;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        display: none;
        overflow: hidden;
    }

    .unified-comments-panel.visible {
        display: flex;
        transform: translateY(0);
    }

    .unified-comments-panel.medium {
        height: 50vh;
    }

    .unified-comments-panel.large {
        height: 80vh;
    }

    .bottom-sheet-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        display: none;
    }

    .bottom-sheet-overlay.visible {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .bottom-sheet-close {
        position: absolute;
        top: 5px;
        right: 16px;
        background: none;
        border: none;
        color: #666666;
        cursor: pointer;
        font-size: 20px;
        padding: 4px;
        border-radius: 4px;
        transition: all 0.2s ease;
        z-index: 10;
    }

    .bottom-sheet-close:hover {
        color: #2C2C2C;
        background: #F5F5F5;
    }
}

@media (min-width: 769px) {
    .bottom-sheet-overlay,
    .bottom-sheet-close {
        display: none !important;
    }
}

/* FABボタン */
.fab-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 56px;
    height: 56px;
    background: #4FAA00;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 999 !important;
    transition: all 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
}

.fab-button:hover {
    opacity: 0.85;
}

.fab-button:active {
    opacity: 0.7;
}

.fab-button .comment-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #E74C3C;
    color: white;
    border-radius: 10px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    border: 2px solid white;
}

.fab-button .comment-count-badge.hidden {
    display: none;
}

@media (max-width: 768px) {
    .fab-button {
        display: flex !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 999 !important;
    }
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 2px solid #E0E0E0;
    background: #FAFAFA;
}

@media (max-width: 768px) {
    .panel-header {
        padding: 12px 16px;
        background: #FAFAFA;
        border-bottom: 2px solid #F5F5F5;
    }
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-title span {
    font-size: 16px;
    font-weight: 600;
    color: #2C2C2C;
}

.back-to-list {
    background: none;
    border: none;
    color: #4FAA00;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: none;
    align-items: center;
    gap: 4px;
}

.back-to-list:hover {
    background: #F1F8EC;
}

.comments-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.search-box {
    position: relative;
}

.search-input {
    padding-left: 12px;
    font-size: 13px;
    height: 36px;
}

.filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.filter-tab {
    background: #2C2C2C;
    color: #fff;
    border: 2px solid #2C2C2C;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-tab:hover {
    background: #1A1A1A;
}

.filter-tab.active {
    background: #4FAA00;
    color: white;
    border-color: #4FAA00;
}

.count-badge {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    padding: 0 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    min-width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filter-tab:not(.active) .count-badge {
    background: #444444;
    color: #fff;
}

.filter-tab:hover .count-badge {
    background: #666666;
}

.count-badge.important {
    background: #FFF9E6;
    color: #F57C00;
    font-weight: 700;
}

.filter-tab.active .count-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

.filter-tab.active .count-badge.important {
    background: rgba(255, 255, 255, 0.5);
    color: white;
    font-weight: 700;
}

.panel-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.comments-list-view,
.comment-detail-view {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    background: white;
    z-index: 1;
}

.comments-list-view {
    display: block;
}

.comments-list-view.hidden {
    display: none;
}

.comment-detail-view {
    display: none;
}

.comment-detail-view.active {
    display: block;
    z-index: 2;
}

.comments-list {
    padding: 0;
}

.comment-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #4FAA00;
    position: sticky;
    top: 0;
    z-index: 5;
    cursor: pointer;
    transition: background 0.2s ease;
}

.comment-page-header .page-title {
    margin-bottom: 0;
}

.comment-page-header:hover {
    background: #3D8800;
}

.comment-page-header .page-title {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.comment-page-header .fa-file-o {
    color: #fff;
}

.comment-page-header .page-comment-count {
    font-size: 12px;
    color: #fff;
    font-weight: 500;
}

@media (max-width: 768px) {
    .comment-page-header {
        padding: 10px 16px;
        font-size: 13px;
    }

    .comment-page-header .page-title {
        font-size: 13px;
    }

    .comment-page-header .page-comment-count {
        font-size: 11px;
    }
}

.comment-item {
    padding: 16px 20px;
    border-bottom: 1px solid #E0E0E0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.comment-item:hover {
    background: #FAFAFA;
}

.comment-item.highlighted {
    background: #FFF9E6;
    border-left: 4px solid #FFC107;
    animation: itemHighlight 2s ease-in-out;
}

@keyframes itemHighlight {
    0%, 100% {
        background: #FFF9E6;
    }
    50% {
        background: #FFE082;
    }
}

.comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.comment-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.comment-menu-trigger {
    background: none;
    border: none;
    color: #999999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.comment-menu-trigger:hover {
    background: #F5F5F5;
    color: #666666;
}

.comment-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 2px solid #E0E0E0;
    border-radius: 4px;
    z-index: 10;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.comment-menu-dropdown.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 16px;
    border: none;
    background: none;
    color: #2C2C2C;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.menu-item:hover {
    background: #FAFAFA;
}

.menu-item.danger {
    color: #E74C3C;
}

.menu-item.danger:hover {
    background: #FFEBEE;
    color: #C62828;
}

.menu-item i {
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.menu-divider {
    height: 1px;
    background: #F5F5F5;
}

.menu-item.status-selector {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    cursor: default;
    padding: 8px 16px;
}

.menu-item.status-selector:hover {
    background: none;
}

.menu-item.status-selector span {
    font-size: 11px;
    color: #666666;
    font-weight: 500;
}

.status-select {
    width: 100%;
    padding: 4px 8px;
    border: 2px solid #D6D6D6;
    border-radius: 4px;
    font-size: 12px;
    background: white;
    color: #2C2C2C;
}

.status-select:focus {
    outline: none;
    border-color: #4FAA00;
}

.status-toggle-btn {
    transition: all 0.2s ease;
    font-weight: 500;
}

.status-toggle-btn.status-pending {
    color: #4FAA00;
}

.status-toggle-btn.status-pending:hover {
    background: #E8F5E9;
    color: #2E7D32;
}

.status-toggle-btn.status-resolved {
    color: #FFC107;
}

.status-toggle-btn.status-resolved:hover {
    background: #FFF9E6;
    color: #F57C00;
}

@media (max-width: 768px) {
    .comment-menu-dropdown {
        right: -8px;
        min-width: 160px;
    }

    .menu-item {
        padding: 5px 12px;
        font-size: 14px;
    }

    .menu-item i {
        width: 16px;
    }
}

.comment-status-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.comment-status-badge.status-pending {
    background: #FFC107;
    color: #2C2C2C;
}

.comment-menu .fa-ellipsis-h {
    color: #2C2C2C;
}

.comment-status-badge.status-resolved {
    background: #CCCCCC;
    color: #2C2C2C;
}

.comment-page-info {
    background: #fff;
    color: #2C2C2C;
    border: 2px solid #2C2C2C;
    padding: 1px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
}

.comment-text {
    font-size: 14px;
    color: #2C2C2C;
    line-height: 1.5;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
}

.comment-author {
    color: #666666;
}

.comment-author.admin-author {
    color: #4FAA00;
    font-weight: 500;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.comment-author.admin-author img {
    margin-right: 5px;
}

.comment-author.guest-author {
    color: #4FAA00;
    font-weight: 500;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.comment-author.guest-author img {
    margin-right: 5px;
}

.comment-date {
    color: #999999;
}

.locate-pin-btn {
    background: none;
    border: none;
    color: #4FAA00;
    cursor: pointer;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 2px;
}

.locate-pin-btn:hover {
    background: #F1F8EC;
    color: #3D8800;
}

/* コメント詳細ビュー */
.comment-detail {
    padding: 20px;
}

.comment-detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.comment-detail-text {
    font-size: 15px;
    color: #2C2C2C;
    line-height: 1.6;
    margin-bottom: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.comment-detail-meta {
    font-size: 13px;
    color: #666666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.comment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-status-select {
    padding: 4px 8px;
    border: 2px solid #D6D6D6;
    border-radius: 4px;
    font-size: 12px;
    background: white;
}

/* コメント編集ビュー */
.comment-edit-view {
    z-index: 1;
    display: none;
}

.comment-edit-view.active {
    display: block;
    z-index: 2;
}

.comment-form textarea {
    margin-bottom: 16px;
    min-height: 120px;
}

.comment-form-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.comment-edit-form {
    padding: 20px;
    display: none;
}

.comment-edit-form.active {
    display: block;
}

/* 共有モーダル */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.share-modal.active {
    opacity: 1;
    visibility: visible;
}

.share-url-container {
    margin-top: 20px;
    margin-bottom: 10px;
}

.share-url-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2C2C2C;
}

.share-url-input {
    display: flex;
    gap: 8px;
}

.share-url {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #D6D6D6;
    border-radius: 4px;
    font-size: 14px;
    background: #FAFAFA;
}

.share-actions {
    margin-bottom: 20px;
}

.share-actions .btn-danger {
    background: transparent;
    color: #E74C3C;
    border: none;
    border-bottom: 2px solid #E74C3C;
    border-radius: 0;
    padding: 0;
}

.share-actions .btn-danger:hover {
    opacity: .7;
}

.share-info {
    background: #F1F8EC;
    border: 2px solid #4FAA00;
    border-radius: 4px;
    padding: 16px;
}

.share-info p {
    margin: 0 0 8px 0;
    font-weight: 500;
    color: #2C2C2C;
    position: relative;
    padding-left: 25px;
}

.share-info p img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
}

.share-info ul {
    margin: 8px 0 0 20px;
    color: #2C2C2C;
}

.share-info li {
    margin-bottom: 4px;
    font-size: 13px;
}

/* フルスクリーンオーバーレイ */
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fullscreen-overlay.active {
    opacity: 1;
    visibility: visible;
}

.fullscreen-overlay .fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 2001;
}

.fullscreen-overlay .fullscreen-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(255, 255, 255, 0.4);
}

.fullscreen-image-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
}

.fullscreen-image-container:active {
    cursor: grabbing;
}

.fullscreen-image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100%;
}

.fullscreen-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.fullscreen-overlay .comment-pin {
    display: none;
}

@media (max-width: 768px) {
    .fullscreen-overlay .fullscreen-btn {
        top: 15px;
        right: 15px;
        padding: 8px 16px;
        font-size: 13px;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .fullscreen-overlay .fullscreen-btn {
        top: 10px;
        right: 10px;
        padding: 6px 12px;
        font-size: 12px;
        gap: 4px;
    }
}

/* ===========================================
   プロジェクト編集ページ（edit-project.php）
=========================================== */
.edit-header {
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.edit-header .header {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-header .header .header-left {
    position: absolute;
    left: 20px;
}

.edit-header .header .header-logo img {
    height: 36px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
}

.save-btn {
    background: #4FAA00;
    color: white;
    border: 2px solid #4FAA00;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    margin-top: 30px;
}

.save-btn:hover {
    background: #3D8800;
}

/* 編集セクション */
.edit-section {
    background: white;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
    padding: 24px;
    margin-bottom: 32px;
    overflow: hidden;
}

.section-header {
    background: #FAFAFA;
    padding: 20px 24px;
    border-bottom: 2px solid #E0E0E0;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2C2C2C;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 16px;
    }
    .edit-section {
        padding: 20px 15px;
    }
}

/* ページ管理 */
.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.page-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: move;
    transition: all 0.2s ease;
}

.page-card:hover {
    opacity: 0.85;
}

.page-card-box {
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
}

.page-card-box .page-actions .page-action-btn {
    width: 100%;
    justify-content: center;
    border-radius: 0 0 8px 8px;
}

.page-card.sortable-ghost {
    opacity: 0.5;
}

.page-card:hover .page-card-box img{
    border: 2px solid #4FAA00;
    border-radius: 8px 8px 0 0;
}

.page-card.sortable-chosen {
    z-index: 10;
}

.main-page-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #4FAA00;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    z-index: 2;
}

.page-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #F5F5F5;
}

.page-info {
    padding: 5px 0;
}

.page-number {
    font-size: 13px;
    font-weight: 500;
    color: #2C2C2C;
    margin-bottom: 8px;
}

.page-actions {
    display: flex;
    gap: 6px;
}

.page-action-btn {
    background: #E74C3C;
    color: white;
    border: 2px solid #E74C3C;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-action-btn:hover:not(:disabled) {
    background: #C62828;
}

.page-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ページ追加エリア */
.add-page-area {
    border: 2px dashed #CCCCCC;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: #FAFAFA;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
}

.add-page-area:hover,
.add-page-area.dragover {
    border-color: #4FAA00;
    background: #F1F8EC;
}

.add-page-icon {
    color: #999999;
    margin-bottom: 16px;
}

.add-page-text {
    font-size: 16px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 16px;
}

.add-page-btn {
    background: #4FAA00;
    color: white;
    border: 2px solid #4FAA00;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-page-btn:hover {
    background: #3D8800;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

/* 進行状況オーバーレイ */
.progress-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.progress-overlay.active {
    opacity: 1;
    visibility: visible;
}

.progress-content {
    background: white;
    border-radius: 8px;
    border: 2px solid #E0E0E0;
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90vw;
}

.progress-icon {
    color: #4FAA00;
    margin-bottom: 20px;
}

.progress-text {
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 8px;
}

.progress-detail {
    font-size: 14px;
    color: #666666;
}

/* ===========================================
   共有ページ（shared.php）
=========================================== */

.shared-header {
    height: 80px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.shared-header .header {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shared-header .header-guest {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shared-header .logo {
    font-size: 24px;
    font-weight: 700;
    color: #4FAA00;
}

.shared-header .header .header-left {
    position: absolute;
    left: 20px;
}

.shared-header .header .header-logo img {
    height: 36px;
}

.shared-header .header .header-controls {
    position: absolute;
    right: 20px;
}

.shared-header .project-title {
    font-size: 18px;
    font-weight: 600;
    color: #2C2C2C;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.shared-header .project-title>span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 300px;
}

.shared-header .header-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.guest-badge {
    background: #FFC107;
    color: #2C2C2C;
    padding: 4px 12px;
    border-radius: 4px;
    border: 2px solid #FFC107;
    font-size: 12px;
    font-weight: 600;
}

/* ゲストコメントエリア */
.guest-comment-area {
    background: #E3F2FD;
    border: 2px solid #2196F3;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
    display: none;
}

.guest-comment-area.active {
    display: block;
}

.guest-comment-title {
    font-size: 14px;
    font-weight: 600;
    color: #1565C0;
    margin-bottom: 4px;
}

.guest-comment-help {
    font-size: 12px;
    color: #1976D2;
    margin-bottom: 15px;
}

.guest-name-container {
    position: relative;
}

.guest-name-status {
    position: absolute;
    top: -18px;
    left: 0;
    font-size: 11px;
    color: #4FAA00;
    display: none;
    align-items: center;
    gap: 4px;
}

.guest-name-input {
    margin-bottom: 8px;
    font-size: 13px;
}

.guest-name-input.guest-name-saved {
    background: #E8F5E9;
    border-color: #4FAA00;
    color: #2E7D32;
}

.guest-name-actions {
    display: flex;
    gap: 12px;
    font-size: 11px;
}

/* ===========================================
   レスポンシブデザイン
=========================================== */

@media (max-width: 768px) {
    main.container {
        margin-top: 50px;
    }

    .container {
        padding: 0 16px;
    }

    .header {
        padding: 0 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 16px;
    }

    .projects-section {
        padding: 20px 15px;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .project-actions {
        justify-content: space-between;
    }

    .project-actions .btn {
        flex: 1;
        justify-content: center;
        min-width: auto;
    }

    .project-card {
        overflow: unset;
    }

    .project-info-open {
        width: calc(100% + 15px);
        max-width: 250px;
        position: absolute;
        top: 45px;
        right: 0px;
    }

    .project-info-more {
        width: 35px;
        height: 35px;
    }

    .project-info-more span {
        margin: 2px;
    }

    .main-container {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - 66px);
    }

    .project-container {
        order: 1;
        min-height: 50vh;
    }

    .project-container.collapsed {
        min-height: 20vh;
    }

    .unified-comments-panel {
        order: 2;
        width: 100%;
        height: 70vh;
        max-height: 70vh;
        border-left: none;
        border-top: 2px solid #E0E0E0;
        overflow: hidden;
    }

    .unified-comments-panel.expanded {
        height: 80vh;
        max-height: 80vh;
    }

    .collapse-control {
        display: flex !important;
    }

    .shared-header .header {
        padding: 12px 16px;
        height: 56px;
        min-height: 56px;
        gap: 8px;
    }

    .shared-header .header-guest {
        gap: 8px;
    }

    .shared-header .logo {
        font-size: 20px;
    }

    .shared-header .project-title {
        font-size: 14px;
        justify-content: flex-start;
        flex: 1;
        min-width: 0;
    }

    .shared-header .project-title>span:first-child {
        max-width: 150px;
    }

    .shared-header .project-deadline-badge {
        display: none;
    }

    .shared-header .header-controls .btn {
        padding: 6px;
        width: 32px;
        height: 32px;
    }

    .page-navigation {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .page-info {
        order: 2;
        width: 100%;
        justify-content: center;
    }

    .page-controls {
        order: 1;
        width: 100%;
        justify-content: space-between;
    }

    .panel-header {
        padding: 16px 20px;
    }

    .comments-filters {
        gap: 8px;
    }

    .filter-tabs {
        gap: 2px;
    }

    .filter-tab {
        font-size: 11px;
        padding: 4px 8px;
    }

    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .page-image {
        height: 100px;
    }

    .modal-content {
        margin: 20px;
        max-width: calc(100vw - 40px);
        max-height: calc(100vh - 40px);
    }

    .modal-header,
    .modal-body {
        padding: 16px 20px;
    }

    .duplicate-options {
        margin-bottom: 16px;
    }

    .option-card {
        padding: 12px;
    }

    .duplicate-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    .header {
        padding: 0 12px;
    }

    .shared-header .header {
        padding: 10px 12px;
        height: 48px;
        min-height: 48px;
    }

    .shared-header .logo {
        font-size: 18px;
    }

    .shared-header .project-title {
        font-size: 13px;
    }

    .shared-header .project-title>span:first-child {
        max-width: 120px;
    }

    .guest-badge {
        font-size: 10px;
        padding: 2px 8px;
    }

    .shared-header .header-controls .btn {
        width: 28px;
        height: 28px;
        padding: 4px;
    }

    .panel-header {
        padding: 12px 16px;
    }

    .panel-title span {
        font-size: 16px;
    }

    .comment-item {
        padding: 12px 16px;
    }

    .comment-text {
        font-size: 13px;
    }

    .comment-meta {
        align-items: flex-start;
        gap: 4px;
    }

    .pages-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .page-image {
        height: 80px;
    }

    .page-info {
        padding: 8px;
    }

    .page-number {
        font-size: 12px;
    }

    .form-input,
    .search-input {
        font-size: 16px;
    }

    textarea {
        font-size: 16px;
        min-height: 80px;
    }
}

@media print {
    .header,
    .unified-comments-panel,
    .page-navigation,
    .modal-overlay,
    .notification-modal,
    .duplicate-modal,
    .share-modal,
    .fullscreen-overlay,
    .progress-overlay {
        display: none !important;
    }

    .main-container {
        height: auto;
        flex-direction: column;
    }

    .project-container {
        width: 100%;
    }

    .image-container {
        overflow: visible;
        height: auto;
    }

    .project-image {
        max-width: 100%;
        height: auto;
    }

    .comment-pin {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #fff !important;
    }
}

@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border-color: #000;
    }

    .btn-secondary {
        background: #fff;
        color: #000;
        border-color: #000;
    }

    .comment-pin {
        border-width: 3px;
    }

    .comment-status-badge {
        border: 2px solid #000;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .comment-pin.highlighted {
        animation: none;
    }

    .comment-item.highlighted {
        animation: none;
    }
}

/* ===========================================
   モバイルハンバーガーメニュー
=========================================== */

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: #666666;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-right: 8px;
    position: absolute;
    left: 20px;
}

.mobile-menu-toggle:hover {
    background: #F5F5F5;
    color: #2C2C2C;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: white;
    transition: left 0.3s ease;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    padding-bottom: env(safe-area-inset-bottom, 0);
    border-right: 2px solid #E0E0E0;
}

.mobile-menu.active {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #4FAA00;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mobile-menu-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding-right: 10px;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-menu-content {
    padding: 20px;
    padding-bottom: 20px;
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu-guest-info {
    background: #E3F2FD;
    color: #1565C0;
    padding: 12px 16px;
    border-radius: 4px;
    border: 2px solid #2196F3;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-menu-section {
    margin-bottom: 24px;
}

.mobile-menu-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-page-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-page-list li {
    margin-bottom: 4px;
}

.mobile-page-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: #2C2C2C;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
    position: relative;
}

.mobile-page-link:hover {
    background: #FAFAFA;
    color: #2C2C2C;
}

.mobile-page-link.active {
    background: #F1F8EC;
    color: #4FAA00;
    font-weight: 500;
}

.mobile-page-link i {
    width: 16px;
    text-align: center;
}

.current-badge {
    position: absolute;
    right: 12px;
    background: #4FAA00;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.mobile-menu-actions {
    margin-top: 20px;
    padding-bottom: 20px;
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 16px;
    background: #2C2C2C;
    color: #fff;
    border: 2px solid #2C2C2C;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.mobile-menu-btn .fa {
    color: #fff;
}

.mobile-menu-btn-link {
    background: #4FAA00;
    border: 2px solid #4FAA00;
}

.mobile-menu-btn:hover {
    opacity: 0.85;
}

.mobile-menu-btn-link:hover {
    background: #3D8800;
}

.mobile-menu-btn i {
    width: 20px;
    text-align: center;
}

.mobile-menu-divider {
    height: 1px;
    background: #E0E0E0;
    margin: 16px 0;
}

.mobile-menu-spacer {
    height: 80px;
    flex-shrink: 0;
}

@supports (height: env(safe-area-inset-bottom)) {
    .mobile-menu-spacer {
        height: calc(80px + env(safe-area-inset-bottom, 0px));
    }
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1099;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.desktop-only {
    display: inline-flex;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .desktop-only {
        display: none !important;
    }

    .project-header .header,
    .shared-header .header {
        gap: 8px;
    }

    .project-title {
        flex: 1;
        min-width: 0;
    }

    .project-title>span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-controls {
        gap: 4px;
    }

    .shared-header .header-guest {
        display: none !important;
    }
}

@media (min-width: 769px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* ===========================================
   ユーティリティクラス
=========================================== */

.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.text-primary {
    color: #4FAA00;
}

.text-secondary {
    color: #666666;
}

.text-success {
    color: #4FAA00;
}

.text-danger {
    color: #E74C3C;
}

.text-warning {
    color: #F57C00;
}

.bg-primary {
    background-color: #4FAA00;
}

.bg-secondary {
    background-color: #F5F5F5;
}

.bg-success {
    background-color: #E8F5E9;
}

.bg-danger {
    background-color: #FFEBEE;
}

.bg-warning {
    background-color: #FFF9E6;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }
.mt-6 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.inline-block { display: inline-block; }
.grid { display: grid; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

.justify-center { justify-content: center; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }

.rounded { border-radius: 4px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-full { border-radius: 9999px; }

.border { border: 2px solid #E0E0E0; }
.border-t { border-top: 2px solid #E0E0E0; }
.border-b { border-bottom: 2px solid #E0E0E0; }
.border-l { border-left: 2px solid #E0E0E0; }
.border-r { border-right: 2px solid #E0E0E0; }

.transition { transition: all 0.2s ease; }
.transition-fast { transition: all 0.15s ease; }
.transition-slow { transition: all 0.3s ease; }

.cursor-pointer { cursor: pointer; }
.cursor-move { cursor: move; }
.cursor-grab { cursor: grab; }
.cursor-grabbing { cursor: grabbing; }

.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

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

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

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

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-fadeIn { animation: fadeIn 0.3s ease-in-out; }
.animate-fadeOut { animation: fadeOut 0.3s ease-in-out; }
.animate-slideInUp { animation: slideInUp 0.3s ease-out; }
.animate-slideInDown { animation: slideInDown 0.3s ease-out; }
.animate-slideInLeft { animation: slideInLeft 0.3s ease-out; }
.animate-slideInRight { animation: slideInRight 0.3s ease-out; }
.animate-scaleIn { animation: scaleIn 0.3s ease-out; }
.animate-bounce { animation: bounce 2s infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-spin { animation: spin 1s linear infinite; }

/* ===========================================
   ローディングオーバーレイ
=========================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    position: relative;
}

.spinner-circle {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid #F5F5F5;
    border-top-color: #4FAA00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-inner {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 3px solid #F5F5F5;
    border-bottom-color: #3D8800;
    border-radius: 50%;
    animation: spin 0.8s linear infinite reverse;
}

.loading-text {
    font-size: 16px;
    font-weight: 600;
    color: #2C2C2C;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 14px;
    color: #666666;
    margin-bottom: 24px;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: #E0E0E0;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress-bar {
    height: 100%;
    background: #4FAA00;
    width: 0%;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: #4FAA00;
    border-radius: 50%;
    animation: dotPulse 1.4s ease-in-out infinite;
}

.loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

.loading-dot:nth-child(3) {
    animation-delay: 0;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===========================================
   カスタムスクロールバー
=========================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F5F5;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #CCCCCC;
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #999999;
}

::-webkit-scrollbar-corner {
    background: #F5F5F5;
}

html {
    scrollbar-width: thin;
    scrollbar-color: #CCCCCC #F5F5F5;
}

/* ===========================================
   フォーカス管理（アクセシビリティ）
=========================================== */

*:focus {
    outline: 2px solid #4FAA00;
    outline-offset: 2px;
}

*:focus:not(:focus-visible) {
    outline: none;
}

.btn:focus-visible {
    outline: 2px solid #4FAA00;
    outline-offset: 2px;
}

.form-input:focus,
.search-input:focus,
textarea:focus {
    outline: none;
    border-color: #4FAA00;
}

a:focus-visible {
    outline: 2px solid #4FAA00;
    outline-offset: 2px;
}

/* ===========================================
   copyright
=========================================== */
.copyright{
    width: 100%;
    background: #2C2C2C;
    color: #fff;
    display: flex;
    justify-content: center;
    padding: 10px;
    font-size: 14px;
    margin-top: 100px;
}

/* プロジェクトページ(project.php)ではフッター上部のマージンを無効化 */
.project-header ~ .copyright,
.shared-header ~ .copyright {
    margin-top: 0;
}

/* ===========================================
   完了
=========================================== */
