/* サトリ式アカシックダイアリー スタイルシート */

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark: #1f2937;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--dark);
}

/* モーダル */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s;
}

.modal-content h2 {
    margin-bottom: 15px;
    color: var(--primary-color);
    text-align: center;
}

.modal-content p {
    text-align: center;
    color: var(--gray);
    margin-bottom: 20px;
}

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

/* 画像拡大ポップアップ（スクエア表示） */
#imageZoomModal .modal-content {
    width: min(90vw, 90vh);
    height: min(90vw, 90vh);
    max-width: min(90vw, 90vh);
    max-height: min(90vw, 90vh);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#zoomedImage {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* 認証タブ */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.auth-tab {
    flex: 1;
    padding: 10px 20px;
    border: none;
    background: var(--light-gray);
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s;
}

.auth-tab.active {
    background: var(--primary-color);
    color: var(--white);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* ヘッダー */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
    padding: 40px 30px;
    text-align: center;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

.user-name::before {
    content: "👤 ";
}

.btn-logout {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.header h1 {
    font-size: 2rem;
    margin: 0;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.stat-unit {
    font-size: 1rem;
    opacity: 0.9;
}

/* ナビゲーション */
.nav-tabs {
    display: flex;
    background: var(--light-gray);
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
}

.nav-tab {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    color: var(--gray);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.nav-tab:hover {
    background: rgba(99, 102, 241, 0.1);
}

.nav-tab.active {
    color: var(--primary-color);
    background: var(--white);
    border-bottom: 3px solid var(--primary-color);
}

/* タブコンテンツ */
.tab-content {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s;
}

.tab-content.active {
    display: block;
}

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

/* 実践タブ */
.practice-container {
    max-width: 800px;
    margin: 0 auto;
}

.date-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

.date-selector label {
    font-weight: 500;
}

.date-selector input[type="date"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}

.day-number {
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* ステップインジケーター */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.4;
    transition: opacity 0.3s;
}

.step.active {
    opacity: 1;
}

.step.completed {
    opacity: 1;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: bold;
    color: var(--gray);
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--primary-color);
    color: var(--white);
}

.step.completed .step-number {
    background: var(--success-color);
    color: var(--white);
}

.step.completed .step-number::before {
    content: "✓";
}

.step-name {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* タイマー表示 */
.timer-section {
    margin-bottom: 30px;
}

.timer-display {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.timer-circle {
    position: relative;
    width: 250px;
    height: 250px;
}

.timer-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.timer-bg {
    fill: none;
    stroke: var(--light-gray);
    stroke-width: 10;
}

.timer-progress {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 565.48;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-time {
    font-size: 3rem;
    font-weight: bold;
    color: var(--dark);
}

.timer-label {
    font-size: 1rem;
    color: var(--gray);
    margin-top: 10px;
}

/* タイマーコントロール */
.timer-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

/* ボタン */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* サトリメールコーチングボタン */
.coaching-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

/* LINE確認チェックボックスのラベル */
.line-check-label:hover {
    background-color: #f8fafc !important;
}

/* トグルスイッチ（プライバシーモード用） */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #10b981;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* プライバシーモード適用時のマスク */
.privacy-masked {
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
}

.privacy-image-hidden {
    display: none !important;
}

.privacy-image-placeholder {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 2px dashed #9ca3af;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
    font-weight: 600;
    margin: 10px 0;
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: #7c3aed;
}

.btn-outline {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.125rem;
}

/* ステップガイド */
.step-guide {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.step-guide h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.step-guide ul {
    list-style: none;
    padding-left: 0;
}

.step-guide li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
}

.step-guide li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ジャーナリングフォーム */
.journal-form {
    background: var(--light-gray);
    padding: 30px;
    border-radius: var(--border-radius);
    margin-top: 30px;
}

.journal-form h3 {
    margin-bottom: 10px;
}

.journal-instruction {
    color: var(--gray);
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group textarea,
.form-group input[type="text"],
.form-group input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea:focus,
.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group input[type="password"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: monospace;
}

.help-text {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--gray);
}

.help-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

/* 画像アップロード */
.upload-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--border-radius);
    border: 2px dashed rgba(99, 102, 241, 0.3);
}

.upload-option h4,
.manual-option h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.upload-instruction {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 15px;
}

.divider {
    text-align: center;
    margin: 20px 0;
    color: var(--gray);
    font-weight: 500;
}

.image-preview {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.image-preview-item {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    width: 200px;
    height: 200px;
    overflow: hidden;
}

.image-preview-item img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: block;
    transition: transform 0.3s ease;
    position: absolute;
    top: 50%;
    left: 50%;
    transform-origin: center center;
}

.image-preview-item .delete-image-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--danger-color);
    color: white;
    border: 2px solid white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: all 0.2s;
    line-height: 1;
    padding: 0;
    z-index: 10;
}

.image-preview-item .delete-image-btn:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.image-preview-item .image-controls {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    justify-content: center;
}

.image-preview-item .rotate-btn {
    padding: 4px 8px;
    font-size: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.image-preview-item .rotate-btn:hover {
    background: var(--secondary-color);
}

.image-preview img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.transcription-status {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.875rem;
}

.transcription-status.loading {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.transcription-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.transcription-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* カレンダー */
.calendar-container {
    max-width: 900px;
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.calendar-header h2 {
    margin: 0;
}

.calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.completed {
    background: var(--success-color);
}

.dot.partial {
    background: var(--warning-color);
}

.dot.future {
    background: var(--light-gray);
    border: 2px solid var(--gray);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.calendar-day {
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.calendar-day:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.calendar-day.completed {
    border-color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.calendar-day.partial {
    border-color: var(--warning-color);
    background: rgba(245, 158, 11, 0.1);
}

.calendar-day.today {
    border-color: var(--primary-color);
    border-width: 3px;
}

.calendar-day-number {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.calendar-day-date {
    font-size: 0.875rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.calendar-day-status {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--light-gray);
}

.calendar-day.completed .calendar-day-status {
    background: var(--success-color);
    color: var(--white);
}

/* 詳細ビュー */
.detail-container {
    max-width: 900px;
    margin: 0 auto;
    animation: fadeIn 0.3s;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.detail-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.practice-status-card {
    background: var(--light-gray);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 25px;
}

.practice-status-card h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.status-label {
    font-size: 0.875rem;
    color: var(--gray);
}

.status-value {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--dark);
}

.status-value.completed {
    color: var(--success-color);
}

.journal-detail-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 2px solid var(--light-gray);
}

.journal-detail-card h3 {
    margin-bottom: 20px;
}

.journal-detail-card h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.detail-upload-section {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--border-radius);
    border: 2px dashed rgba(99, 102, 241, 0.3);
}

.existing-image {
    margin: 15px 0;
}

.existing-image img {
    max-width: 100%;
    max-height: 500px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.existing-image-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.875rem;
    color: var(--gray);
}

/* 変化のサインアンケート */
.change-signs-survey {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: var(--border-radius);
    border: 2px solid rgba(99, 102, 241, 0.2);
}

.change-signs-survey h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
    text-align: center;
}

.change-signs-survey h4 {
    margin: 20px 0 15px 0;
    color: var(--secondary-color);
}

.survey-intro {
    text-align: center;
    color: var(--gray);
    margin-bottom: 25px;
}

/* ジャーナリストリスト */
.journal-list-container h2 {
    margin-bottom: 20px;
}

.export-buttons {
    margin-bottom: 20px;
}

.journal-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.journal-entry {
    background: var(--light-gray);
    padding: 20px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.journal-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.journal-entry-date {
    font-weight: bold;
    font-size: 1.125rem;
}

.journal-entry-day {
    color: var(--gray);
}

.journal-entry-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.journal-field {
    padding: 10px 0;
}

.journal-field-label {
    font-weight: 500;
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 5px;
}

.journal-field-value {
    color: var(--dark);
}

/* 変化のサイン */
.signs-container h2 {
    margin-bottom: 10px;
}

.signs-intro {
    color: var(--gray);
    margin-bottom: 30px;
}

.signs-category {
    margin-bottom: 30px;
}

.signs-category h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.sign-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    margin-bottom: 10px;
    background: var(--light-gray);
    border-radius: 8px;
    transition: background 0.3s;
}

.sign-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

.sign-item input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.sign-item label {
    flex: 1;
    cursor: pointer;
}

.custom-sign {
    margin-top: 30px;
}

.custom-sign h3 {
    margin-bottom: 15px;
}

.custom-sign textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 15px;
}

/* 設定 */
.settings-container h2 {
    margin-bottom: 30px;
}

.settings-section {
    margin-bottom: 40px;
}

.settings-section h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    margin-bottom: 0;
}

/* 危険ゾーン */
.danger-zone {
    margin-top: 50px;
    padding: 25px;
    background: rgba(239, 68, 68, 0.05);
    border: 2px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--border-radius);
}

.danger-zone h3 {
    color: var(--danger-color);
    margin-bottom: 15px;
}

.warning-text {
    color: var(--gray);
    margin-bottom: 15px;
}

.danger-description {
    color: var(--gray);
    font-size: 0.875rem;
    margin-top: 10px;
}

.btn-danger {
    background: var(--danger-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .header h1 {
        font-size: 1.5rem;
    }

    .stats {
        gap: 20px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .step-indicator {
        gap: 10px;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .step-name {
        font-size: 0.75rem;
    }

    .timer-circle {
        width: 200px;
        height: 200px;
    }

    .timer-time {
        font-size: 2.5rem;
    }

    .calendar-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .tab-content {
        padding: 20px 15px;
    }
}

/* アニメーション */
.pulse {
    animation: pulse 2s infinite;
}

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

.shake {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* =====================================
   画像回転コントロール
   ===================================== */
.image-rotation-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center; /* 中央配置 */
}

.image-rotation-controls .btn-small {
    padding: 8px 16px;
    font-size: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.image-rotation-controls .btn-small:hover {
    background: var(--secondary-color);
}

/* 保存済み画像セクション（独立、画面幅いっぱい） */
.existing-image-section {
    margin: 20px -30px; /* 親要素のpaddingを打ち消す */
    padding: 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.existing-image-section h4 {
    text-align: center;
    margin-bottom: 15px;
    color: var(--dark);
}

/* スマホ対応 */
@media (max-width: 768px) {
    .existing-image-section {
        margin: 20px -20px; /* スマホのpaddingを打ち消す */
        padding: 15px;
    }
}

/* 画像回転コンテナ（正方形） */
.image-rotation-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* スマホ対応 */
@media (max-width: 768px) {
    .image-rotation-container {
        max-width: calc(100vw - 90px); /* 画面幅 - セクションpadding - 安全余白 */
    }
}

.image-rotation-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.saved-image img {
    display: block;
    border-radius: 8px;
}

/* トースト通知 */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10000;
    animation: slideInUp 0.3s ease-out;
    max-width: 300px;
}

.toast.success {
    border-left: 4px solid var(--success-color);
}

.toast.error {
    border-left: 4px solid var(--danger-color);
}

.toast.info {
    border-left: 4px solid var(--primary-color);
}

.toast-icon {
    font-size: 20px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

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

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

/* 管理者コンソール */
.admin-users-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-user-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-user-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
}

.admin-user-card.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.admin-user-card.blocked {
    background: rgba(239, 68, 68, 0.05);
    border-color: var(--danger-color);
}

.admin-user-info {
    flex: 1;
}

.admin-user-name {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--dark);
}

.admin-user-email {
    font-size: 0.9em;
    color: var(--gray);
    margin-top: 4px;
}

.admin-user-meta {
    font-size: 0.85em;
    color: var(--gray);
    margin-top: 6px;
    display: flex;
    gap: 12px;
}

.admin-user-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.admin-user-badge.admin {
    background: #fef3c7;
    color: #92400e;
}

.admin-user-badge.blocked {
    background: #fee2e2;
    color: #991b1b;
}

.admin-user-actions {
    display: flex;
    gap: 8px;
}

.admin-user-actions button {
    padding: 6px 12px;
    font-size: 0.9em;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-user-actions button.btn-block {
    background: var(--danger-color);
    color: white;
}

.admin-user-actions button.btn-unblock {
    background: var(--success-color);
    color: white;
}

.admin-user-actions button.btn-delete {
    background: #dc2626;
    color: white;
}

.admin-user-actions button:hover {
    opacity: 0.8;
    transform: translateY(-1px);
}

