/* ============================================
   基本設定（全ページ共通）
============================================ */
html, body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  -webkit-text-size-adjust: 100%;
  touch-action: pan-y;
  height: 100%;
}
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================
   投稿エリア（チャット関連）
============================================ */
.chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  margin-bottom: 32vh;
}
.post {
  margin-bottom: 15px;
  border-bottom: 1px solid #ccc;
  padding-bottom: 10px;
  text-align: center;
}
.post .name {
  font-weight: bold;
  margin-bottom: 4px;
}
.post .time {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 6px;
}
.post .message {
  font-size: 1em;
  margin-bottom: 10px;
  white-space: pre-line;
}
.post .image img {
  width: 300px;
  max-width: 90%;
  height: auto;
  border-radius: 6px;
  cursor: pointer;
  margin: 10px auto;
  display: block;
}

/* ============================================
   入力フォーム（チャットページ）
============================================ */
form.fixed-form {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0 auto;
  background: #f8f8f8;
  border-top: 1px solid #ccc;
  padding: 10px;
  z-index: 100;
  width: 100%;
  max-width: 800px;
  font-size: 130%;
  box-sizing: border-box;
}

textarea,
input[type="text"],
input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0;
  font-size: 1em;
}

textarea {
  resize: none;
  overflow: hidden;
  max-height: 30vh;
  min-height: 3em;
}

form.fixed-form button {
  font-size: 1.4em;
  padding: 1em;
  width: 100%;
  background-color: #6e7955;
  color: white;
  border: none;
  border-radius: 6px;
}

input[type="file"] {
  font-size: 1.1em;
  padding: 0.8em;
  background: #83ccd2;
  color: #000;
  border-radius: 6px;
}

/* 拡大画像ポップアップ */
.img-popup {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}
.img-popup img {
  max-width: 90vw;
  max-height: 90vh;
  border: 2px solid #fff;
  border-radius: 8px;
}

/* お知らせ・URL通知 */
.notice {
  font-size: 0.9em;
  padding: 10px;
  background: #f0f0f0;
}
.url-info {
  font-size: 0.9em;
  margin-top: 0.5em;
  color: #444;
  word-break: break-word;
}
.url-notice {
  font-size: 0.95em;
  color: #444;
  background: #f4f4f4;
  padding: 10px;
  margin-top: 10px;
  border-left: 4px solid #ccc;
}

/* トップページ用 */
header, footer {
  text-align: center;
  padding: 1em;
  background: #f4f4f4;
}
.form-box {
  max-width: 600px;
  margin: 2em auto;
  padding: 1em;
  background: #fff;
  border: 1px solid #ccc;
}
.form-box h1 {
  font-size: 1.6em;
  margin-bottom: 0.5em;
}
.form-box label {
  display: block;
  margin: 1em 0 0.3em;
}
.form-box input[type="text"],
.form-box textarea,
.form-box input[type="file"] {
  width: 100%;
  padding: 0.5em;
  font-size: 1em;
}
.form-box button {
  margin-top: 1.5em;
  font-size: 1.2em;
  padding: 0.8em 1em;
  width: 100%;
}
.note {
  font-size: 0.75em;
  color: green;
  margin-top: 0.3em;
}
.copy-section {
  max-width: 800px;
  margin: 3em auto;
  padding: 0 1em;
}
.copy-section h2 {
  font-size: 1.3em;
  color: #333;
  text-align: center;
  margin-bottom: 1em;
}
.copy-section p {
  font-size: 1em;
  line-height: 1.6;
  margin: 0.5em 0;
  color: #555;
}
.copy-large {
  font-size: 1.5em;
  font-weight: bold;
  text-align: center;
  margin: 1em 0;
  color: #c00;
}
.user-header {
  font-size: 1em;
  font-weight: bold;
  color: #333;
  padding: 1em;
  background: #f4f4f4;
  text-align: center;
}
.user-sub {
  font-size: 0.9em;
  font-weight: normal;
  margin-top: 0.3em;
}
.error {
  font-size: 0.9em;
  color: red;
}
/* 管理者からの返信を分かりやすくするためのスタイルを追加  */
.admin-post { background-color: #e0f7ff; border-left: 4px solid #007b43; }
.file-label { display:inline-block; padding: 8px 12px; background-color:#ccc; border-radius:4px; cursor:pointer;}
.fixed-form input[type="file"] { display: none; }
