/* v110: 見た目と操作の最終調整 */
.topbar { position: relative; z-index: 40; }
#profileButton.avatar { position: relative; z-index: 90; isolation: isolate; flex: 0 0 auto; }
#profileButton.avatar.has-photo { background-color: #d8ead0; }

/* 日時・天気・共有範囲は、スマホでも重ならない縦並び */
#add fieldset:nth-of-type(2) { grid-template-columns: 1fr !important; }
#add fieldset:nth-of-type(2) > label { width: 100%; min-width: 0; }
#add #dateTime, #add #weather, #add #visibility { width: 100%; max-width: 100%; height: 44px; min-height: 44px; }

/* 本人情報の3項目を同じ、コンパクトな大きさにする */
#profileForm #birthDate, #profileForm #prefecture, #profileForm #city {
  width: 100%; max-width: 100%; height: 42px; min-height: 42px; padding: 8px 10px;
}

/* わたしの記録の検索欄は見出しと並び替えのすぐ下 */
#library > #search.record-search-below-heading { margin: 10px 0 12px; }
#library .record-sort-select { width: auto; max-width: 176px; height: 38px; min-height: 38px; padding: 6px 28px 6px 8px; font-size: 12px; color: var(--forest); font-weight: 700; }

/* プロフィールのアカウント表示と慎重な操作 */
#accountState.account-state-toggle { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
#accountState.account-state-toggle::after { content: ' ▾'; color: var(--forest); }
#profileSafetyActions { margin: 14px 0 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
#profileSafetyActions summary { cursor: pointer; padding: 12px 13px; color: #52645a; font-size: 13px; font-weight: 700; }
#profileSafetyActions > div { display: grid; gap: 8px; padding: 0 12px 12px; }
#profileSafetyActions button { text-align: left; padding: 10px 2px; }

/* プロフィール統計は図鑑一覧を開くボタン */
#profileStats.profile-stats { cursor: pointer; }
#profileStats.profile-stats:focus-visible { outline: 3px solid #8abf79; outline-offset: 3px; }

/* 検索予測のフィルター表示 */
.species-filter-prompts button { touch-action: manipulation; }

@media (max-width: 699px) {
  /* iOS Safari の入力時自動ズームを防止 */
  #add input, #add textarea, #add select, #profile input, #profile textarea, #profile select { font-size: 16px !important; }
  #library .section-heading { align-items: center; }
  #library .record-sort-select { max-width: 155px; }
}
