/* CareMap 独自の画面部品 */
.panel-inner { max-width: 760px; margin: 0 auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 14px; }
.card { scroll-margin-top: 96px; }
.field { margin: 12px 0; }
input[type="search"] {
  width: 100%; min-height: 50px; padding: 8px 12px; font-size: 1rem; font-family: inherit; color: inherit;
  border: 2px solid var(--line); border-radius: 10px; background: #fff; -webkit-appearance: none; appearance: none;
}
input[type="search"]:focus { border-color: var(--theme); }
input[type="search"]:focus-visible, .seg-btn:focus-visible, .res-open:focus-visible, .pick-main:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.notice.warn { background: #fdf1ec; border-color: #e3a487; }

/* 押しボタンの選択 */
.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); gap: 8px; }
.seg-wrap { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.seg-btn {
  min-height: 48px; border: 2px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700; cursor: pointer;
  padding: 6px 8px; line-height: 1.3; touch-action: manipulation; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: .95rem;
}
.seg-btn[aria-pressed="true"] { border-color: var(--theme); background: var(--theme-light); color: var(--theme-dark); }
.seg-btn[aria-pressed="true"] .seg-label::before { content: "✓ "; }
.seg-group .seg-btn { font-size: .88rem; }

/* さがす：スマホは縦一列／PC は左に条件・右に一覧 */
.find-layout { max-width: 1280px; margin: 0 auto; padding: 14px 12px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.find-side { display: flex; flex-direction: column; gap: 12px; }
.filter-card .card-title { margin-bottom: 0; }
.data-card p { margin: .2em 0; }
.data-asof { font-size: .9rem; }
@media (min-width: 960px) {
  .find-layout { grid-template-columns: 400px minmax(0, 1fr); align-items: start; padding: 16px 20px; gap: 20px; }
  .find-side { position: sticky; top: 92px; max-height: calc(100vh - 190px); overflow: auto; padding-bottom: 4px; }
  .panel-inner { max-width: 860px; }
}

.res-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.res-count { font-size: 1.05rem; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.trial-tag { font-size: .74rem; padding: 2px 8px; border-radius: 6px; background: #fff8e1; border: 1px solid #e8c766; color: #6b5200; font-weight: 700; }
.res-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.res-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
.res-card.is-picked { border: 2px solid var(--theme); }
.res-open {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; text-align: left; padding: 10px 12px;
  border: 0; background: none; cursor: pointer; min-height: 64px; font: inherit; color: inherit;
}
.res-open:hover { background: var(--bg-soft); }
.res-name { font-weight: 700; font-size: 1.02rem; overflow-wrap: anywhere; color: var(--theme-dark); }
.res-sub { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.res-tags { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0; }
.chip { font-size: .74rem; padding: 1px 8px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); line-height: 1.5; }
.chip-kaigo { background: var(--theme-light); border-color: var(--theme-mid); color: var(--theme-dark); font-weight: 700; }
.chip-shogai { background: #f1ecf8; border-color: #d4c6ea; color: #4f3a7a; font-weight: 700; }
.chip-area { background: #fff; }
.res-act { display: flex; align-items: center; padding: 8px 10px 8px 0; }
.pick-btn { white-space: nowrap; }
.pick-btn.is-on { background: var(--theme); color: #fff; }
.more-btn { margin-top: 12px; }
.empty { text-align: center; }

/* くわしく */
.detail .res-tags { margin-bottom: 4px; }
.detail-pick { margin: 10px 0; }
.detail-pick .btn { width: 100%; min-height: 54px; }
.detail-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-bottom: 12px; }
@media (min-width: 640px) { .detail-actions { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); } }
.dl { margin: 0 0 12px; border-top: 1px solid var(--line); }
.dl-row { display: grid; grid-template-columns: 8.5em minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.dl dt { font-weight: 700; color: var(--muted); font-size: .9rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.url-link { color: var(--theme-dark); overflow-wrap: anywhere; }
@media (max-width: 480px) { .dl-row { grid-template-columns: minmax(0, 1fr); gap: 0; } }

/* 紹介用の一覧 */
.pick-list { list-style: none; margin: 6px 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pick-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 6px 8px; }
.pick-main { display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 0; background: none; cursor: pointer; padding: 4px; font: inherit; color: inherit; min-width: 0; }
.pick-ops { display: flex; gap: 4px; }
.pick-ops .btn { min-width: 44px; padding: 4px 8px; }
.row-no {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: none;
  border-radius: 50%; background: var(--theme-light); color: var(--theme-dark); font-weight: 700; font-size: .9rem;
}
.preview { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.preview .preview-img { width: 100%; max-width: 420px; margin: 0; box-shadow: 0 1px 6px rgba(0,0,0,.12); }
.row-buttons { margin: 8px 0; }
.source { border-left: 4px solid var(--theme-mid); padding: 2px 0 2px 10px; margin: 10px 0; }
.source p { margin: .15em 0; }

.copy-area { min-height: 240px; font-size: .9rem; width: 100%; font-family: inherit; }
.toast { width: max-content; text-align: center; }
.app-footer { padding: 6px 16px 18px; }
.nowrap { white-space: nowrap; }
.series-foot { text-align: center; color: var(--muted); font-size: .8rem; letter-spacing: .04em; margin: 0; }

@media (max-width: 400px) {
  .app-header { flex-wrap: nowrap; gap: 6px; }
  .brand { gap: 6px; min-width: 0; }
  .app-header { padding-left: 10px; padding-right: 10px; }
  .brand-icon { width: 26px; height: 26px; }
  .brand-name { font-size: 1.02rem; letter-spacing: 0; }
  .brand-kana { font-size: .7rem; white-space: nowrap; }
  #btn-help { padding: 4px 8px; font-size: .78rem; white-space: nowrap; flex: none; }
  .res-act { padding-right: 6px; }
  .pick-btn.btn-small { padding: 4px 8px; font-size: .84rem; }
  .pick-row { grid-template-columns: auto minmax(0, 1fr); }
  .pick-ops { grid-column: 1 / -1; justify-content: flex-end; }
}

/* 種類でしぼる（折りたたみ）・スマホと PC の出し分け */
.type-box { border-top: 1px solid var(--line); margin: 8px 0 12px; }
.type-box summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; color: var(--theme-dark); }
.sp-only { margin-top: 14px; }
@media (min-width: 960px) { .sp-only { display: none; } }
@media (max-width: 959px) { .pc-only { display: none; } }
@media (min-width: 960px) { .sp-jump { display: none; } .filter-card .row-buttons { grid-template-columns: 1fr; } }
#find-main { scroll-margin-top: 92px; }

/* 介護保険以外のサービス・活動（外部ページへのリンク） */
.other-card .card-title { margin-bottom: 2px; }
.other-link { justify-content: flex-start; text-align: left; gap: 10px; margin: 8px 0 4px; padding: 8px 12px; }
.other-area { flex: none; font-size: .78rem; padding: 2px 8px; border-radius: 10px; background: var(--theme-light); color: var(--theme-dark); }
.other-main { display: flex; flex-direction: column; min-width: 0; }
.other-name { overflow-wrap: anywhere; }
.other-main small { font-weight: normal; font-size: .76rem; color: var(--muted); }
