/* ===== リセットと基本スタイル ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 62.5%;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.6;
    font-size: 1.6rem;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== ここから全画面共通 ===== */

/* ===== レイアウトコンテナ ===== */
.container {
    max-width: 480px;
    margin-right: auto;
    margin-left: auto;
    padding: 20px 10px;
}

.container_scroll {
    max-width: 480px;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    flex-grow: 1;
    overflow-y: auto;
    padding: 0 10px 20px 10px;
}

.container_scroll2 {
    padding: 10px 5px 20px 5px;
    border-radius: 5px;
}

.padding-box {
    padding-bottom: 8%;
}

/* ===== タイポグラフィー ===== */
.bold {
    font-weight: bold;
}

h1 {
    font-size: 2.4rem;
    letter-spacing: 0.13em;
    font-weight: bold;
}

h2 {
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    font-weight: bold;
}

/* ===== テーマスタイリング ===== */
/* ライトモード */
body[data-theme="light-mode"] {
    background-color: #fff;
}

body[data-theme="light-mode"] .container {
    background-color: #fff;
    color: #333;
}

body[data-theme="light-mode"] .container_scroll {
    background-color: #DCDCDC;
}

body[data-theme="light-mode"] .container_scroll2 {
    background-color: #fff;
    color: #333;
}

body[data-theme="light-mode"] .grid_item_left_top,
body[data-theme="light-mode"] .grid_item_left_bottom,
body[data-theme="light-mode"] .grid_item_right_top,
body[data-theme="light-mode"] .grid_item_right_middle,
body[data-theme="light-mode"] .grid_item_right_bottom {
    background-color: #DCDCDC;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

body[data-theme="light-mode"] .grid_item_left_top:hover,
body[data-theme="light-mode"] .grid_item_left_bottom:hover,
body[data-theme="light-mode"] .grid_item_right_top:hover,
body[data-theme="light-mode"] .grid_item_right_middle:hover,
body[data-theme="light-mode"] .grid_item_right_bottom:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    transform: translateY(-4px);
}

body[data-theme="light-mode"] .grid_item_left_top h2,
body[data-theme="light-mode"] .grid_item_left_bottom h2,
body[data-theme="light-mode"] .grid_item_right_top h2,
body[data-theme="light-mode"] .grid_item_right_middle h2,
body[data-theme="light-mode"] .grid_item_right_bottom h2 {
    color: #333333;
}

/* 編集アイコン */
body[data-theme="light-mode"] .theme_icon {
    content: url('./img/editicon_lightmode.png');
}

body[data-theme="light-mode"] .emergency_guidelines {
    border: 2px solid #DCDCDC;
}

body[data-theme="light-mode"] .acocoridion_info {
    border: #DCDCDC solid 2px;
}

body[data-theme="light-mode"] .summary_inner {
    border-bottom: 1px solid #333;
    color: #333;
}

body[data-theme="light-mode"] .icon::before,
body[data-theme="light-mode"] .icon::after {
    background-color: #333;
}

body[data-theme="light-mode"] .preparation_content a, .accordion_content a {
    color: #3891BD;
}

body[data-theme="light-mode"] .memo_input input {
    background-color: #fff;
    color: #333;
}

body[data-theme="light-mode"] .switch-to-dark {
    display: inline;
    background-color: #DCDCDC;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    padding: 5px 10px;
    border-radius: 5px;
}

body[data-theme="light-mode"] .switch-to-dark:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

body[data-theme="light-mode"] .grid_header {
    background-color: #DCDCDC;
    color: #333333;
    width: 100%;
}

body[data-theme="light-mode"] .main_button {
    background-color: #F0BD6B;
    color: #333;
    border: none;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body[data-theme="light-mode"] .pdf-link-button {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    align-items: center;
    text-decoration: none;
    color: #333;
    text-align: center;
    font-size: 1.4rem;
    line-height: 2;
    font-weight: bold;
    letter-spacing: 0.1em;
    padding: 10px;
}

/* ダークモード */
body[data-theme="dark-mode"] {
    background-color: #333;
}

body[data-theme="dark-mode"] .container {
    background-color: #333;
    color: white;
}

body[data-theme="dark-mode"] .container_scroll {
    background-color: #535252;
}

body[data-theme="dark-mode"] .container_scroll2 {
    background-color: #2F2F2F;
    color: #fff;
}

body[data-theme="dark-mode"] .grid_item_left_top,
body[data-theme="dark-mode"] .grid_item_left_bottom,
body[data-theme="dark-mode"] .grid_item_right_top,
body[data-theme="dark-mode"] .grid_item_right_middle,
body[data-theme="dark-mode"] .grid_item_right_bottom {
    background-color: #7A7878;
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

body[data-theme="dark-mode"] .grid_item_left_top:hover,
body[data-theme="dark-mode"] .grid_item_left_bottom:hover,
body[data-theme="dark-mode"] .grid_item_right_top:hover,
body[data-theme="dark-mode"] .grid_item_right_middle:hover,
body[data-theme="dark-mode"] .grid_item_right_bottom:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5), 0 0 8px rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
}

body[data-theme="dark-mode"] .grid_item_left_top h2,
body[data-theme="dark-mode"] .grid_item_left_bottom h2,
body[data-theme="dark-mode"] .grid_item_right_top h2,
body[data-theme="dark-mode"] .grid_item_right_middle h2,
body[data-theme="dark-mode"] .grid_item_right_bottom h2 {
    color: white;
}

/* 編集アイコン */
body[data-theme="dark-mode"] .theme_icon {
    content: url('./img/editicon_darkmode.png');
}

body[data-theme="dark-mode"] .emergency_guidelines {
    border: 2px solid white;
}

body[data-theme="dark-mode"] .acocoridion_info {
    border: #fff solid 2px;
}

body[data-theme="dark-mode"] .summary_inner {
    border-bottom: 1px solid #fff;
    color: #fff;
}

body[data-theme="dark-mode"] .icon::before,
body[data-theme="dark-mode"] .icon::after {
    background-color: #fff;
}

body[data-theme="dark-mode"] .preparation_content a, .accordion_content a {
    color: #46A0CD;
}

body[data-theme="dark-mode"] .memo_input input {
    background-color: #2F2F2F;
    color: #fff;
}

body[data-theme="dark-mode"] .memo_input input::placeholder {
    color: #fff;
    font-weight: lighter;
}

body[data-theme="dark-mode"] .switch-to-light {
    display: inline;
    background-color: #535252;
    padding: 5px 10px;
    border-radius: 5px;
}

body[data-theme="dark-mode"] .switch-to-light:hover {
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.4), 0 0 4px rgba(255, 255, 255, 0.1);
}

body[data-theme="dark-mode"] .grid_header {
    background-color: #535252;
    color: white;
    width: 100%;
}

body[data-theme="dark-mode"] .contact_item {
    border-color: #fff;
}

body[data-theme="dark-mode"] .delete_button {
    color: #fff;
}

body[data-theme="dark-mode"] .memo_item {
    border-color: #fff;
}

body[data-theme="dark-mode"] .contact_name,
body[data-theme="dark-mode"] .contact_number {
    border: solid 1px #fff;
}

body[data-theme="dark-mode"] .save_contact {
    background-color: #333;
    color: #333;
}

body[data-theme="dark-mode"] .main_button {
    background-color: #F0BD6B;
    color: #333;
    border: none;
}

body[data-theme="dark-mode"] .pdf-link-button {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    align-items: center;
    text-decoration: none;
    background-color: #333;
    color: #fff;
    text-align: center;
    font-size: 1.4rem;
    line-height: 2;
    font-weight: bold;
    letter-spacing: 0.1em;
    padding: 10px;
}

/* ===== ヘッダースタイル ===== */
.grid_header {
    max-width: 480px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    padding-top: 55px;
    padding-bottom: 10px;
    width: 100%;
    flex-shrink: 0;
}

/* ===== アコーディオンスタイル ===== */
details {
    margin-top: 20px;
}

summary {
    display: block;
}

summary::-webkit-details-marker {
    display: none;
}

.summary_inner {
    cursor: pointer;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0px;
    font-weight: bold;
    font-size: 1.7rem;
}

.icon {
    display: block;
    position: relative;
    width: 24px;
    margin-left: 6px;
    flex-shrink: 0;
    transform-origin: center 43%;
    transition: transform 0.4s;
}

details[open] .icon {
    transform: rotate(180deg);
}

.accordion_content {
    padding: 1em 0.5em;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion_content ol, .accordion_content ul {
    padding-left: 20px;
}

.acocoridion_info {
    padding: 15px;
    display: flex;
    flex-direction: column;
}

.acocoridion_info h4 {
    margin-bottom: 10px;
}

/* アイコンバー */
.icon::before,
.icon::after {
    content: "";
    position: absolute;
    display: block;
    width: 15px;
    height: 3px;
}

.icon::before {
    left: 0;
    transform: rotate(45deg);
}

.icon::after {
    right: 0;
    transform: rotate(-45deg);
}

/* ===== モード切替 ===== */
.mode_input {
    display: none;
}

.mode_switch {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mode_switch:hover {
    transform: translateY(-2px);
}

.mode_switch img {
    width: 1em; 
    height: auto; 
    margin-right: 5px;
    position: relative;
    top: 0.3em;
}

.mode_switch label {
    cursor: pointer;
}

.switch-to-light, .switch-to-dark {
    display: none;
}

/* ===== ナビゲーション ===== */
.back_to_top {
    max-width: 480px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    background-color: #fff;
    width: 100%;
    position: sticky;
    bottom: 0;
    z-index: 1000;
}

.top_link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
    gap: 5px;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 450;
    color: #333;
    width: inherit;
}

.top_link span {
    padding-top: 4px;
}

.home_icon {
    width: 20px;
    height: 20px;
}

/* ===== フッター ===== */
footer {
    max-width: 480px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
    background-color: white;
    padding-top: 10px;
    padding-bottom: 10px;
} 

.logo {
    width: 100px;
    margin: 0 auto;
}

.logo img {
    width: 130%;
    height: auto;
}

/* ===== プロバイダー情報 ===== */
.provider_info p {
    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
}

/* ===== ここまで全画面共通 ===== */


/* ===== ここからindex.htmlのスタイル ===== */
/* ヘッダー */
header {
    text-align: center;
    margin-bottom: 30px;
}

.header_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

helmet-icon img {
    justify-content: center;
}

.header_content h1 {
    letter-spacing: 0;
}


/* グリッドレイアウト */
.grid_container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 2列 */
    grid-template-rows: auto auto auto; /* 3行 */
    grid-template-areas: 
        "left-top right-top"
        "left-bottom right-middle"
        "left-bottom right-bottom";
    grid-auto-rows: 1fr; /* 行の高さを自動調整 */
    gap: 12px;
    margin-bottom: 25px;
}

/* 共通スタイル */
.grid_item_left_top,
.grid_item_left_bottom,
.grid_item_right_top,
.grid_item_right_middle,
.grid_item_right_bottom {
    padding: 25px 10px;
    border-radius: 5px;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

/* 個別位置スタイル */
.grid_item_left_top {
    grid-area: left-top;
    height: 145px;
}

.grid_item_left_bottom {
    grid-area: left-bottom;
    height: 145px; /* 上部と同じ高さ */
}

.grid_item_right_top {
    grid-area: right-top;
    height: 145px;
}

.grid_item_right_middle {
    grid-area: right-middle;
    height: 65px; 
}

.grid_item_right_bottom {
    grid-area: right-bottom;
    height: 65px; 
}

/* グリッドアイテム内のタイトル */
body[data-lang="jp"] .grid_item_left_top h2,
body[data-lang="jp"] .grid_item_left_bottom h2,
body[data-lang="jp"] .grid_item_right_top h2,
body[data-lang="jp"] .grid_item_right_middle h2,
body[data-lang="jp"] .grid_item_right_bottom h2 {
    font-size: 1.8rem;
    letter-spacing: 0.1em;
    margin-top: 5px;
}

body[data-lang="en"] .grid_item_left_top h2,
body[data-lang="en"] .grid_item_left_bottom h2,
body[data-lang="en"] .grid_item_right_top h2,
body[data-lang="en"] .grid_item_right_middle h2,
body[data-lang="en"] .grid_item_right_bottom h2 {
    font-size: 1.8rem;
    letter-spacing: 0.03rem;
    margin-top: 5px;
}

/* 英語のスタイル指定（てるや追記） */
body[data-lang="en"] .header_content h1 {
    font-size: 2.0rem;
    margin-top: 5px;
}

body[data-lang="en"] .grid_header h1 {
    font-size: 2.4rem;
    letter-spacing: 0.03em;
    margin-top: 5px;
}

body[data-lang="en"] h2 {
    font-size: 1.8rem;
    letter-spacing: 0;
}

body[data-lang="en"] .menu a {
    letter-spacing: 0.03em;
}

/* 編集アイコン */
.grid_edit {
    width: 15px;
}

/* ハザードマップ */
.pdflink {
    border: 2px solid #F0BD6B;
    border-radius: 5px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 2px 2px 4px 0px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.pdflink:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-4px);
}

body[data-theme="light-mode"] .pdf-link-button {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    align-items: center;
    text-decoration: none;
    color: #333;
    text-align: center;
    font-size: 1.4rem;
    line-height: 2;
    font-weight: bold;
    letter-spacing: 0.1em;
    padding: 10px;
}

body[data-theme="dark-mode"] .pdf-link-button {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    align-items: center;
    text-decoration: none;
    background-color: #333;
    color: #fff;
    text-align: center;
    font-size: 1.4rem;
    line-height: 2;
    font-weight: bold;
    letter-spacing: 0.1em;
    padding: 10px;
}

.pdf-link-button .strong {
    font-size: 1.6rem;
    font-weight: bold;
}

body[data-lang="en"] .pdf-link-button {
    letter-spacing: 0.03em;
}

/* 大規模災害発生時の対応方針 */
.emergency_guidelines {
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 30px;
}

.emergency_guidelines h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    text-align: center;
}

.emergency_guidelines p {
    font-size: 1.4rem;
}

.emergency_guidelines ol {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 10px;
}

.emergency_guidelines li {
    font-size: 1.4rem;
    padding-left: 1.5em;
    margin-top: 0;
    text-indent: -1em;
}

.emergency_guidelines li::before {
    content: "(" counter(list-item) ") ";
}

/* フッター（パソナロゴ） */
.top-footer {
    max-width: 480px;
    margin-right: auto;
    margin-left: auto;
    background-color: #fff;
    width: 100%;
    bottom: 0;
    /* margin-top: 15px; */
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.top-footer img {
    margin-top: 15px;
    height: 30px;
}

.version {
    font-size: 1.2rem;
    color: #888;
    margin-top: 5px;
}

/* ===== ここまでindex.htmlのスタイル ===== */

/* ===== ここからself-help.html, mutual-help.html, disaster-detail.html, firstaid.htmlの共通スタイル ===== */
.preparation_content {
    padding: 0 5%;
}

.preparation_section {
    padding-bottom: 10px;
}

.preparation_section h2 {
    padding-top: 30px;
}

.preparation_item {
    border-radius: 5px;
}

.preparation_item h3 {
    margin-bottom: 10px;
    font-weight: 500;
}

.preparation_item ul {
    list-style: none;
    padding-left: 1em;
}

.preparation_item ol {
    /* list-style: none; */
    padding-left: 1.5em;
}

.preparation_item li {
    margin-bottom: 1em;
    position: relative;
}

.preparation_item ul li:before {
    content: "•";
    position: absolute;
    left: -1em;
}

.preparation_item .mg-0 ol {
    padding-left: 1.3em;
}

.preparation_item .mg-0 li {
    margin: 0;
}

.accordion_content .mg-0 li {
    margin: 0;
}

.preparation_item .accordion_content .mg-0 {
    margin: 1em 0;
}

.preparation_item ul.diamond-list {
  list-style: none;
  padding-left: 1.2em;
}

.preparation_item ul.diamond-list li:before {
  content: "◆";
  margin-right: 0.5em;
}

.preparation_item ul.diamond-list a {
    word-break: break-all;
    white-space: normal;
}

.indent-1em {
    margin-left: -1em;
}

.preparation_item .center {
    text-align: center;
}

.padding_content {
    padding: 0 1%;
}

/* 言語別の表示・非表示切り替え */
body[data-lang="jp"] .en-only {
    display: none;
}

/* カードのアコーディオン開閉 */
.read-toggle {
  font-size: 1.4rem;
  color: #3891BD;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 8px;
  align-self: center;
  text-align: center;
}

body[data-theme="dark-mode"] .read-toggle {
    color: #ffffff;
}

.text-wrapper.truncated .item-person .value,
.text-wrapper.truncated .item-location .value {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  max-height: 2.4em;
}

.text-wrapper.expanded .item-person .value,
.text-wrapper.expanded .item-location .value {
  white-space: normal;
  max-height: none;
}

.remark-wrapper.truncated .remark-text {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  max-height: 2.2em;
}

.remark-wrapper.expanded .remark-text {
  white-space: normal;
  max-height: none;
}

/* ===== ここまでself-help.html, mutual-help.html, disaster-detail.html, firstaid.htmlの共通スタイル ===== */

/* ===== ここからemergency-memo.htmlとtaking-out.htmlのスタイル ===== */
/* メモ機能 */
/* 避難先メモ */
.eva_input {
    width: 100%;
    padding: 0px 5px;
    margin-bottom: 20px;
}
.eva_memo {
    width: 100%;
    border: 1px solid #2F2F2F;
    border-radius: 3px;
    height: 130px;
    padding: 10px;
}
.save_memo {
    display: flex;
    flex-direction: column-reverse;
}
.memo_item {
    display: flex;
    justify-content: space-between;
    padding: 10px 5px;
    border-bottom: 1px solid #2F2F2F;
    border-left: 1px solid #2F2F2F;
    border-right: 1px solid #2F2F2F;
}
.memo_item:first-child {
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
}
.memo_item:last-child {
    border-top: 1px solid #2F2F2F;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}
.memo_content {
    width: 85%;
    font-size: 0.7rem;
}

/* ＋ボタン（固定） */
.add-button {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #F0BD6B;
    border: none;
    border-radius: 50%;
    font-size: 3rem;
    color: #333;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    cursor: pointer;
    z-index: 1001;
}

/* モーダルオーバーレイ */
.modal {
    display: none;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}
.modal.show {
    display: flex;
}

/* デフォルト緊急連絡先 */
.default-contact h2{
    font-size: 1.8rem;
    margin:20px 0 10px;
}
.def-contact-card{
    background-color: #EBEBEB;
    border-radius: 5px;
    padding: 15px;
    display: flex;
    align-items: center;
}
body[data-theme="dark-mode"] .def-contact-card {
    background-color: #7A7878;
}
.def-contact-card-left{
    width: 80%;
}
.def-contact-card-right{
    display: flex;
    justify-content: center; 
    align-items: center;
    width: 20%;
}
.default-contact h3{
    font-size: 1.6rem;
}
.def-contact-number-box{
    display: flex;
    margin-left: 15px;
    font-size: 1.4rem;
}

body[data-theme="dark-mode"] .def-contact-number-box a {
    color: #fff;
}

.def-contact-card-right a{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #FFF;
    border-radius: 100%;
}

.icon-phone{
    display: inline-block;
    width: 20px;
    height: 20px;
    background-position: center; 
    background-repeat: no-repeat;
    background-size: contain;
}
body[data-theme="light-mode"] .icon-phone {
    background-image: url('./img/call_light.png');
}
body[data-theme="dark-mode"] .icon-phone {
    background-image: url('./img/call_dark.png');
}
.urge-add-contact{
    font-size: 1.4rem;
    margin-top: 30px;
}


/* ===== 安否報告先セクション上の注意書き ===== */
.notice-box {
    border: 2px solid #F0BD6B;
    padding: 7px;
    margin: 10px 0 1em;
}
.notice-box .notice-title {
    font-weight: bold;
    font-size: 1.4rem;
    margin-bottom: 4px;
}
.notice-box ul {
    list-style-type: disc;
    padding-left: 1.5em;
}
.notice-box li {
    font-size: 1.4rem;
    margin: 0;
}

/* データなしメッセージのスタイル */
.no-data {
    font-size: 1.4rem;
    color: #666;
    padding: 10px;
  }

/* モーダルコンテンツ */
.modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 3px;
    width: 90%;
    max-width: 300px;
    position: relative;
    /* モーダル内部を中央寄せ */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-content h3{
    font-size: 1.6rem;
    margin:10px 0;
}

/* モーダル内フォームの中央寄せ */
.modal-content form {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.modal-content form select,
.modal-content form input,
.modal-content form textarea {
    padding: 5px 7px;
    width: 90%;
    max-width: 320px;
    box-sizing: border-box;
    font-size: 1.6rem;
}

.modal-content form textarea{
    min-height: 85px;
}

.close-button {
    position: absolute;
    top: 10px; right: 10px;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #000;
}
.register-button {
    width: 140px;
    height: 36px;
    background-color: #F0BD6B;
    color: #000;
    border: none;
    font-size: 1.4rem;
    font-weight: bold;
    margin-top: 10px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

/* アコーディオンカテゴリ */
.category-section {
    margin-bottom:5px;
}
.category-section summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 8px 0;
}
.category-section .slider-icon {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}
.category-section[open] .slider-icon {
    transform: rotate(0deg);
}

#contact-categories .category-section + .category-section {
    border-top: 1px solid rgba(0, 0, 0, 0.9);
    margin-top: 5px;
    padding-top: 5px;
}

/* ダークモード対応 */
body[data-theme="dark-mode"] #contact-categories .category-section + .category-section {
    border-top-color: rgba(255, 255, 255, 0.9);
}

/* ■ カード形式スタイル ■ */
#contact-categories .card {
    background-color: #EBEBEB;
    display: flex;
    align-items: stretch;
    border-radius: 4px;
    margin-bottom: 10px;
}

#contact-categories .card-content {
    width: 85%;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 10px;
    line-height: 1.3;
} 

#contact-categories .card-content div{
    margin: 3px 0;
    font-size: 1.4rem;
}

#contact-categories .card-content .name {
    font-weight: bold;
    font-size: 1.6rem;
}

#contact-categories .card-content .phone a {
    color: #3891BD;
    font-size: 1.6rem;
    text-decoration: underline;
}

#contact-categories .card-content .phone a:hover {
    text-decoration: underline;
}

#contact-categories .delete-button {
    display: block;
    width: 15%;
    align-self: stretch;  
    background-color: #D9D9D9;
    border: none;
    cursor: pointer;
    align-items: stretch;
    text-decoration: underline;
    border-radius: 0 4px 4px 0;
    font-size: 1.2rem;
}

body[data-theme="dark-mode"] .card-content{
    color: #FFFFFF;
    background-color: #7A7878;
    border-radius: 4px 0 0 4px;
}

body[data-theme="dark-mode"] #contact-categories .card-content .phone a{
    color: #FFFFFF;
}

body[data-theme="dark-mode"] .delete-button{
    background-color: #FFFFFF;
}

body[data-theme="dark-mode"] .no-data{
    color: #FFFFFF;
}

body[data-theme="dark-mode"] .modal-content{
    background-color: #2F2F2F;
}

body[data-theme="dark-mode"] .modal-content h3{
    color: #FFFFFF;
}

body[data-theme="dark-mode"] .modal-content .close-button{
    color: #FFFFFF;
}

/* taking-outでのも使用するCSSです。基本はmemrgency-memoのスタイルを使用 */
/* カードデザインを流用するためのスタイルをインラインで追加 */
.taking-out-guideline{
    font-size: 12px;
    margin: 10px 0;
}
#takeout-list .card {
    background-color: #EBEBEB;
    display: flex;
    align-items: stretch;
    border-radius: 4px;
    margin-bottom: 10px;
    margin-top: 10px;
}
/* --- カード内レイアウト --- */
#takeout-list .card-content {
    display: flex;
    flex-direction: column;
    width: 90%;
    padding: 15px 10px 15px 20px;
}

#takeout-list .card-header {
    display: flex;
    align-items: center;
    margin-right: 5px;
    padding: 0.5rem 0;
}

#takeout-list .card-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 0.5rem;
}
#takeout-list .checkbox {
    width: 2rem;
    height: 2rem;
    margin-right: 10px;
}

#takeout-list .item-name{
    font-weight: bold;
    font-size: 1.6rem;
}

#takeout-list .item-location{
    display: flex;
    align-items: flex-start;
    font-size: 1.4rem;
}

#takeout-list .item-person{
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    margin-bottom: 5px;
    align-items: center;
}
.delete-button {
    width: 10%;
    background-color: #D9D9D9;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    border-radius: 0 4px 4px 0;
    font-size: 1.2rem;
}
/* --- アイコン共通 --- */
#takeout-list .icon-person,
#takeout-list .icon-location{
  display: inline-block;
  width: 2rem;
  height: 2rem;
  background-size: contain;
  background-repeat: no-repeat;
  margin-right: 10px;
}

.icon-delete{
    display: inline-block;
    width: 2rem;
    height: 2rem;
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 10px;
    width: 2.2rem;
    height: 2.2rem;
    margin: 0 auto;
}

body[data-theme="dark-mode"] #takeout-list .card{
    background-color: #7A7878;
}
body[data-theme="dark-mode"].delete-button{
    background-color: #FFFFFF;
    border-radius: 0 4px 4px 0;
}

/* --- ライトモードアイコン --- */
body[data-theme="light-mode"] #takeout-list .icon-person {
    background-image: url('./img/person_light.png');
}
body[data-theme="light-mode"] #takeout-list .icon-location {
    background-image: url('./img/location_light.png');
}
body[data-theme="light-mode"] .icon-delete {
    background-image: url('./img/delete_light.png');
}

/* --- ダークモードアイコン --- */
body[data-theme="dark-mode"] #takeout-list .icon-person {
    background-image: url('./img/person_dark.png');
}
body[data-theme="dark-mode"] #takeout-list .icon-location {
    background-image: url('./img/location_dark.png');
}
body[data-theme="dark-mode"] .icon-delete {
    background-image: url('./img/delete_dark.png');
}    
/* --- 削除ボタン微調整 --- */
.delete-button {
    border-radius: 0 4px 4px 0;
    border: none;
    cursor: pointer;
}
#takeout-list .card-header,
#takeout-list .card-details {
    min-width: 0; 
}

#takeout-list .item-name,
#takeout-list .item-person .value,
#takeout-list .item-location .value {
    flex: 1 1 auto;
    min-width: 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
#takeout-list .checkbox,
#takeout-list .icon-person,
#takeout-list .icon-location {
    flex-shrink: 0;
}
/* ===== ここまでemergency-memo.htmlとtaking-out.htmlのスタイル ===== */



/* テルさん追加分 */
/* メインボタン */
.main_button {
    width: 90%;
    height: 55px;
    font-size: 1.6rem;
    letter-spacing: 0.1em;
    font-weight: bold;
    border-radius: 4px;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.button_area {
    text-align: center;
    margin-top: 24px;
}

/* 入れ子になったolタグのスタイル指定 */
.outer-upper-latin {
    list-style-type: upper-latin;
}
 
.outer-upper-latin > li::marker {
    font-weight: bold;
}
 
.outer-upper-latin ol {
    list-style-type: decimal; /* 内側のリストのスタイルをデフォルトに戻す */
}

.default li::marker {
    font-weight: bold;
}


/* liタグのマージン */
li {
    margin-top: 1em;
}

.mg-1em {
    margin-top: 1em;
}

/* AEDの使用方法イラスト */
ol.aed-steps {
  padding-left: 0;
  list-style: none;
}

li.aed-step {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 0 5px 0;
  padding: 12px 0;
}

.aed-step img {
  width: 90px;
  height: auto;
}

/* 日本語・英語・ライト/ダークモードごとの画像切り替え */
body[data-theme="light-mode"] .aed1_illust {
    content: url('./img/aed1_lightmode.png');
}

body[data-theme="dark-mode"] .aed1_illust {
    content: url('./img/aed1_darkmode.png');
}

body[data-theme="light-mode"] .aed2_illust {
    content: url('./img/aed2_lightmode.png');
}

body[data-theme="dark-mode"] .aed2_illust {
    content: url('./img/aed2_darkmode.png');
}

body[data-lang="jp"][data-theme="light-mode"] .aed3_illust {
    content: url('./img/aed3_lightmode.png');
}

body[data-lang="jp"][data-theme="dark-mode"] .aed3_illust {
    content: url('./img/aed3_darkmode.png');
}

body[data-lang="en"][data-theme="light-mode"] .aed3_illust {
    content: url('./img/aed3_english_lightmode.png');
}

body[data-lang="en"][data-theme="dark-mode"] .aed3_illust {
    content: url('./img/aed3_english_darkmode.png');
}

body[data-theme="light-mode"] .aed4_illust {
    content: url('./img/aed4_lightmode.png');
}

body[data-theme="dark-mode"] .aed4_illust {
    content: url('./img/aed4_darkmode.png');
}

/* ===== ハンバーガーメニュー ===== */
/* ハンバーガーボタン基本スタイル */
.hamburger {
    position: absolute;
    top: 25px;
    left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 21px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    transition: opacity 0.3s;
}

/* スクリーンサイズに応じたハンバーガーメニュー位置調整 */
@media screen and (min-width: 769px) {
    .hamburger {
        /* PCサイズのときの位置調整 - ヘッダー幅に合わせて左端から距離を設定 */
        left: calc(50% - 240px + 20px); /* ヘッダーの左端に合わせる (480pxの半分) */
    }
}

.hamburger:hover {
    opacity: 0.8;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #333;
    transition: all 0.3s ease;
}

body[data-theme="dark-mode"] .hamburger span {
    background-color: #fff;
}

/* ハンバーガーメニューが開いたときのスタイル（✕マーク） */
.hamburger.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
}

.hamburger.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* メニュー全体 */
.menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #DCDCDC;
    transition: top 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

body[data-theme="dark-mode"] .menu {
    background-color: rgba(47, 47, 47, 0.98);
}

.menu.open {
    top: 0;
}

/* メニュー閉じるボタン */
.menu-close {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2.4rem;
    cursor: pointer;
    color: #333;
    transition: opacity 0.3s;
}

/* スクリーンサイズに応じたメニュー閉じるボタンの位置調整 */
@media screen and (min-width: 769px) {
    .menu-close {
        /* PCサイズでの位置調整 */
        left: calc(50% - 240px + 20px);
    }
}

.menu-close:hover {
    opacity: 0.7;
}

body[data-theme="dark-mode"] .menu-close {
    color: #fff;
}

/* メニュー項目 */
.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    padding-top: 60px;
}

.menu li {
    padding: 15px 0;
    margin-top: 0;
    text-align: center;
    border-bottom: 1.5px solid white;
    transition: background-color 0.2s;
}

.menu li:last-child {
    border-bottom: none;
}

.menu li:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

body[data-theme="dark-mode"] .menu li:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.menu a {
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.1em;
    color: #333;
    font-size: 1.6rem;
    display: block;
    padding: 5px 0;
}

body[data-theme="dark-mode"] .menu a {
    color: #fff;
}

.menu a:hover {
    opacity: 0.8;
}

/* メニューオーバーレイ */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-overlay.open {
    display: block;
    opacity: 1;
}



/* ===== 言語切り替え ===== */
/* TOPページ、ヘッダーの内部レイアウト調整 */
.inner_header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 10px;
    position: relative;
}

.helmet-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* スタイル調整 */
/* TOPページ用 */
.inner_header .lang_switch {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 500;
    z-index: 900;
}

@media screen and (min-width: 769px) {
    .inner_header .lang_switch {
        right: 20px; /* PCサイズでの右側の余白 */
    }
}

/* 他ページ用 */
body > .lang_switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 15px; 
    z-index: 900; 
}

@media screen and (min-width: 769px) {
    body > .lang_switch {
        /* PCサイズのときの位置調整 - ヘッダー幅に合わせて右端から距離を設定 */
        right: calc(50% - 240px + 20px); /* ヘッダーの右端に合わせる (480pxの半分) */
    }
}

.lang_switch label {
    display: flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.lang_switch label:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.lang_switch img {
    width: 12px;
    height: auto;
    margin-right: 5px;
    position: relative;
    top: 0;
}

/* 言語切り替えボタンの表示制御 */
body[data-lang="jp"] .switch-to-jp {
    display: none;
}

body[data-lang="jp"] .switch-to-en {
    display: flex;
}

body[data-lang="en"] .switch-to-jp {
    display: flex;
}

body[data-lang="en"] .switch-to-en {
    display: none;
}

.lang_input {
    display: none;
}

.lang_switch {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lang_switch:hover {
    transform: translateY(-2px);
}

.lang_switch img {
    width: 1em; 
    height: auto; 
    margin-right: 2px;
    position: relative;
    top: 0.2em;
}

.lang_switch label {
    cursor: pointer;
}

.switch-to-jp, .switch-to-en {
    display: none;
}

/* 色設定 */
.switch-to-jp,
.switch-to-en {
    display: inline;
    background-color: white;
    color: #333;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    padding: 5px 9px;
    border-radius: 5px;
}

.switch-to-jp:hover,
.switch-to-en:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 言語表示の制御 */
body[data-lang="jp"] .lang-jp {
    display: block;
}

body[data-lang="jp"] .lang-en {
    display: none;
}

body[data-lang="en"] .lang-jp {
    display: none;
}

body[data-lang="en"] .lang-en {
    display: block;
}

/* 言語切り替えボタンの表示制御 */
body[data-lang="jp"] .switch-to-jp {
    display: none;
}

body[data-lang="jp"] .switch-to-en {
    display: inline;
}

body[data-lang="en"] .switch-to-jp {
    display: inline;
}

body[data-lang="en"] .switch-to-en {
    display: none;
}

/* 災害時の対応のページ上部遷移ボタン */
#toTopBtn{
    width: 60px;
    height: auto;
    position: fixed;
    bottom: 30px;
    right: 15px;
    z-index: 1001;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s, visibility 0.4s;
}

#toTopBtn.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

#toTopBtn a {
    display: block;
    height: 60px;
}

#toTopBtn a img {
    width: 100%;
}