/* css/components.css - 完全統合版（詳細度優先版） */

/* ===========================
   Header Component (詳細度優先版)
   =========================== */
   header.header {
    background: white;
    box-shadow: var(--shadow-soft);
    position: sticky;
    top: 0;
    z-index: 1100;
}

header.header .container > .header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

header.header .header-container > .header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-dark);
}

header.header .header-logo > .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-sage));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

header.header .header-logo > .logo-text {
    display: flex;
    flex-direction: column;
}

header.header .logo-text > .logo-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-dark);
}

header.header .logo-text > .logo-subtitle {
    font-size: 0.75rem;
    color: var(--warm-gray);
}

/* Navigation */
header.header nav.nav-menu {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

header.header .nav-menu > .nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

header.header .nav-menu > .nav-link:hover {
    color: var(--accent-coral);
}

header.header .nav-menu > .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-coral);
    transition: width 0.3s ease;
}

header.header .nav-menu > .nav-link:hover::after {
    width: 100%;
}

/* Header Actions */
header.header .header-container > .header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

header.header .header-actions > .city-selector,
header.header .header-actions > .prefecture-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
    background: transparent;
}

header.header .header-actions > .city-selector {
    background: var(--cream);
}

header.header .header-actions > .city-selector:hover {
    background: var(--accent-sage);
    color: white;
}

header.header .header-actions > .prefecture-btn {
    background: #f5f5f5;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

header.header .header-actions > .prefecture-btn:hover {
    background: #e0e0e0;
}

/* Google Login Button */
header.header #auth-section .btn-google {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: white;
    border: 1px solid #ddd;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

header.header #auth-section .btn-google:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

header.header .btn-google > .google-icon {
    width: 20px;
    height: 20px;
}

/* User Menu */
header.header #auth-section .user-menu {
    position: relative;
}

header.header .user-menu > .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--accent-coral);
    transition: all 0.3s ease;
}

header.header .user-menu > .user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

header.header .user-menu > #user-dropdown.user-dropdown {
    position: absolute;
    top: 50px;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

header.header #user-dropdown.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

header.header #user-dropdown > .user-info {
    padding: 0.75rem;
    border-bottom: 1px solid var(--cream);
}

header.header .user-info > .user-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

header.header .user-info > .user-email {
    font-size: 0.8rem;
    color: var(--warm-gray);
}

header.header #user-dropdown > .user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0.75rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    color: var(--text-dark);
}

header.header #user-dropdown > .user-dropdown-item:hover {
    background: var(--cream);
}

header.header #user-dropdown > .user-dropdown-item.danger {
    color: var(--error);
}

header.header #user-dropdown > .dropdown-divider {
    margin: 0.5rem 0;
    border: none;
    border-top: 1px solid var(--cream);
}

/* Mobile Menu Button */
header.header .header-container > .mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

header.header .mobile-menu-btn > .menu-icon {
    position: relative;
    width: 24px;
    height: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

header.header .menu-icon > span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}

header.header .mobile-menu-btn.active .menu-icon > span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

header.header .mobile-menu-btn.active .menu-icon > span:nth-child(2) {
    opacity: 0;
}

header.header .mobile-menu-btn.active .menu-icon > span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Desktop Only Elements */
header.header .desktop-only {
    display: flex;
}

/* Mobile Location Bar */
header.header .container > .mobile-location-bar {
    display: none;
    padding: 0.5rem 0;
    border-top: 1px solid var(--cream);
}

header.header .mobile-location-bar > .mobile-location-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.5rem 1rem;
    background: var(--cream);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
}

header.header .mobile-location-btn:hover {
    background: var(--accent-sage);
    color: white;
}

header.header .mobile-location-btn > .location-icon {
    font-size: 1rem;
}

header.header .mobile-location-btn > .location-text {
    flex: 1;
    text-align: left;
}

header.header .mobile-location-btn > .chevron-icon {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

header.header .mobile-location-btn:hover .chevron-icon {
    transform: rotate(180deg);
}

/* ===========================
   Mobile Menu (詳細度優先版)
   =========================== */
#mobile-menu-overlay.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1200;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mobile-menu-overlay.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

#mobile-menu-overlay > #mobile-menu.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-105%);
    width: 85%;
    max-width: 320px;
    height: 100%;
    background: white;
    z-index: 10000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

#mobile-menu-overlay > #mobile-menu.mobile-menu.active { transform: translateX(0); }

#mobile-menu > .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-sage));
    color: white;
}

#mobile-menu .mobile-menu-header > #mobile-menu-user {
    flex: 1;
}

#mobile-menu-user > .mobile-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#mobile-menu .mobile-user-info > .mobile-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

#mobile-menu .mobile-user-info > .mobile-user-details {
    flex: 1;
}

#mobile-menu .mobile-user-details > .mobile-user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

#mobile-menu .mobile-user-details > .mobile-user-email {
    font-size: 0.75rem;
    opacity: 0.9;
}

#mobile-menu .mobile-login-prompt p {
    font-size: 0.9rem;
    opacity: 0.9;
}

#mobile-menu .mobile-menu-header > .mobile-menu-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

#mobile-menu .mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

#mobile-menu > .mobile-menu-content {
    padding: 1rem;
}

#mobile-menu .mobile-menu-content > .mobile-nav-section {
    margin-bottom: 2rem;
}

#mobile-menu .mobile-nav-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--warm-gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0 0.5rem;
}

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

#mobile-menu .mobile-menu-list > .mobile-menu-item {
    margin-bottom: 0.25rem;
}

#mobile-menu .mobile-menu-item > .mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: none;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

#mobile-menu .mobile-menu-link:hover {
    background: var(--cream);
    transform: translateX(5px);
}

#mobile-menu .mobile-menu-link > .menu-icon-wrap {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: 8px;
    font-size: 1.2rem;
}

#mobile-menu .mobile-menu-link > .menu-arrow {
    margin-left: auto;
    opacity: 0.4;
}

/* Quick Access Grid */
#mobile-menu .mobile-quick-access {
    margin-bottom: 2rem;
}

#mobile-menu .quick-access-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

#mobile-menu .quick-access-grid > .quick-access-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: white;
    border: 2px solid var(--cream);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#mobile-menu .quick-access-btn:hover {
    background: var(--cream);
    transform: translateY(-2px);
}

#mobile-menu .quick-access-btn > .quick-icon {
    font-size: 1.5rem;
}

#mobile-menu .quick-access-btn > .quick-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
}

#mobile-menu #mobile-user-menu.mobile-user-menu {
    margin-bottom: 2rem;
}

#mobile-menu > #mobile-menu-footer.mobile-menu-footer {
    padding: 1rem;
    border-top: 1px solid var(--cream);
    margin-top: auto;
}

#mobile-menu-footer > .mobile-login-btn,
#mobile-menu-footer > .mobile-logout-btn,
#mobile-menu-footer > .mobile-delete-account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
}

#mobile-menu-footer > .mobile-delete-account-btn {
    margin-top: 1rem;
}

#mobile-menu-footer > .mobile-login-btn {
    background: white;
    border: 2px solid var(--accent-coral);
    color: var(--text-dark);
}

#mobile-menu-footer > .mobile-login-btn:hover {
    background: var(--accent-coral);
    color: white;
}

#mobile-menu-footer > .mobile-logout-btn {
    background: var(--cream);
    color: var(--text-dark);
    margin-bottom: 1rem !important;
}

#mobile-menu-footer > .mobile-logout-btn:hover {
    background: var(--warm-gray);
    color: white;
}

#mobile-menu-footer > .mobile-delete-account-btn {
    background: transparent;
    color: var(--error);
    border: 1px solid var(--error);
}

#mobile-menu-footer > .mobile-delete-account-btn:hover {
    background: var(--error);
    color: white;
}

/* ===========================
   Newsletter Settings Modal (詳細度優先版)
   =========================== */
#newsletter-modal .modal-body > .newsletter-settings {
    padding: 1rem 0;
}

#newsletter-modal .newsletter-settings > .setting-header {
    margin-bottom: 1.5rem;
}

#newsletter-modal .setting-header > h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

#newsletter-modal .setting-header > p {
    color: var(--warm-gray);
    font-size: 0.95rem;
}

#newsletter-modal .newsletter-settings > .benefits-box {
    background: linear-gradient(135deg, rgba(232, 180, 160, 0.05), rgba(193, 214, 195, 0.05));
    border: 1px solid var(--cream);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

#newsletter-modal .benefits-box > h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

#newsletter-modal .benefits-box > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#newsletter-modal .benefits-box > ul > li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    font-size: 0.9rem;
}

#newsletter-modal .newsletter-settings > .toggle-section {
    background: white;
    border: 2px solid var(--cream);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

#newsletter-modal .toggle-section > .toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

#newsletter-modal .toggle-container > .toggle-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
}

#newsletter-modal .toggle-section > .toggle-description {
    font-size: 0.85rem;
    color: var(--warm-gray);
    line-height: 1.5;
}

#newsletter-modal .newsletter-settings > .email-info {
    background: var(--cream);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

#newsletter-modal .email-info > p {
    margin: 0;
    font-size: 0.9rem;
}

#newsletter-modal .email-info strong {
    color: var(--text-dark);
}

#newsletter-modal .newsletter-settings > .line-promotion {
    background: linear-gradient(135deg, rgba(0, 185, 0, 0.05), rgba(0, 185, 0, 0.1));
    border: 1px solid rgba(0, 185, 0, 0.2);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

#newsletter-modal .line-promotion > h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

#newsletter-modal .line-promotion > p {
    font-size: 0.9rem;
    color: var(--warm-gray);
    margin-bottom: 1rem;
}

#newsletter-modal .modal-body > .terms-links {
    text-align: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--cream);
    font-size: 0.85rem;
}

#newsletter-modal .terms-links > a {
    color: var(--accent-coral);
    text-decoration: none;
    margin: 0 0.5rem;
}

#newsletter-modal .terms-links > a:hover {
    text-decoration: underline;
}

/* ===========================
   LINE Registration Modal (詳細度優先版)
   =========================== */
#line-modal .modal-body > .line-registration {
    padding: 1rem 0;
}

#line-modal .line-registration > .line-benefits {
    margin-bottom: 2rem;
}

#line-modal .line-benefits > h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

#line-modal .line-benefits > ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#line-modal .line-benefits > ul > li {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: var(--text-dark);
}

#line-modal .line-registration > .qr-section {
    text-align: center;
    background: var(--cream);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

#line-modal .qr-section > .qr-instruction {
    font-size: 0.95rem;
    color: var(--warm-gray);
    margin-bottom: 1.5rem;
}

#line-modal .qr-section > .line-qr-large {
    width: 220px;
    height: 220px;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#line-modal .qr-section > .btn-line-add {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #00B900, #00A000);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 185, 0, 0.3);
}

#line-modal .btn-line-add:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 185, 0, 0.4);
}

#line-modal .line-registration > .line-footer {
    text-align: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
}

#line-modal .line-footer > .note {
    font-size: 0.85rem;
    color: var(--warm-gray);
    line-height: 1.5;
    margin: 0;
}

/* ===========================
   Toggle Switch Component (詳細度優先版)
   =========================== */
.modal .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.modal .switch > input {
    opacity: 0;
    width: 0;
    height: 0;
}

.modal .switch > .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: all 0.4s ease;
    border-radius: 26px;
}

.modal .switch > .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: all 0.4s ease;
    border-radius: 50%;
}

.modal .switch > input:checked + .slider {
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-sage));
}

.modal .switch > input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(232, 180, 160, 0.3);
}

.modal .switch > input:checked + .slider:before {
    transform: translateX(24px);
}

/* ===========================
   Profile Modal - Padding調整済み (詳細度優先版)
   =========================== */
#profile-modal .modal-body > .profile-form {
    display: flex;
    flex-direction: column;
}

#profile-modal .profile-form > .profile-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

#profile-modal .profile-section:last-of-type {
    border-bottom: none;
}

#profile-modal .profile-section > .section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

#profile-modal .profile-section > .profile-photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
}

#profile-modal .profile-photo-section > #profile-photo-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--accent-coral);
    object-fit: cover;
}

#profile-modal .profile-section > .newsletter-settings-inline {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
}

#profile-modal .newsletter-settings-inline > .setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#profile-modal .setting-row > .setting-description {
    flex: 1;
    margin-right: 1rem;
}

#profile-modal .setting-description > .setting-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

#profile-modal .setting-description > .setting-sublabel {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

/* フォームグループ - padding調整済み (詳細度優先版) */
#profile-modal .profile-section > .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#profile-modal .form-group > label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
}

/* フォームコントロール - padding大幅削減済み (詳細度優先版) */
#profile-modal .form-group > .form-control {
    padding: 0.5rem 0.75rem !important;
    border: 2px solid var(--cream);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

#profile-modal .form-control:focus {
    outline: none;
    border-color: var(--accent-coral);
    box-shadow: 0 0 0 3px rgba(232, 180, 160, 0.2);
}

#profile-modal .form-control:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    color: var(--warm-gray);
}

/* テキストエリア専用 (詳細度優先版) */
.modal textarea.form-control {
    padding: 0.75rem !important;
    resize: vertical;
    min-height: 120px;
}

/* ===========================
   Image Cropper UI (詳細度優先版)
   =========================== */
#crop-modal .modal-body > .crop-container {
    position: relative;
    width: 500px;
    height: 500px;
    margin: 0 auto;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

#crop-modal .crop-container > #crop-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

#crop-modal .crop-container > .crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

#crop-modal .crop-overlay > #crop-box {
    position: absolute;
    border: 2px solid var(--accent-coral);
    background: rgba(255, 255, 255, 0.1);
    cursor: move;
    pointer-events: auto;
    box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.5);
}

#crop-box::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.5);
}

#crop-box::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 1px;
    background: rgba(255, 255, 255, 0.5);
}

#crop-box > .resize-handle {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: var(--accent-coral);
    border: 2px solid white;
    border-radius: 50%;
    cursor: se-resize;
}

#crop-modal .modal-body > .crop-controls {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--cream);
    border-radius: 8px;
}

#crop-modal .crop-controls > .zoom-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#crop-modal .zoom-control > label {
    font-weight: 600;
    font-size: 0.9rem;
}

#crop-modal .zoom-control > #zoom-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
}

#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-coral);
    cursor: pointer;
}

#zoom-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-coral);
    cursor: pointer;
    border: none;
}

#crop-modal .zoom-control > #zoom-value {
    font-weight: 600;
    color: var(--accent-coral);
    min-width: 50px;
}

/* ===========================
   Modal Component (詳細度優先版)
   =========================== */

/* ===========================
   Modal Component - 初期非表示の修正
   =========================== */

/* すべてのモーダルを初期非表示 */
#city-modal,
#prefecture-modal,
#shop-modal,
#profile-modal,
#crop-modal,
#delete-account-modal,
#welcome-modal,
#newsletter-modal,
#line-modal,
#message-modal {
    display: none !important;
}

/* activeクラスが付いた時のみ表示 */
#city-modal.active,
#prefecture-modal.active,
#shop-modal.active,
#profile-modal.active,
#crop-modal.active,
#delete-account-modal.active,
#welcome-modal.active,
#newsletter-modal.active,
#line-modal.active,
#message-modal.active {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(5px);
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.3s ease;
}

/* 基本のmodalクラス（フォールバック） */
.modal {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.3s ease;
}

body > .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

body > .modal.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    animation: fadeIn 0.3s ease;
}

.modal > .modal-content {
    background: white;
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    max-height: calc(100vh - 4rem);
    position: relative;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
    margin: auto;
    overflow: hidden;
}

.modal-content.modal-small {
    max-width: 500px;
}

.modal-content.shop-detail-modal {
    max-width: 1000px;
    max-height: calc(100vh - 4rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-content #shop-modal-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

#shop-modal-content .modal-body,
.modal-content.shop-detail-modal .modal-body {
    overflow-y: auto;
    flex: 1 1 auto;
    min-height: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1.5rem;
}

#shop-modal-content:not(:has(.modal-body)) {
    overflow-y: auto;
    padding: 1.5rem;
}

.modal-content > .modal-header {
    padding: 1rem 2rem 1rem 2rem;
    border-bottom: 1px solid var(--cream);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-header > h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-content > .modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
    overscroll-behavior: contain;
}

.modal-content > .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cream);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    color: var(--text-dark);
    z-index: 1;
}

.modal-close:hover {
    background: var(--accent-coral);
    color: white;
    transform: rotate(90deg);
}

/* Message Modal Specific */
#message-modal .modal-content {
    max-width: 600px;
}

#message-modal #message-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.modal .modal-body > .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* ===========================
   Button Styles (詳細度優先版)
   =========================== */
.modal .btn,
header.header .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.modal .btn-primary {
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-sage));
    color: white;
}

.modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 180, 160, 0.4);
}

.modal .btn-secondary {
    background: var(--cream);
    color: var(--text-dark);
}

.modal .btn-secondary:hover {
    background: var(--warm-gray);
    color: white;
}

.modal .btn-danger {
    background: var(--error);
    color: white;
}

.modal .btn-danger:hover {
    background: #d32f2f;
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.modal .btn-success {
    background: linear-gradient(135deg, #00B900, #00A000);
    color: white;
}

.modal .btn-success:hover {
    background: linear-gradient(135deg, #00A000, #009000);
}

/* ===========================
   Toast Notifications (詳細度優先版)
   =========================== */
#toast-container > .toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#toast-container > .toast.show {
    transform: translateX(0);
}

#toast-container .toast > .toast-icon {
    font-size: 1.5rem;
}

#toast-container .toast > .toast-message {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
}

#toast-container > .toast.toast-success {
    border-left: 4px solid var(--success);
    background: linear-gradient(to right, rgba(129, 199, 132, 0.1), white);
}

#toast-container > .toast.toast-warning {
    border-left: 4px solid var(--warning);
    background: linear-gradient(to right, rgba(255, 183, 77, 0.1), white);
}

#toast-container > .toast.toast-error {
    border-left: 4px solid var(--error);
    background: linear-gradient(to right, rgba(229, 115, 115, 0.1), white);
}

#toast-container > .toast.toast-info {
    border-left: 4px solid var(--info);
    background: linear-gradient(to right, rgba(100, 181, 246, 0.1), white);
}

/* ===========================
   Pagination Component
   =========================== */
.pagination-container {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--cream);
}

.pagination-info-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--cream);
    border-radius: 12px;
    gap: 1.5rem;
}

.pagination-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.pagination-summary-text {
    font-weight: 500;
    white-space: nowrap;
}

.pagination-summary-divider {
    width: 1px;
    height: 20px;
    background: var(--warm-gray);
    opacity: 0.3;
}

.items-per-page-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.items-per-page-label {
    font-size: 0.85rem;
    color: var(--warm-gray);
    font-weight: 500;
}

.items-per-page-select {
    padding: 0.4rem 2rem 0.4rem 0.75rem;
    border: 1.5px solid white;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%23999' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    min-width: 80px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.items-per-page-select:hover {
    border-color: var(--accent-coral);
    box-shadow: 0 2px 6px rgba(232, 180, 160, 0.2);
}

.items-per-page-select:focus {
    outline: none;
    border-color: var(--accent-coral);
    box-shadow: 0 0 0 3px rgba(232, 180, 160, 0.15);
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: white;
    border: 1.5px solid var(--cream);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-dark);
    white-space: nowrap;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--accent-coral);
    color: white;
    border-color: var(--accent-coral);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(232, 180, 160, 0.25);
}

.pagination-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #e0e0e0;
}

.pagination-btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-arrow {
    font-size: 1.5rem;
    line-height: 1;
    font-weight: 300;
    display: inline-block;
}

.pagination-btn.first-btn .btn-arrow,
.pagination-btn.last-btn .btn-arrow {
    font-size: 1.3rem;
}

.pagination-pages {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    padding: 0 0.5rem;
}

.page-number {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1.5px solid var(--cream);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    color: var(--text-dark);
}

.page-number:hover {
    background: var(--accent-coral);
    color: white;
    border-color: var(--accent-coral);
    transform: scale(1.05);
}

.page-number.active {
    background: linear-gradient(135deg, var(--accent-coral), var(--accent-sage));
    color: white;
    border-color: transparent;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(232, 180, 160, 0.3);
}

.pagination-ellipsis {
    padding: 0 0.375rem;
    color: var(--warm-gray);
    font-size: 0.85rem;
    user-select: none;
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ===========================
   Responsive Design (詳細度優先版)
   =========================== */
@media (max-width: 768px) {
    /* Header Mobile */
    header.header .header-container > .mobile-menu-btn {
        display: flex !important;
        z-index: 1102;
    }
    
    header.header nav.nav-menu {
        display: none !important;
    }
    
    header.header .desktop-only {
        display: none !important;
    }
    
    header.header .container > .mobile-location-bar {
        display: none;
        z-index: 1101;
    }
    
    header.header {
        padding-bottom: 0;
    }
    
    header.header .container > .header-container {
        padding: 0.75rem 0;
    }
    
    header.header .header-logo > .logo-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    header.header .logo-text > .logo-title {
        font-size: 0.9rem;
    }
    
    header.header .logo-text > .logo-subtitle {
        display: none !important;
    }
    
    header.header #auth-section .btn-google {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    header.header #auth-section .btn-google > .btn-text {
        display: none !important;
    }
    
    header.header #auth-section .user-avatar {
        width: 36px;
        height: 36px;
    }
    
    /* Modal Mobile */
    body > .modal.active {
        padding: 0;
        align-items: flex-start;
    }
    
    .modal > .modal-content {
        width: 95%;
        max-height: calc(100vh - 2rem);
        margin: auto;
        border-radius: 16px;
    }

    .modal-content.shop-detail-modal {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    #shop-modal-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        min-height: 0;
        overflow: hidden;
    }
    
    #shop-modal-content .modal-body,
    .modal-content.shop-detail-modal .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 auto;
        min-height: 0;
        padding: 1rem;
    }
    
    #shop-modal-content:not(:has(.modal-body)) {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
    }
    
    .modal-content > .modal-header {
        padding: 1rem;
    }
    
    .modal-header > h2 {
        font-size: 1.25rem;
    }
    
    .modal-content > .modal-body {
        padding: 1rem;
    }
    
    .modal-content > .modal-close {
        width: 36px;
        height: 36px;
        top: 0.75rem;
        right: 0.75rem;
    }
    
    /* Welcome Modal Mobile */
    #welcome-modal .modal-welcome {
        width: 100%;
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    #welcome-modal .welcome-header {
        padding: 1.5rem 1rem 1rem;
        margin: -1rem -1rem 1rem -1rem;
    }
    
    #welcome-modal .welcome-header > h2 {
        font-size: 1.5rem;
    }
    
    #welcome-modal .line-qr {
        width: 150px;
        height: 150px;
    }
    
    #line-modal .line-qr-large {
        width: 180px;
        height: 180px;
    }
    
    /* Form Actions Mobile */
    .modal .form-actions {
        flex-direction: column;
    }
    
    .modal .form-actions > .btn {
        width: 100%;
    }
    
    /* Crop Container Mobile */
    #crop-modal .crop-container {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }
    
    /* Toast Mobile */
    #toast-container > .toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        transform: translateY(100px);
    }
    
    #toast-container > .toast.show {
        transform: translateY(0);
    }
    
    /* Pagination Mobile */
    .pagination-container {
        margin-top: 1.5rem;
        padding: 1rem 0;
    }
    
    .pagination-info-bar {
        padding: 0.625rem 0.75rem;
        gap: 0.75rem;
        flex-wrap: nowrap;
        justify-content: space-between;
        margin-bottom: 0.875rem;
    }
    
    .pagination-summary {
        flex: 1 1 auto;
        font-size: 0.8rem;
        gap: 0.625rem;
    }
    
    .pagination-summary-text {
        font-size: 0.8rem;
    }
    
    .pagination-summary-divider {
        display: none;
    }
    
    .items-per-page-group {
        flex: 0 0 auto;
        gap: 0.375rem;
    }
    
    .items-per-page-label {
        display: none;
    }
    
    .items-per-page-select {
        padding: 0.375rem 1.75rem 0.375rem 0.625rem;
        font-size: 0.8rem;
        min-width: 70px;
        background-position: right 0.375rem center;
    }
    
    .pagination-controls {
        gap: 0.375rem;
        justify-content: space-between;
        width: 100%;
        padding: 0 0.25rem;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.8rem;
    }
    
    .pagination-btn-icon {
        width: 42px;
        height: 42px;
        min-width: 42px;
    }
    
    .pagination-btn.first-btn,
    .pagination-btn.last-btn {
        display: none;
    }
    
    .pagination-pages {
        flex: 1 1 auto;
        justify-content: center;
        gap: 0.25rem;
        padding: 0 0.375rem;
        max-width: none;
    }
    
    .page-number {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
        border-radius: 6px;
    }
    
    .pagination-ellipsis {
        padding: 0 0.25rem;
        font-size: 0.8rem;
    }
}

/* スクロール無効化（メニュー開いた時） */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* ===========================
   タブレット対応 (768px - 1024px)
   =========================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .pagination-info-bar {
        padding: 0.625rem 0.875rem;
        gap: 1rem;
    }
    
    .pagination-summary {
        font-size: 0.85rem;
    }
    
    .items-per-page-label {
        display: none;
    }
    
    .pagination-btn {
        padding: 0.5rem 0.875rem;
    }
}

/* ===========================
   小型スマートフォン対応（375px以下）
   =========================== */
@media (max-width: 375px) {
    #welcome-modal .welcome-header > h2 {
        font-size: 1.3rem;
    }
    
    #welcome-modal .benefit-list {
        font-size: 0.85rem;
    }
    
    #welcome-modal .line-qr,
    #line-modal .line-qr-large {
        width: 140px;
        height: 140px;
    }
    
    .pagination-info-bar {
        padding: 0.5rem 0.625rem;
        gap: 0.625rem;
        border-radius: 10px;
    }
    
    .pagination-summary {
        font-size: 0.75rem;
    }
    
    .pagination-summary-text .full-text {
        display: none;
    }
    
    .pagination-summary-text .short-text {
        display: inline;
    }
    
    .items-per-page-select {
        padding: 0.375rem 1.5rem 0.375rem 0.5rem;
        font-size: 0.75rem;
        min-width: 60px;
    }
    
    .pagination-controls {
        gap: 0.25rem;
        padding: 0;
    }
    
    .pagination-btn-icon {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }
    
    .page-number {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .pagination-pages {
        gap: 0.125rem;
    }
}

/* ===========================
   超小型デバイス対応（320px以下）
   =========================== */
@media (max-width: 320px) {
    .pagination-info-bar {
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }
    
    .pagination-summary {
        justify-content: center;
    }
    
    .items-per-page-group {
        justify-content: center;
    }
    
    .items-per-page-select {
        width: 100%;
        max-width: 120px;
        margin: 0 auto;
    }
}

/* ===========================
   アクセシビリティ・フォーカス改善
   =========================== */
@media (hover: none) and (pointer: coarse) {
    .pagination-btn,
    .page-number,
    .items-per-page-select {
        position: relative;
        min-height: 44px;
    }
    
    .pagination-btn::after,
    .page-number::after {
        content: '';
        position: absolute;
        top: -4px;
        right: -4px;
        bottom: -4px;
        left: -4px;
    }
}


/* ===========================
   Modal Close Button - 修正版
   =========================== */

/* すべてのモーダルのcloseボタン共通スタイル */
.modal .modal-content > .modal-close,
.modal .modal-header > .modal-close,
#city-modal .modal-close,
#prefecture-modal .modal-close,
#shop-modal .modal-close,
#profile-modal .modal-close,
#crop-modal .modal-close,
#delete-account-modal .modal-close,
#welcome-modal .modal-close,
#newsletter-modal .modal-close,
#line-modal .modal-close,
#message-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--cream, #f5f5f5);
    border: none;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    line-height: 1;
    transition: all 0.3s ease;
    color: var(--text-dark, #333);
    z-index: 1;
    padding: 0;
    font-family: Arial, sans-serif;
    font-weight: normal;
}

/* モーダルヘッダー内のcloseボタンの位置調整 */
.modal .modal-header .modal-close {
    position: static;
    margin-left: auto;
    flex-shrink: 0;
}

/* ホバー時のスタイル */
.modal .modal-close:hover {
    background: var(--accent-coral, #e8b4a0) !important;
    color: white !important;
    transform: rotate(90deg);
}

/* ショップモーダル専用の位置調整 */
#shop-modal.modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
}

/* モバイル時のサイズ調整 */
@media (max-width: 768px) {
    .modal .modal-content > .modal-close,
    .modal .modal-header > .modal-close,
    #city-modal .modal-close,
    #prefecture-modal .modal-close,
    #shop-modal .modal-close,
    #profile-modal .modal-close,
    #crop-modal .modal-close,
    #delete-account-modal .modal-close,
    #welcome-modal .modal-close,
    #newsletter-modal .modal-close,
    #line-modal .modal-close,
    #message-modal .modal-close {
        width: 36px;
        height: 36px;
        top: 0.75rem;
        right: 0.75rem;
        font-size: 1.25rem;
    }
}

/* closeボタンのフォーカススタイル */
.modal .modal-close:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 180, 160, 0.3);
}

/* closeボタンのアクティブ時 */
.modal .modal-close:active {
    transform: scale(0.95);
}


/* ===========================
   Form Actions - Override global.css
   =========================== */

/* アカウント削除モーダルのform-actions調整 */
#delete-account-modal .form-actions {
    margin-top: 1.5rem;
}

/* モーダル内のform-actions（詳細度を上げてオーバーライド） */
.modal .modal-body > .form-actions,
.modal .modal-content .form-actions,
#profile-modal .form-actions,
#crop-modal .form-actions,
#newsletter-modal .form-actions,
#message-modal .form-actions,
#welcome-modal .form-actions {
    display: flex !important;
    gap: 1rem !important;
    justify-content: flex-end !important;
    margin-top: 0 !important;
}

/* プロフィールモーダル専用の調整 */
#profile-modal .profile-form > .form-actions {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ウェルカムモーダルのボタンエリア */
#welcome-modal .welcome-footer > .form-actions,
#welcome-modal .welcome-footer > .btn {
    margin-top: 0 !important; /* welcome-footerは既にpaddingがあるため */
}

/* メッセージフォーム内 */
#message-form > .form-actions {
    margin-top: 0 !important; /* フォーム内でgapで管理されているため */
}

/* モバイル時の調整 */
@media (max-width: 768px) {
    .modal .modal-body > .form-actions,
    .modal .modal-content .form-actions {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .modal .form-actions > .btn,
    .modal .form-actions > button {
        width: 100% !important;
    }
}

/* 特定のコンテキストでmargin-topを完全に無効化したい場合 */
.no-margin-top.form-actions,
.form-actions.no-margin-top {
    margin-top: 0 !important;
}



/* 利用規約モーダルのスタイル */
.modal-welcome-terms {
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.welcome-header {
    padding: 24px 24px 20px;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
}

.welcome-header h2 {
    font-size: 24px;
    color: #333;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.welcome-subtitle {
    color: #666;
    font-size: 14px;
    margin: 0;
}

#welcome-modal .terms-container {
    flex: 1 1 auto !important;
    overflow: hidden !important;
    padding: 20px 24px !important;
    height: 300px !important; /* 固定高さを維持 */
    min-height: 0 !important; /* flexboxの縮小を許可 */
}

#welcome-modal .terms-scroll-area {
    height: 100% !important;
    overflow-y: auto !important; /* scrollからautoに変更 */
    overflow-x: hidden !important;
    padding-right: 10px !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #444 !important;
    position: relative !important; /* 追加 */
}

#welcome-modal .terms-scroll-area::-webkit-scrollbar {
    width: 8px !important; /* 少し太く */
    display: block !important;
}

#welcome-modal .terms-scroll-area::-webkit-scrollbar-track {
    background: #f1f1f1 !important;
    border-radius: 4px !important;
    box-shadow: inset 0 0 3px rgba(0,0,0,0.1) !important; /* 視認性向上 */
}

#welcome-modal .terms-scroll-area::-webkit-scrollbar-thumb {
    background: #999 !important; /* 少し濃く */
    border-radius: 4px !important;
    box-shadow: 0 0 2px rgba(0,0,0,0.2) !important; /* 影を追加 */
}

#welcome-modal .terms-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #777 !important;
}

/* Firefox用のスクロールバー設定 */
#welcome-modal .terms-scroll-area {
    scrollbar-width: thin !important;
    scrollbar-color: #999 #f1f1f1 !important;
}

.terms-scroll-area h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #333;
}

.terms-scroll-area h4 {
    font-size: 14px;
    margin: 20px 0 10px 0;
    color: #333;
    font-weight: 600;
}

.terms-date {
    color: #888;
    font-size: 12px;
    margin-bottom: 20px;
}

.consent-section {
    padding: 20px 24px;
    background: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.consent-checkboxes {
    margin-bottom: 16px;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    cursor: pointer;
}

.consent-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    margin-top: 2px;
    cursor: pointer;
}

.consent-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
}

.consent-text a {
    color: #4285F4;
    text-decoration: underline;
}

.required-mark {
    display: inline-block;
    background: #ff4444;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 600;
}

.optional-mark {
    display: inline-block;
    background: #888;
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.email-preview {
    display: flex;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.email-icon {
    font-size: 24px;
    margin-right: 12px;
}

.email-info {
    flex: 1;
}

.email-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.email-address {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.welcome-footer {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    background: white;
}

.btn-agree {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-agree:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-agree.enabled {
    background: linear-gradient(135deg, #FF6B35, #FF8C42); /* オレンジグラデーション */
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
    animation: pulse 2s infinite;
}

.btn-agree.enabled:hover {
    background: linear-gradient(135deg, #FF8C42, #FFA500);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

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

.footer-note {
    margin: 12px 0 0;
    font-size: 12px;
    color: #888;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .modal-welcome-terms {
        max-width: 100%;
        width: 95%;
        max-height: 90vh;
    }
    
    .terms-container {
        height: 250px; /* モバイルでも固定高さ */
        padding: 16px;
    }
    
    .welcome-header {
        padding: 20px 16px 16px;
    }
    
    .consent-section {
        padding: 16px;
    }
    
    .welcome-footer {
        padding: 16px;
    }
}

/* メール解除情報の表示 */
.unsubscribe-info {
    display: flex;
    align-items: center;
    margin-top: 8px;
    margin-left: 28px;
    padding: 8px 12px;
    background: #e3f2fd;
    border-radius: 6px;
    font-size: 12px;
    color: #1976d2;
}

.unsubscribe-info .info-icon {
    margin-right: 6px;
    font-size: 14px;
}

.unsubscribe-info .info-text {
    line-height: 1.4;
}

/* モバイル対応 */
@media (max-width: 768px) {
    .unsubscribe-info {
        margin-left: 0;
        font-size: 11px;
    }
}