/* search.html 固有スタイル */

.search-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

/* --- 人気ワード（固定） --- */
.search-section {
  flex: 0 0 auto;
  padding: 16px 16px 8px;
}
.search-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  color: var(--c-text);
}

/* --- ならびかえバー（固定） --- */
.sort-bar {
  flex: 0 0 auto;
  margin: 12px 16px 8px;
  background: var(--c-tag-track);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.sort-bar-btn {
  background: transparent;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--c-text);
  font-family: inherit;
  cursor: pointer;
}

/* --- 占い師リスト（スクロール領域） --- */
.ft-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(84px + env(safe-area-inset-bottom));
  scrollbar-width: none;
}
.ft-scroll::-webkit-scrollbar { display: none; }

/* --- 占い師リスト --- */
.ft-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ft-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 0.5px solid var(--c-border);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  background: var(--c-surface);
}
.ft-item:active { background: #FAFAFA; }
.ft-avatar {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--av-color, #C4A4DE);
  position: relative;
}
.ft-avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ft-avatar-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  font-weight: 500;
}
.ft-avatar.has-image .ft-avatar-fallback { display: none; }
.ft-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ft-name {
  color: var(--c-purple);
  font-size: 15px;
  font-weight: 600;
  margin: 0;
}
.ft-cp {
  font-size: 12px;
  color: var(--c-text-muted);
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}
.ft-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.ft-tag {
  background: var(--c-tag-bg);
  color: var(--c-tag-text);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.ft-price {
  flex: 0 0 auto;
  align-self: center;
  font-size: 12px;
  color: var(--c-purple);
  font-weight: 600;
  white-space: nowrap;
}

.ft-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--c-text-hint);
  font-size: 13px;
}

/* --- ボトムシート（ならびかえ） --- */
.sort-sheet {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.sort-sheet[hidden] { display: none; }
.sort-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  animation: sheet-fade 0.2s ease-out;
}
.sort-sheet-panel {
  position: relative;
  width: 100%;
  max-width: 430px;
  background: var(--c-surface);
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom));
  animation: sheet-slide 0.25s ease-out;
}
@keyframes sheet-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sheet-slide {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sort-opt {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 0.5px solid var(--c-border);
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: inherit;
  font-size: 15px;
  color: var(--c-text);
  cursor: pointer;
  text-align: left;
}
.sort-opt:last-child { border-bottom: 0; }
.sort-opt-label {}
.sort-opt-check {
  color: var(--c-purple);
  visibility: hidden;
}
.sort-opt.is-selected .sort-opt-label {
  color: var(--c-purple);
  font-weight: 500;
}
.sort-opt.is-selected .sort-opt-check {
  visibility: visible;
}
