* {
    box-sizing: border-box;
    }
    body {
    overflow-x: hidden;
    }
    /* project.php固有のスタイル */
    .project-container {
    width: 100%;
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 20px; 
    }
    .project-container .breadcrumb {
    margin: 0 0 20px 0;
    font-size: 14px;
    }
    
    /* H1 タイトルのスタイル */
    .project-page-header { 
    background: #fff; 
    padding: 0 0 10px 0; /* 修正: 20px -> 10px */
    margin-bottom: 10px; /* 修正: 20px -> 10px */
    }
    .project-page-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 0;
    padding-bottom: 12px;
    border-bottom: 3px solid #0066cc;
    color: #1a1a1a;
    position: relative;
    }
    .project-page-title::before {
    content: "";
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: #0052a3;
    }
    
    .project-main-layout { 
    display: grid; 
    grid-template-columns: 240px 1fr; 
    gap: 20px; 
    position: relative;
    }
    
    /* サイドバースタイル */
    .sidebar { 
    background: #3b5998;
    padding: 0;
    border-radius: 4px;
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    z-index: 900;
    }
    .sidebar::-webkit-scrollbar { width: 6px; }
    .sidebar::-webkit-scrollbar-track { background: #f1f1f1; }
    .sidebar::-webkit-scrollbar-thumb { background: #888; border-radius: 3px; }
    .sidebar-header {
    background: #3b5998;
    color: #fff;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    position: relative;
    }
    
    .sidebar-header.collapsible::after {
    content: '▼';
    position: absolute;
    right: 20px;
    transition: transform 0.3s;
    }
    .sidebar-header.collapsible.collapsed::after {
    transform: rotate(-90deg);
    }
    
    .facet-sections { 
    background: #fff;
    border-radius: 0 0 4px 4px;
    transition: max-height 0.3s ease;
    }
    .facet-sections.collapsed { 
    max-height: 0;
    overflow: hidden;
    }
    .facet-section { 
    padding: 0;
    border-bottom: 1px solid #e0e0e0;
    }
    .facet-section:last-child {
    border-bottom: none;
    }
    
    /* 個別ファセットのアコーディオン対応 */
    .facet-title { 
    font-weight: 600; 
    color: #333;
    padding: 12px 16px;
    background: #f8f9fa;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    }
    
    /* アコーディオンの矢印 */
    .facet-title::after {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg); /* 開いている状態（V） */
    transition: transform 0.3s ease;
    margin-left: 10px;
    margin-bottom: 2px;
    }
    /* 閉じている時の矢印 */
    .facet-title.collapsed::after {
    transform: rotate(-45deg); /* 閉じている状態（>） */
    margin-bottom: -2px;
    }
    
    .facet-items { 
    padding: 4px 0; 
    display: block;
    }
    /* 閉じている時は非表示 */
    .facet-items.collapsed {
    display: none;
    }
    
    .facet-item { 
    border-left: 3px solid transparent;
    transition: all 0.2s;
    }
    .facet-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    color: #555;
    font-size: 13px;
    }
    .facet-item:hover {
    background: #f0f0f0;
    border-left-color: #3b5998;
    }
    .facet-item.active {
    background: #e8f0fe;
    border-left-color: #0066cc;
    }
    .facet-item.active a {
    color: #0066cc;
    font-weight: 600;
    }
    .facet-count {
    background: #e0e0e0;
    color: #666;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    }
    .facet-item.active .facet-count {
    background: #0066cc;
    color: #fff;
    }
    
    .btn-reset-area {
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    text-align: center;
    }
    .btn-reset {
    display: block;
    width: 100%;
    padding: 8px 0;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    border-radius: 4px;
    border: 1px solid #ccc;
    transition: all 0.2s;
    }
    .btn-reset:hover {
    background: #e0e0e0;
    text-decoration: none;
    color: #333;
    }
    
    #back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #0066cc;
    color: #fff;
    border-radius: 50%;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    cursor: pointer;
    display: none;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: all 0.3s;
    opacity: 0.9;
    }
    #back-to-top:hover {
    background: #0052a3;
    transform: translateY(-3px);
    opacity: 1;
    }
    #back-to-top::before {
    content: '▲';
    font-size: 18px;
    }
    
    .jobs-main-column {
    width: 100%;
    max-width: 100%;
    }
    .jobs-list { 
    background: #fff;
    border-radius: 4px;
    padding: 16px;
    width: 100%;
    max-width: 100%;
    }
    .jobs-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e0e0e0;
    }
    .jobs-count { font-size: 14px; color: #666; }
    
    .sort-select { 
    padding: 6px 30px 6px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: #fff 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="%23333" d="M6 9L1 4h10z"/></svg>') no-repeat right 8px center;
    cursor: pointer;
    /* 修正: ブラウザ標準の矢印を消す */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    }
    /* IE用の矢印削除 */
    .sort-select::-ms-expand {
    display: none;
    }
    
    .job-card { 
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 16px;
    margin-bottom: 16px;
    background: #fff;
    transition: box-shadow 0.2s;
    width: 100%;
    max-width: 100%;
    }
    .job-card:hover { 
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .job-badges { 
    display: flex; 
    gap: 6px; 
    margin-bottom: 10px;
    flex-wrap: wrap;
    }
    .badge { 
    padding: 3px 10px; 
    border-radius: 3px; 
    font-size: 11px; 
    font-weight: 600;
    border: 1px solid;
    }
    .badge-new { background: #fff; color: #dc3545; border-color: #dc3545; }
    .badge-tag { background: #e8f4f8; color: #0088cc; border-color: #0088cc; }
    .job-title { 
    font-size: 16px; 
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
    }
    .job-title::before { display: none; }
    .job-title a { color: #0066cc; }
    .job-info-table { 
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    border: 1px solid #d0d0d0;
    box-shadow: none;
    table-layout: fixed;
    }
    .job-info-table th, .job-info-table td {
    padding: 12px 14px;
    border: 1px solid #d0d0d0;
    font-size: 13px;
    vertical-align: middle;
    }
    .job-info-table th { 
    background: #3b5998;
    color: #fff;
    font-weight: 600;
    width: 140px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #d0d0d0;
    min-width: 140px;
    max-width: 140px;
    white-space: nowrap;
    }
    .job-info-table td { background: #fff; width: calc((100% - 280px) / 2); min-width: 0; word-wrap: break-word; overflow-wrap: break-word; }
    .price-highlight { color: #e67e22; font-weight: 700; font-size: 15px; }
    .job-section { margin-bottom: 12px; }
    .job-section-title { 
    font-size: 13px;
    font-weight: 600;
    color: #0066cc;
    margin-bottom: 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e0e0e0;
    }
    .job-section-content { 
    font-size: 13px;
    line-height: 1.7;
    color: #333;
    }
    .job-section-content ul { margin: 0; padding-left: 20px; }
    .job-section-content li { margin-bottom: 4px; line-height: 1.6; }
    .job-actions { 
    display: flex; 
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    justify-content: center;
    }
    .btn { 
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    display: inline-block;
    transition: all 0.2s;
    }
    .btn-bookmark { background: #fff; color: #666; border: 1px solid #ccc; }
    .btn-bookmark:hover { background: #f8f9fa; }
    .btn-primary { background: #0066cc; color: #fff; }
    .btn-primary:hover { background: #0052a3; text-decoration: none; }
    
    .pagination-area { 
    display: flex; 
    justify-content: center; 
    gap: 8px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    }
    .pagination-area a, .pagination-area .current, .pagination-area .pagination-ellipsis { 
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0066cc;
    font-size: 13px;
    min-width: 36px;
    text-align: center;
    display: inline-block;
    }
    .pagination-area .pagination-ellipsis {
    border: none;
    color: #999;
    cursor: default;
    padding: 6px 8px;
    }
    .pagination-area .pagination-nav {
    font-weight: bold;
    background: #f8f9fa;
    }
    .pagination-area .pagination-nav:hover {
    background: #e9ecef;
    }
    .pagination-area .current { 
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
    font-weight: 600;
    }
    .pagination-area a:hover { 
    background: #f0f0f0;
    text-decoration: none;
    }
    
    @media (max-width: 768px) {
    .project-main-layout { grid-template-columns: 1fr; }
    .sidebar { position: static; max-height: none; }
    .jobs-header { flex-direction: column; gap: 10px; align-items: flex-start; }
    .sort-select { width: 100%; max-width: 100%; }
    
    body {
    overflow-x: hidden;
    width: 100%;
    }
    
    .project-container {
    padding: 12px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    }
    
    .project-main-layout {
    width: 100%;
    max-width: 100%;
    }
    
    .jobs-main-column {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    }
    
    .jobs-list {
    padding: 8px !important;
    width: 100%;
    max-width: 100%;
    }
    
    .job-card {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    padding: 12px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    }
    
    .job-title {
    font-size: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    }
    
    .job-info-table {
    display: block;
    table-layout: auto !important;
    }
    .job-info-table tbody {
    display: block;
    }
    .job-info-table tr {
    display: grid !important;
    grid-template-columns: 120px 1fr !important;
    margin-bottom: -1px;
    }
    .job-info-table th,
    .job-info-table td {
    display: block !important;
    padding: 10px 12px;
    border-bottom: 1px solid #d0d0d0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    }
    .job-info-table th {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 120px !important;
    min-width: 120px !important;
    max-width: 120px !important;
    }
    .job-info-table td {
    width: auto !important;
    }
    
    .pagination-area {
    gap: 4px;
    padding: 12px 0;
    margin-top: 16px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    }
    .pagination-area a,
    .pagination-area .current {
    padding: 8px 10px;
    min-width: 32px;
    font-size: 12px;
    }
    }