body {
    margin: 0;
    padding: 0;
    background-color: #fff;
    font-family: "Helvetica Neue", "ヒラギノ角ゴ ProN", sans-serif;
    color: #333;
    overflow-x: hidden;
}

header {
    background-color: #fff;
    color: #333;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    position: relative; /* sticky の代わりに relative にしてみる */
    z-index: auto;      /* コンテキストを作らせない */
}
@media screen and (max-width: 767px) {
    header {
    padding: 10px;
    }
    .header-inner {
    padding-left: 0;
    padding-right: 0;
  }
  .h_title {
    margin-left: 4px; /* 左マージンも消す */
  }

  .h_icon {
    margin-left: 4px; /* ロゴの余白も消す */
  }
  .logout {
    margin-right: 0;
  }
}


.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    flex-wrap: wrap;
}

.h_icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

@media screen and (max-width: 767px) {
    .h_icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    }
}

.h_title {
    font-size: 1.2em;
    font-weight: bold;
    margin-left: 1em;
    flex-grow: 1;
    text-align: center;
    margin: 0 auto;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8em 1em;
  position: relative; /* これが重要 */
}

/* PC表示時（中央固定） */
.h_title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-weight: bold;
  font-size: 1.2rem;
  white-space: nowrap;
}

/* スマホ表示時は左寄せにしてログアウトと被らないようにする */
@media screen and (max-width: 767px) {
  .h_title {
    position: static;
    transform: none;
    font-size: 1.1rem;
    margin-left: 5px;
  }
}

.hamburger {
    display: none;
    font-size: 1.5em;
    cursor: pointer;
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
}

nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f8f8;
    position: absolute;
    top: 100%;
    width: 100%;
    display: none;
    border-top: 1px solid #ccc;
    left: 0;
    box-sizing: border-box;
    z-index: 2000;
}

nav.active {
    display: flex;
}

nav a {
    padding: 1em;
    text-decoration: none;
    color: #333;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    z-index: 5000;
}

.logout {
    font-size: 0.9em;
    padding: 0.5em 1em;
    border: 1px solid #ccc;
    border-radius: 9999px;
    background: #f4f4f4;
    text-decoration: none;
    color: #333;
    margin-right: 3em;
}

@media screen and (max-width: 767px) {
    .hamburger {
        display: block;
    }
    .logout {
        font-size: 0.65em;
        padding: 0.25em 0.5em;
        margin-right: 4em;
    }
    .next_button {
        padding: 0.5em 1em;
        font-size: 0.85em;
    }
    .h_title {
        font-size: 0.9em;
    }
}

.title_area,
.text_area,
.info_area {
    max-width: 600px;
    margin: 2em auto;
    padding: 0 1em;
    box-sizing: border-box;
}

.title_area {
    margin-bottom: 1em;
}

.t_name {
    font-size: 1.5em;
    text-align: center;
    margin-bottom: 0.5em;
    background: none;
}

.t_amens {
    text-align: right;
    margin: 0;
    color: inherit;
}

.img_area {
    text-align: center;
    margin-bottom: 1em;
}

.img_area img {
    width: 100%;
    max-width: 700px;
    height: auto;
    border-radius: 10px;
}

.text_area {
    background-color: #f9f9f9;
    padding: 1em;
    border-radius: 6px;
    margin-bottom: 1em;
}

.info_name {
    background-color: #e0e0e0;
    padding: 0.75em;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 1em;
}

.i_textname {
    font-size: 1.2em;
    margin: 0;
    color: #222;
}

.infomation {
    background-color: #f9f9f9;
    padding: 1em;
    border-radius: 6px;
}

.i_t_area {
    display: flex;
    justify-content: space-between;
    padding: 0.5em 0;
    border-bottom: 1px solid #eee;
}

.i_title {
    /* padding-left: 10px; */
    /* padding-top: 5px; */
}

.i_info {
    padding-left: 10px;
}

.next_button {
    display: inline-block;
    margin: 1em 1rem 2em;
    padding: 0.75em 1.5em;
    background-color: #2b74e2;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
}

@media screen and (min-width: 768px) {
    .hamburger {
        display: none;
    }
    nav {
        position: static;
        flex-direction: row;
        display: flex !important;
        justify-content: center;
        border-top: none;
    }
    nav a {
        border: none;
        width: auto;
    }
}

@media screen and (max-width: 767px) {
  .header-inner {
    padding-top: 0.4em;
    padding-bottom: 0.4em;
  }
}
