html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: lightyellow; /* ★演習のため lightyellow を維持 */
  font-family: sans-serif;
}
a,a:visited{
  color: blue;
}
.title {
    width: 100%;
    height: 60px;
    flex-shrink: 0;
}
.title_text{
  font-size: 30px;
  text-align: center;
}

/* ★変更: .chat から .review-container へ */
.review-container {
    width: 90%;
    max-width: 800px; /* ★追加: 最大幅を設定 */
    margin: 0 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #f4f4f4; /* ★変更: 背景色をニュートラルに */
    border: 1px solid #ddd;
    border-bottom: none;
    overflow: hidden; /* ★追加: 子要素のスクロールを管理 */
}

/* ★追加: 商品情報ブロック */
.product-info {
  display: flex;
  padding: 20px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  flex-shrink: 0;
}
.product-image-placeholder {
  width: 100px;
  height: 100px;
  background: #eee;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  margin-right: 20px;
}
.product-image-placeholder img{
  width: 100%;
  height: 100%;
}
.product-details {
  flex-grow: 1;
}
.product-details h3 {
  margin-top: 0;
}

/* ★変更: .chat-display から .review-list へ */
.review-list {
    width: 100%;
    flex-grow: 1;
    overflow-x: hidden;
    overflow-y: auto;
    word-wrap: break-word;
    padding: 0 20px;
    background: #fff;
    box-sizing: border-box; /* ★追加: paddingを含めて幅100%にする */
}
.review-list-title {
  font-size: 24px;
  font-weight: bold;
  padding: 20px 0 10px 0;
  border-bottom: 2px solid #eee;
}


/* ★削除: .send, .receive, .send:after, .receive:after */

/* ★追加: .system-message (旧.receiveの代わり) */
.system-message {
  position: relative;
  font-size: 16px;
  display: block;
  width: 95%;
  margin: 15px auto;
  padding: 15px;
  background: #e6f7ff;
  text-align: left;
  border-radius: 8px;
  border: 1px solid #b3e0ff;
}

/* ★追加: .review-post (旧.sendの代わり) */
.review-post {
  position: relative;
  font-size: 16px;
  display: block;
  width: 95%;
  margin: 15px auto;
  padding: 15px;
  background: #ffffff;
  text-align: left;
  border-radius: 8px;
  border: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  word-wrap: break-word;
}
.review-author {
  font-weight: bold;
  margin-bottom: 8px;
  color: #333;
}
.review-body {
  color: #555;
  line-height: 1.6;
}


/* ★変更: .editor から .review-form へ */
.review-form {
    height: 120px;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    display: flex; /* ★追加: flexで内部を調整 */
}

/* ★変更: .chat_editor_message から .review-textarea へ */
.review-textarea{
  height: 80px;
  overflow: auto;
  font-size: 16px;
  width: 100%; /* ★変更: e_mの中で100%に */
  border: 1px solid #ccc;
  background-color: white;
  resize: none;
  box-sizing: border-box; /* ★追加 */
  padding: 8px; /* ★追加 */
  border-radius: 4px; /* ★追加 */
}

.e_m{
  height: 100%;
  flex-grow: 1; /* ★変更: 幅を自動で伸ばす */
  padding: 20px; /* ★変更: 余白を調整 */
  box-sizing: border-box;
}
.e_b{
  width: 160px; /* ★変更: ボタン幅を確保 */
  height: 100%;
  flex-shrink: 0; /* ★変更: 縮まないように */
  padding: 20px 20px 20px 0; /* ★変更: 右側に余白 */
  box-sizing: border-box;
  display: flex; /* ★追加: ボタンを中央揃え */
  align-items: center; /* ★追加: ボタンを中央揃え */
  justify-content: center; /* ★追加: ボタンを中央揃え */
}

/* ★追加: 新しい投稿ボタン */
.review-submit-btn {
  width: 100%;
  height: 80px;
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  color: #111;
  background-color: #ffd814; /* Amazon風イエロー */
  border: 1px solid #fcd21c;
  border-radius: 8px;
  cursor: pointer;
}
.review-submit-btn:hover {
  background-color: #f7ca00;
}


/* ★削除: .img スタイル */
/* .img { ... } */

.btn{
  border: 1px solid #ccc;
  color: #333;
  font-size: 14px;
  background: #f0f0f0;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.btn:hover{
  background: #e0e0e0;
}

.review-footer {
  display: flex;
  justify-content: flex-end; /* 中身（ボタン）を右に寄せる */
  margin-top: 15px; /* 投稿本文とのマージン */
}

footer {
    width: 100%;
    text-align: center;
    padding: 10px 0;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 0.85em;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0; /* ★追加 */
}
footer a{
    color: #6c757d;
}

.link_text, .link_text:focus{
  border: 1px solid #ccc;
  font-size: 16px;
  width: 250px;
  outline: none;
  text-align: center;
  padding: 4px;
  border-radius: 4px;
}