/* ===== 背景全体 ===== */
body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: url("images/background-check.png") no-repeat center center fixed;
  background-size: cover;
  color: #f7a8a8;
  display: flex;
  justify-content: center;
  align-items: start;
}

.background {
  width: 100%;
  padding: 30px 0;
  padding-bottom: 50px;
  display: flex;
  justify-content: center;
}

.inner-wrapper {
  background-color: white;
  border-radius: 10px;
  padding: 28px 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
  max-width: 676px;
  width: 90%;
  margin: 0 auto;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== ヘッダー部分 ===== */
.custom-header {
  background: linear-gradient(160deg, #ffeded 0%, #ffffff 100%);
  border: 2px solid #f9c0c0;
  border-bottom: 2px solid #f9c0c0;
  padding: 4.333px 20.667px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-url {
  font-size: 1.125em;
  font-weight: 400;
  color: #f7a8a8;
}

.close-button i {
  color: #f7a8a8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.close-button:hover i {
  color: #ffdede;
}

.header-icons {
  display: flex;
  gap: 12px;
}

.header-icons i {
  font-size: 25px;
  color: #f7a8a8;
}

/* ===== トップセクション ===== */
.top-section {
  padding: 32px 24px 40px;
  border: 2px solid #f9c0c0;
  text-align: center;
}

.top-title {
  font-size: 22px;
  color: #f7a8a8;
  margin-bottom: 24px;
}

.top-image img {
  max-width: 100%;
  height: auto;
  margin-bottom: 24px;
  display: block;
}

.top-subtext {
  color: #f7a8a8;
  font-size: 18px;
  margin-bottom: 24px;
}

.start-button {
  display: inline-block;
  padding: 15px 28px;
  background-color: #fa9b9b;
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: normal;
  border-radius: 10px;
  transition: background-color 0.3s ease;
}

.start-button:hover {
  background-color: #ffdedf;
}

/* ===== タブ風ボタンボックス ===== */
.tab-container {
  background-color: #fcdcdc;
  border: 2px solid #fcbdbd;
  padding: 3px 6px;
  display: flex;
  gap: 4px;
  justify-content: flex-start;
  border-top: none;
}

.tab-button {
  background-color: #ffbaba;
  color: #fff;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background-color 0.3s;
}

.tab-button:hover {
  background-color: #fa9b9b;
}

.tab-button.active {
  background-color: #fa9b9b;
}

.tab-button i {
  font-size: 0.85rem;
}

/* ===== プロフィールセクション ===== */
.profile-section {
  border: 2px solid #f9c0c0;
  padding: 25px;
  padding-top: 15px;
}

.profile-box {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.profile-image {
  flex: 0 0 30%;
  text-align: center;
}

.profile-image img {
  max-width: 100%;
  height: auto;
}

.profile-message {
  flex: 1;
  text-align: center;
}

.profile-heading {
  color: #fa9b9b;
  font-size: 1.35rem;
  margin-bottom: 12px;
}

.profile-text {
  color: #f7a8a8;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ===== 医師紹介セクション ===== */
.doctor-title {
  text-align: center;
  color: #ce9ef7;
  font-size: 1.35rem;
  margin: 1.5rem 0 0.5rem;
}

.doctor-section {
  border: 2px solid #d5b0f5;
  background-color: white;
  border-radius: 12px;
  padding: 25px;
  margin-bottom: 1.3rem;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}

.doctor-box {
  display: flex;
  width: 100%;
  display: flex;
  flex-direction: row;
}

.doctor-image {
  width: 30%;
  text-align: center;
}

.doctor-image img {
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 2px solid #d5b0f5;
  object-fit: cover;
}

.doctor-name {
  margin-top: 15px;
  font-weight: bold;
  color: #ce9ef7;
  font-size: 1.1rem;
  text-align: center;
}

.doctor-description {
  width: 70%;
  text-align: center;
  color: #d0a6f5;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* ===== 患者記録セクション ===== */
.cosmo-title {
  text-align: center;
  color: #fa8787;
  font-size: 1.35rem;
  margin: 1.5rem 0 0.5rem;
}

.doctor-section.cosmo {
  border-color: #fa9b9b;
}

.cosmo .doctor-image img {
  border-color: #fa9b9b;
}

.cosmo .doctor-name {
  color: #ff8787;
}

.cosmo .doctor-description {
  color: #fa9b9b;
}

/* ===== 特別診療記録セクション ===== */
.special-title {
  text-align: center;
  color: #b09cd8;
  font-size: 1.35rem;
  margin: 1.5rem 0 0.5rem;
}

.doctor-section.nyx {
  border-color: #b09cd8;
}

.doctor-section.nyx .doctor-image img {
  border: 2px solid #b09cd8;
}

.doctor-section.nyx .doctor-name {
  color: #a083c9;
}

.doctor-section.nyx .doctor-description {
  color: #b09cd8;
}

/* ===== 院外処方窓口セクション ===== */
.link-heading {
  text-align: center;
  color: #fa9b9b;
  font-size: 1.35rem;
  margin-bottom: 1.2rem;
}

.link-text {
  font-size: 1.1rem;
}

/* ===== 装飾オプション ===== */
.dotted-divider {
  border: none;
  border-top: 2px dotted #f7a8a8;
  margin: 30px auto;
  width: 60%;
}

.source-label {
  font-size: 0.8rem;
  color: #dac1c1;
  text-align: center;
  margin-top: 5px;
  margin-bottom: 16px;
  font-family: inherit;
}

.narrow-gap {
  margin-top: 6px;
}

.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffbaba;
  color: white;
  padding: 10px 14px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  transition: opacity 0.3s ease;
}

.scroll-to-top:hover {
  opacity: 0.7;
}

/* ===== 閉鎖病棟 隔離室セクション ===== */
.forbidden-header {
  background: linear-gradient(160deg, #e8d8f7 0%, #ffffff 100%);
  border: 2px solid #d7b3f7;
  border-bottom: 2px solid #d7b3f7;
}

.forbidden-header-url {
  color: #be8dd6;
}

.forbidden-header-icons i {
  color: #be8dd6;
}

.forbidden-tab-container {
  background-color: #e0c3fa;
  border: 2px solid #d7b3f7;
}

.forbidden-tab-button {
  background-color: #be8dd6;
  color: #fff;
}

.forbidden-tab-button:hover {
  background-color: #ead9f8;
}

.forbidden-tab-button.active {
  background-color: #874ba5;
}

.forbidden-section {
  border: 2px solid #d7b3f7;
}

.forbidden-heading {
  color: #a875b5;
}

.forbidden-text {
  color: #a875b5;
}

.forbidden-button {
  background-color: #874ba5;
  color: white;
}

.forbidden-button:hover {
  background-color: #ead9f8;
}

.forbidden-close-button i {
  color: #be8dd6;
}

.forbidden-close-button:hover i {
  color: #ead9f8;
}

/* レスポンシブ（スマホ対応） */
@media (max-width: 768px) {
  /* 画像のサイズ調整（画像が幅を超えないように） */
  img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .inner-wrapper {
    width: 95%;
    margin-bottom: 6vh;
  }

  .header-url {
    font-size: 0.85rem;
  }

  /* flex横並びだったやつを縦に並べる */
  .doctor-box,
  .profile-box {
    max-width: 100%;
    height: auto;
    flex-direction: column;
    align-items: center;
  }

  /* 左側の画像部分、全幅で中央に */
  .doctor-image {
    max-width: 100%;
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .profile-image {
    width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* 右側のテキスト部分も全幅に */
  .top-subtext,
  .doctor-description,
  .profile-text,
  .link-text,
  .forbidden-text,
  .doctor-section.nyx .doctor-description,
  .cosmo .doctor-description {
    line-height: 1.8;
    width: 100%;
    text-align: center;
    font-size: 1rem;
  }

  .source-label {
    font-size: 0.75rem;
  }

  /* タイトルや見出し少し小さく */
  .top-title,
  .doctor-title,
  .cosmo-title,
  .special-title,
  .profile-heading,
  .link-heading,
  .forbidden-heading,
  .doctor-name {
    font-size: 1.2rem;
  }

  /* タブボタン */
  .tab-button,
  .tab-button.active,
  .forbidden-tab-button,
  .forbidden-tab-button.active {
    max-width: 100%;
    height: auto;
    min-width: 0;
    font-size: 0.8rem;
    padding: 7px 9px;
    gap: 6px;
    border-radius: 7px;
    text-align: center;
    white-space: normal;
  }

  /* ボタンサイズ変更 */
  .start-button,
  .start-button {
    font-size: 1.05rem;
    padding: 12px 16px;
  }
}

.scroll-to-top {
  font-size: 0.78rem;
  padding: 9px 12px;
}

/* タブレット対応レスポンシブ */
@media screen and (min-width: 601px) and (max-width: 1024px) {
  .top-subtext,
  .doctor-description,
  .profile-text,
  .link-text,
  .forbidden-text,
  .doctor-section.nyx .doctor-description,
  .cosmo .doctor-description {
    font-size: 1.5rem;
  }

  .header-url {
    font-size: 1.2rem;
  }

  .top-title,
  .doctor-title,
  .cosmo-title,
  .special-title,
  .profile-heading,
  .link-heading,
  .forbidden-heading,
  .doctor-name {
    font-size: 1.45rem;
  }

  .source-label {
    font-size: 0.98rem;
  }

  /* タブボタン */
  .tab-button,
  .tab-button.active,
  .forbidden-tab-button,
  .forbidden-tab-button.active {
    font-size: 1.2rem;
  }

  /* ボタンサイズ変更 */
  .start-button,
  .start-button {
    font-size: 1.4rem;
  }

  .scroll-to-top {
    font-size: 1.1rem;
  }
}
