@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === 背景を直接 body に描く：はっきり変わります === */
body {
  --accent: #007acc;
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
}
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  background: #f9f9f9;
  color: #333;
  margin: 0;
  padding: 0;
}
h1 {
  text-align: center;
}
main {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 15px;
}

/* 各セクションをカード風に */
section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 15px;
  border-left: 4px solid #007acc;
  padding-left: 10px;
  color: #007acc;
}

/* フォームのラベルと入力 */
form label {
  display: block;
  margin-bottom: 12px;
  font-weight: bold;
  color: #444;
}

form input,
form select {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1rem;
  transition: border 0.3s, box-shadow 0.3s;
}

form input:focus,
form select:focus {
  border-color: #007acc;
  box-shadow: 0 0 5px rgba(0, 122, 204, 0.3);
  outline: none;
}

/* ボタン */
button {
  background: #007acc;
  color: #fff;
  padding: 10px 18px;
  font-size: 1rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: background 0.3s;
}

button:hover {
  background: #005fa3;
}

/* 写真切替セクション */
.photo-section img {
  display: block;
  margin: 0 auto 15px;
  border-radius: 10px;
  border: 2px solid #eee;
}

.photo-buttons {
  text-align: center;
}

.photo-buttons button {
  margin: 0 5px;
  background: #eee;
  color: #333;
}

.photo-buttons button:hover {
  background: #007acc;
  color: #fff;
}

/* 履歴リスト */
.history-list ul {
  list-style: none;
  padding: 0;
}

.history-list li {
  background: #f1f9ff;
  border: 1px solid #cce6ff;
  padding: 10px;
  margin-bottom: 8px;
  border-radius: 6px;
}
/* ここから */

.last-history {
  background: #fff8e1;
  border: 1px solid #fdd835;
  border-radius: 8px;
  padding: 16px;
  margin: 20px auto;
  max-width: 600px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.history-list {
  max-width: 600px;
  margin: 20px auto;
}
#history {
  list-style: none;
  padding: 0;
}

#history li {
  display: flex; /* ← 追加：横並び */
  align-items: center; /* ← 追加：縦位置そろえ */
  gap: 10px; /* ← 追加：ボタンとの間隔 */
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: pointer;
}

#history li:hover {
  background: #f9fafb;
}

/* 選択中の履歴 */
#history li.active {
  outline: 2px solid #007acc;
  background: #e6f3ff;
}

/* 前回カルテ内の写真プレビュー */
.last-history .last-photo img {
  max-width: 160px;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  display: block;
  margin-top: 8px;
}
/* 削除ボタン */
#history .del-btn {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  width: 28px;
  height: 28px;
  line-height: 26px;
  padding: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  flex: 0 0 auto;
}
#history .del-btn:hover {
  background: #fecaca;
}

/* 行テキスト（残り幅いっぱい） */
#history .row-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 選択中ハイライト（クリックで選択された行） */
#history li.active {
  outline: 2px solid #007acc;
  background: #e6f3ff;
}

/* （前回入れてなければ）前回カルテ内の縮小画像 */
.last-history .last-photo img {
  max-width: 160px;
  height: auto;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  display: block;
  margin-top: 8px;
}

/* こちらを使う場合は上のflex指定は不要 */
footer {
  text-align: center;
  padding: 16px 0;
}
footer p {
  margin: 6px 0 0;
}
footer a {
  text-decoration: none;
  color: #007acc;
  font-size: clamp(1.1rem, 2.2vw, 1.3rem); /* 最小1.1rem ~ 最大1.3rem */
  font-weight: 700; /* ちょい太字 */
  letter-spacing: 0.02em;
}

/* 横いっぱい背景のフッター */
.footer-hero {
  position: relative;
  width: 100%;
  min-height: 340px; /* 高さはお好みで */
  color: #fff;
  background: url("./sunset-img/sanset-img7.jpg") center/cover no-repeat fixed;
  /* ↑ fixedで軽いパララックス。不要なら fixed を消してください */
}

/* 文字の可読性を上げる薄いグラデフィルム */
.footer-hero .footer-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.15));
  /* 濃くしたければ 0.45/0.15 を上げる */
}

/* 中身のレイアウト */
.footer-hero .footer-inner {
  position: relative; /* オーバーレイ上に表示 */
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(24px, 6vw, 64px) 16px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr; /* 左：住所など／右：SNS・リンク */
  gap: 24px;
}

.footer-hero a {
  color: #fff;
  text-decoration: underline;
}
.footer-hero a:hover {
  opacity: 0.9;
}

/* 左側の情報 */
.footer-hero .footer-info p {
  margin: 6px 0;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* 右側：SNS・リンク・コピーライト */
.footer-right {
  display: grid;
  gap: 12px;
  align-content: start;
}
.social-links {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.social-links img {
  width: 32px;
  height: auto;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
}
.logo-qr {
  width: 80px;
  height: auto;
  margin-left: 6px;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-links a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  text-decoration: none;
  backdrop-filter: blur(2px);
}
.footer-links a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.footer-hero .copyright {
  margin: 6px 0 0;
  opacity: 0.9;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* モバイル：縦並びにして中央寄せ */
@media (max-width: 640px) {
  .footer-hero .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .social-links {
    justify-content: center;
  }
  .footer-links {
    justify-content: center;
  }
}
.menu-section li {
  margin-left: 5%;
}
.hamburger {
  position: fixed;
  top: 30px;
  right: 60px; /* ←「少し左に寄せる」調整はここで */
  width: 44px; /* アイコンの横幅 */
  height: 32px; /* アイコンの縦幅（3本の上下関係を決める）*/
  color: #333; /* 線の色は currentColor を使用 */
  cursor: pointer;
  z-index: 1100;
  -webkit-tap-highlight-color: transparent;
}

/* クリックしやすくするため、内側の要素はポインタイベント無効に */
.hamburger * {
  pointer-events: none;
}

/* 3本線の共通スタイル */
.hamburger span {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px; /* 線の太さ（4pxにすると少し力強い見た目に） */
  background: currentColor; /* 親の color を引き継ぐ */
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.2s ease, width 0.2s ease, background-color 0.25s ease;
}

/* 上・中・下の配置 */
.hamburger span:nth-child(1) {
  top: 0;
}
.hamburger span:nth-child(2) {
  top: calc(50% - 1.5px);
} /* 1.5px = 高さ3pxの半分 */
.hamburger span:nth-child(3) {
  bottom: 0;
}

/* アクティブ時（X形状） */
.hamburger.active span:nth-child(1) {
  /* 上線を中央まで下げてから 45deg 回転 */
  transform: translateY(14px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  /* 真ん中の線は消す（幅縮小も加えるとキレイ） */
  opacity: 0;
  transform: scaleX(0.6);
}
.hamburger.active span:nth-child(3) {
  /* 下線を中央まで上げてから -45deg 回転 */
  transform: translateY(-14px) rotate(-45deg);
}

/* お好みで色の切り替え（背景が暗いときなど） */
/* .hamburger.active { color: #000; } */

/* 端末が「動きを減らす」設定のときはアニメ無効に */
@media (prefers-reduced-motion: reduce) {
  .hamburger span {
    transition: none;
  }
}

#nav {
  position: fixed;
  top: 0;
  right: -260px;
  width: 260px;
  height: 100dvh;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 80px 20px 24px;
  transition: right 0.3s ease-in-out;
  z-index: 1000;
}

#nav.active {
  right: 0;
}

#nav a {
  display: block;
  padding: 12px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: #1f2937;
  background: transparent;
  transition: color 0.6s ease, background 0.6s ease;
}

#nav a:hover,
#nav a:focus-visible {
  color: #0ea5e9;
  background: rgba(14, 165, 233, 0.12);
  outline: none;
}

#nav a:active {
  background: rgba(14, 165, 233, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  #nav a {
    transition: none;
  }
}
