.tab-search {
    display: flex;
    flex-wrap: wrap;
    gap: 0 10px;
}
.tab-search > label {
    flex: 1 1;
    order: -1;
    padding: 1.5em 1em 1em;
    border-radius: 10px 10px 0 0;
    background-color: #EBF6E8;
    border: 1px solid #EBF6E8;
    color: #333;
    font-size: 1.17em;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
}
.tab-search > label:hover {
    background-color: #33B29A;
    border: 1px solid #33B29A;
    color: #fff;
}
.tab-search .chk_tab {
    display: none;
}
.tab-search > div {
    display: none;
    width: 100%;
    padding: 0 1.5em 1.5em;
    background-color: #fff;
}
.tab-search > div.tab-content {
    padding: 1em 0 1.5em;
}
.tab-search label:has(:checked) {
    background-color: #33B29A;
    border: 1px solid #33B29A;
    color: #fff;
}
.tab-search label:has(:checked) + div {
    display: block;
}
@media screen and (max-width: 768px) {
    .tab-search {
        padding: 1.5em 0;
    }
    .tab-search > div {
        padding: 0 0 0;
    }
}

.map-title, 
.condition-search-title {
    position: relative;
    font-size: 1.25rem;
    font-weight: bold;
    color: #33B29A;
    margin: 3em 0 1em;
    padding: 0 0 0 56px;
}
.map-title::before {
    position: absolute;
    top: -15px;
    left: 0;
    content: '';
    display: inline-block;
    width: 50px;
    height: 50px;
    background-image: url(/assets/images/pharmacy/icon-mappin.png);
    background-size: contain;
    vertical-align: middle;
}
.condition-search-title::before {
    position: absolute;
    top: -10px;
    left: 0;
    content: '';
    display: inline-block;
    width: 44px;
    height: 44px;
    background-image: url(/assets/images/pharmacy/icon-glass.png);
    background-size: contain;
    vertical-align: middle;
}
p.search-lead {
    font-size: 22px;
    font-weight: bold;
    margin: 3rem 2rem 1rem;
}
@media screen and (max-width: 768px) {
    p.search-lead {
        margin: 3rem 0.5rem 1rem;
    }
}

.condition-search-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 32px;
}

.form-section {
    margin-bottom: 24px;
}
.form-section-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}
.form-section-title::before {
    content: "●";
    color: #33B29A;
    margin-right: 8px;
    font-size: 16px;
}
.form-group {
    margin-bottom: 20px;
}
.form-label {
    display: block;
    font-weight: 500;
    color: #000000;
    margin-bottom: 8px;
}
.form-input,
.form-select {
    /*width: 100%;*/
    width: 50% !important;
    padding: 12px 16px;
    border: 1.5px solid #dee2e6;
    transition: all 0.2s;
    background-color: #fff;
}
.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #477DCA;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}
.form-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' 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'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* 営業日・対応サービスセクション */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}
.weekday-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.checkbox-item,
.weekday-item {
    position: relative;
}
.checkbox-item input[type="checkbox"],
.weekday-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.checkbox-label {
    display: block;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    color: #000000;
    user-select: none;
    text-align: center;
}
.weekday-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 48px;
    background-color: #f8f9fa;
    border: 1.5px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: #000000;
    user-select: none;
}
.checkbox-item input[type="checkbox"]:checked + .checkbox-label,
.weekday-item input[type="checkbox"]:checked + .weekday-label {
    background-color: #33B29A;
    border-color: #33B29A;
    color: white;
    font-weight: 500;
}
.checkbox-label:hover,
.weekday-label:hover {
    background-color: #F3DF63;
}
.checkbox-item input[type="checkbox"]:checked + .checkbox-label:hover,
.weekday-item input[type="checkbox"]:checked + .weekday-label:hover {
    background-color: #33B29A;
}

.search_condition {
    background-color: #EBF6E8;
    padding: 1rem;
    margin-bottom: 1em;
}
.search_condition .search_title {
    position: relative;
    font-size: 1.25rem;
    font-weight: bold;
    color: #33B29A;
    margin: 1em 0;
    padding: 0 0 0 50px;
}
.search_condition .search_title span {
    color: #000;
    margin-left: 2rem;
}
.search_condition a.button-back {
    display: block;
    width: max-content;
    padding: 0.2rem 0.5rem 0 0;
    font-size: 1rem;
    color: #000;
    margin: 0.5rem auto 0.5rem;
}
.search_condition a.button-back:hover {
    text-decoration: underline;
    opacity: 0.7;
}
.search_condition a.button-back::before {
    color: #33B29A;
    content: "navigate_next";
    font-family: "Material Icons";
    font-weight: normal;
    font-style: normal;
    font-size: 2em;
    line-height: 1;
    vertical-align: middle;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    margin-bottom: 0.2rem;
    text-decoration: none;
}
/* 検索ステータス */
.search-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 5px;
    margin-bottom: 10px;
}
.search-count {
    font-weight: bold;
    font-size: 1.1rem;
    margin: 0;
}
.update-date {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.list-grid-table-container {
    width: 100%;
    border: 1px solid #33B29A; 
    margin-bottom: 30px;
    box-sizing: border-box;
}

.list-grid-header, .list-grid-item {
    display: grid;
    /* 薬局名:1.2 / 住所:2 / 電話番号:0.8 の比率で固定 */
    grid-template-columns: 1.2fr 2fr 0.8fr; 
    width: 100%;
}

.list-grid-header {
    background-color: #EBF6E8;
    border-bottom: 1px solid #33B29A;
}

.list-grid-item {
    border-bottom: 1px solid #33B29A;
}

.list-grid-item:last-child { border-bottom: none; }

.list-grid-item-title, .list-grid-data {
    border-right: 1px solid #33B29A;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.list-grid-item-title:last-child, .list-grid-data:last-child {
    border-right: none;
}

.list-grid-item-title {
    padding: 12px 16px;
    font-weight: bold;
    justify-content: center;
}

.detail-link, .data-text {
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
    font-size: 0.9375rem;
    line-height: 1.4;
    text-decoration: none;
    display: block;
}

.detail-link {
    text-decoration: underline;
    font-weight: bold;
}
.detail-link:hover {
    color: #004499;
    text-decoration: none;
}

.col-tel .data-text {
    text-align: center;
}

.pharmacy .form-button-list.mb-30 {
    margin-bottom: 30px;
}

/* 補助クラス */
.u-text-right { text-align: right; }
.u-mt-30 { margin-top: 30px; }

/* 基本テーブル */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #33B29A;
}
.detail-table th, .detail-table td {
  border: 1px solid #33B29A;
  padding: 12px 16px;
  font-size: 0.9375rem;
  line-height: 1.6;
}
.detail-table th {
  background: #EBF6E8;
  width: 300px;
  text-align: center;
}
.detail-table td {
    text-align: left;
}

/* 開局時間リスト */
.time-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.time-list li span {
  display: inline-block;
  width: 3em;
  font-weight: bold;
}

/* 2列グリッド */
.detail-grid-table-container {
    display: grid;
    grid-template-columns: 300px 1fr 300px 1fr;
    border-top: 1px solid #33B29A;
    border-left: 1px solid #33B29A;
}
.detail-grid-table-container .grid-item {
    display: contents;
}
.detail-grid-table-container .grid-item dt,
.detail-grid-table-container .grid-item dd {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-right: 1px solid #33B29A;
    border-bottom: 1px solid #33B29A;
    box-sizing: border-box;
    min-height: 4em; /* 最低限の高さ（必要に応じて調整） */
    font-size: 0.9375rem;
    line-height: 1.6;
}
.detail-grid-table-container .grid-item dt {
    width: 300px;
    background: #EBF6E8;
    font-weight: bold;
    justify-content: center; 
    text-align: center;
}
.detail-grid-table-container .grid-item dd {
    background: #fff;
    justify-content: center; 
    font-size: 0.9375rem;
    line-height: 1.4;
}

#pharmacy_map {
    height: 400px;
    width: 100%;
}

/* PCの場合（デフォルト設定） */
.detail-table td a[href^="tel:"] {
    color: inherit; 
    text-decoration: none; 
    pointer-events: none; 
    cursor: default; 
}

#pharmacy_map {
    margin-bottom: 30px;
}
.detail-table, 
.detail-grid-table-container {
    margin-bottom: 50px;
}

/* 戻るボタン */
.btn-back-container {
    text-align: right;
}
.btn-back {
    display: inline-block;
    padding: 10px 20px;
    background-color: #eee;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
}

/* 日曜・祝日当番薬局アコーディオン */
.duty-accordion {
    margin-bottom: 10px;
    border-radius: 5px;
    border: 2px solid #f5f5f5;
    overflow: hidden;
}
.duty-accordion:first-of-type {
    margin-top: 1em;
}
.duty-accordion:last-of-type {
    margin-bottom: 3em;
}
.duty-accordion summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 1em 1em;
    color: #33B29A;
    background-color: #f5f5f5;
    font-weight: bold;
    font-size: 1.17em !important;
    cursor: pointer;
}
.duty-accordion summary::-webkit-details-marker {
    display: none;
}
.duty-accordion summary::after {
    transform: translateY(-25%) rotate(45deg);
    width: 7px;
    height: 7px;
    margin-left: 10px;
    border-bottom: 3px solid #33B29A;
    border-right: 3px solid #33B29A;
    content: '';
    transition: transform 0.3s ease;
}
.duty-accordion[open] summary::after {
    transform: rotate(225deg);
}
.duty-accordion .list-grid-table-container {
    transform: translateY(-10px);
    opacity: 0;
    margin: 0 1em;
    color: #333333;
    background-color: #ffffff;
    transition: transform .5s, opacity .5s;
}
.duty-accordion[open] .list-grid-table-container {
    transform: none;
    opacity: 1;
    margin: 1em 1em 1em;
}
.duty-accordion:not([open]) {
    margin: 0 0 10px;
}
.duty-accordion .list-grid-table-container {
    width: calc(100% - 2em);
}
@media screen and (max-width: 768px) {
    .duty-accordion .list-grid-table-container {
        display: flex;
        flex-direction: column;
        gap: 15px;
        background: transparent;
    }
    .duty-accordion .list-grid-data {
        background-color: #ffffff;
    }
    .duty-accordion .list-grid-item {
        margin-bottom: 0;
    }
}

@media screen and (max-width: 768px) {
    .form-input,
    .form-select {
        width: 100% !important;
    }
    .condition-search-container {
        padding: 16px 10px;
    }

    .list-grid-table-container { border: none; }
    .list-grid-header { display: none; }

    .list-grid-item {
        display: flex;
        flex-direction: column;
        border: 1px solid #28a745!important;
        margin-bottom: 15px;
        box-sizing: border-box;
    }

    .list-grid-data {
        border-right: none !important;
        border-bottom: 1px solid #28a745;
        width: 100% !important;
        display: flex;
        align-items: stretch;
        min-height: auto;
    }
    .list-grid-data:last-child { border-bottom: none; }

    .list-grid-data::before {
        content: attr(data-label);
        background-color: #ebf6ec;
        font-weight: bold;
        flex: 0 0 100px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
        border-right: 1px solid #28a745;
        box-sizing: border-box;
    }

    .detail-link, .data-text {
        justify-content: flex-start !important;
        text-align: left !important;
        display: flex;
        align-items: center;
        width: 100%;
        box-sizing: border-box;
    }

    .detail-table th, 
    .detail-table td {
        display: block;
        width: 100%;
        box-sizing: border-box;
    }
    .detail-table th {
        border-bottom: none;
        text-align: left;
    }

    /* 2. Grid：2列（項目70%：値30%）にする */
    .detail-grid-table-container {
        grid-template-columns: 70% 30%;
    }

    .detail-grid-table-container .grid-item {
        width: auto;
    }

    .detail-grid-table-container .grid-item dt {
        width: auto;
    }

    .detail-table td a[href^="tel:"] {
        pointer-events: auto;
        cursor: pointer;
    }

    #pharmacy_map {
        height: 400px;
        width: 100%;
        margin-bottom: 1em;
    }
}



.duty-cal-wrap{
    background:#f5f5f5;
    border-radius:8px;
    padding:12px;
}
.duty-cal-nav {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.duty-cal-title {
    font-weight:bold;
    color:#333;
    font-size: 1.125rem;
}
.ym-num {
    font-size: 1.3em;
    font-weight: bold;
    margin-right: 4px;
}
.ym-num:last-child {
    margin-left: 4px;
}
.duty-nav-btn{
    background-color: transparent;
    padding:8px 10px;
    cursor:pointer;
    border : none;
}
.duty-nav-btn:disabled{
    opacity:.2;
    cursor:not-allowed;
}
.duty-nav-btn.prev,
.duty-nav-btn.next
{
    display: block;
    display: inline-block;
    font-size: 2.125rem;
    line-height: 1.2;
    border-bottom: transparent;
}
.duty-nav-btn.prev::before {
    color: #000000;
    content: "navigate_before";
    font-family: "Material Icons";
    font-weight: normal;
    font-style: normal;
    font-size: 1.5em;
    line-height: 1;
    vertical-align: middle;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "liga";
}
.duty-nav-btn.next::before {
    color: #000000;
    content: "navigate_next";
    font-family: "Material Icons";
    font-weight: normal;
    font-style: normal;
    font-size: 1.5em;
    line-height: 1;
    vertical-align: middle;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: "liga";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "liga";
}
.duty-cal table {
    width:100%;
    border-collapse: collapse;
    background:#fff;
    border:1px solid #ddd;
    overflow:hidden;
}
.duty-cal th,
.duty-cal td {
    border:1px solid #eee;
    //color:#95989A;
    text-align:center;
    padding:8px 4px;
    font-size:.95em;
    height: 50px;
    vertical-align: middle;
    font-weight: bold;
}
.duty-cal th {
    background:#fafafa;
    font-weight:bold;
}
.duty-cal .clickable button.daybtn {
    color:#d33;
}
.duty-cal .muted {
    color:#aaa;
    background:#fcfcfc;
}
.duty-cal td.has-duty {
    background:#fff0f0;
}
.duty-cal td.selected {
    outline:3px solid #d33;
    outline-offset:-3px;
}
.duty-cal button.daybtn {
    width:100%;
    border:0;
    background:transparent;
    cursor:pointer;
    font:inherit;
    padding:8px 0;
}
.duty-cal td.clickable:hover {
    background: #ffe3e3;
    cursor: pointer;
}
.duty-cal td.clickable button.daybtn {
    width: 100%;
    height: 100%;
    background: transparent;
    border: 0;
    font-weight:bold;
    cursor:pointer;
}
.duty-result
{
    margin-top:1em;
    margin-bottom:1em;
}
.duty-result-title
{
    font-weight:bold;
    margin-top:2em;
    margin-bottom:1em;
    color:#333;
    font-size: 1.125rem;
}
.duty-result-title:not(:empty)::before {
    content: "";
    display: inline-block;
    width: 15px;
    height: 15px;
    background: #d33;
    margin-right: 8px;
    vertical-align: middle;
}
.duty-result .list-grid-table-container {
    margin-bottom: 0;
}
.duty-cal td.today{
    position: relative;
    border: solid 3px #EBF6E8;
    font-weight: bold;
}
.duty-calendar-note{
    margin-top: 1em;
    font-size: 0.9em;
    font-weight: bold;
    padding: 0 12px;
}
.note-color-box{
    display:inline-block;
    width:30px;
    height:30px;
    background:#fff0f0;
    border: 1px solid #eee;
    margin-right:6px;
    vertical-align:middle;
    border-radius:3px;
}
.duty-result-note {
    display: none;
    margin-top: 15px;
    padding: 12px 12px 0;
    font-size: 0.9em;
    border-radius: 4px;
}
