/* =========================================================
  🦉 app.css（アプリ全体の基盤スタイル）
  ---------------------------------------------------------
  目的：
  - 全ページ共通の土台（レイアウト/背景/共通UI）
  - トップページ（黒板UI）は no-scroll で固定
  - それ以外のページはスクロールできる（フォーム等が崩れない）
  ---------------------------------------------------------
  ページ固有の演出は 👉 owls.css（/owls#index）へ
========================================================= */

/* =========================================================
  0. リセット / ベース
========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

/*  基本はスクロールOK（フォームや規約ページが死なない） */
html,
body {
  overflow-x: hidden;
  overflow-y: auto;
}

/* トップ（黒板UI）だけ固定したいとき用 */
html.no-scroll,
body.no-scroll {
  height: 100%;
  overflow: hidden !important;
}

/* iOS系の安全策 */
body {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

/* =========================================================
  1. 教室背景コンテナ（トップで使用）
========================================================= */
.classroom-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  height: 100vh;
  width: 100vw;

  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* 背景画像 */
.forest-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.1);
  z-index: -1;
  transition: all 0.8s ease;
}

/* =========================================================
  2. 共通ページ用コンテナ（トップ以外のベース）
  - 規約/フォーム/設定/一覧など
========================================================= */
.page-container {
  width: min(980px, calc(100% - 32px));
  margin: 80px auto 40px;
  padding: 18px 16px;

  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.18),
    inset 0 0 12px rgba(255, 255, 255, 0.10);
}

/* ページ見出し */
.page-container h1 {
  margin: 0 0 14px;
  font-size: 28px;
  color: rgb(255, 196, 0);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.page-container p,
.page-container li,
.page-container label {
  color: rgba(0, 0, 0, 0.85);
  text-shadow: 0 1px 2px rgba(255,255,255,0.35);
}

/* =========================================================
  3. フクちゃん（共通キャラ：トップなど）
========================================================= */
.fukuchan-global {
  position: fixed;
  bottom: calc(-2% + env(safe-area-inset-bottom));
  right: 22%;
  width: clamp(150px, 20vw, 250px);
  height: auto;
  border-radius: 50%;
  z-index: 1500;
  cursor: pointer;
  pointer-events: auto;

  opacity: 0;
  filter: blur(20px);
  transform: scale(1.2);
  transition: all 0.6s ease;
}

.fukuchan-visible {
  opacity: 0.98;
  filter: brightness(1.00) contrast(0.90) saturate(0.9);
  transform: scale(1);
}

/* 💻 〜1500px */
@media (max-width: 1500px) {
  .fukuchan-global {
    bottom: calc(-1.5% + env(safe-area-inset-bottom));
    right: 20%;
    width: clamp(130px, 22vw, 220px);
  }
}

/* 📚 〜1300px */
@media (max-width: 1300px) {
  .fukuchan-global {
    bottom: calc(-1% + env(safe-area-inset-bottom));
    right: 18%;
    width: clamp(120px, 24vw, 200px);
  }
}

/* 📱 超横長 */
@media (max-width: 1300px) and (max-height: 700px) {
  .fukuchan-global {
    bottom: calc(-1% + env(safe-area-inset-bottom));
    right: 24%;
    width: clamp(80px, 18vw, 160px);
  }
}

/* 📱 〜850px */
@media (max-width: 850px) {
  .fukuchan-global {
    bottom: calc(-1% + env(safe-area-inset-bottom));
    right: 30%;
    width: clamp(80px, 20vw, 110px);
  }
}

/* 📱 〜768px */
@media (max-width: 768px) {
  .fukuchan-global {
    bottom: calc(-1% + env(safe-area-inset-bottom));
    right: 25%;
    width: clamp(60px, 18vw, 110px);
  }
}

/* =========================================================
  4. BGMコントロール（共通）
========================================================= */
.bgm-controls {
  position: fixed;
  bottom: 40px;
  left: 0px;
  z-index: 1000;

  background: #4ba26525;
  padding: 10px;
  border-radius: 10px;

  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;

  transition: all 0.3s ease;
}

.bgm-controls:hover {
  transform: translateY(-2px);
}

.bgm-btn {
  background: #4ba26517;
  color: rgb(217, 255, 0);
  border: none;
  padding: 8px 12px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.bgm-btn:hover {
  color: rgb(170, 255, 0);
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(129, 162, 75, 0.3);
}

.bgm-btn:active {
  transform: scale(0.98);
}

.volume-slider {
  width: 80px;
  height: 2px;
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  appearance: none;
  transition: all 0.2s ease;
}

.volume-slider:hover {
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
}

.volume-slider::-webkit-slider-thumb {
  appearance: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(208, 255, 0, 0.8) !important;
  cursor: pointer;
  border: none !important;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.volume-slider:hover::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  background: rgb(217, 255, 0) !important;
  box-shadow: 0 0 8px rgba(217, 255, 0, 0.5) !important;
}

/* 再生中のパルス */
.bgm-controls.playing {
  animation: pulse 2s infinite;
}

/* =========================================================
  5. 時計（共通）
========================================================= */
.clock-display {
  background: linear-gradient(135deg, #66ea7c18 0%, #4ba26525 100%);
  color: rgb(217, 255, 0);

  padding: 8px 12px;
  border-radius: 6px;

  font-family: 'Arial', sans-serif;
  font-size: 16px;
  font-weight: bold;

  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.205);
  margin: 0 !important;

  display: inline-block;
  position: fixed !important;
  bottom: 0 !important;
  left: 0px !important;
  z-index: 2000;
}

/* =========================================================
  6. 共通アニメーション
========================================================= */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(75, 162, 101, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(75, 162, 101, 0); }
  100% { box-shadow: 0 0 0 0 rgba(75, 162, 101, 0); }
}

/* =========================================================
  7. 右上のログイン / ログアウト
========================================================= */
.auth-links {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 9999;

  display: flex;
  align-items: center;
  gap: 6px;

  padding: 6px 10px;
  border-radius: 10px;

  background: rgba(255, 255, 255, 0.024);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.18),
    inset 0 0 10px rgba(255, 255, 255, 0.12);
}

.auth-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: rgb(255, 196, 0);
  cursor: pointer;
  text-decoration: none;
  appearance: none;
}

.auth-link:focus {
  outline: none;
}

.auth-link:hover,
.auth-btn:hover {
  color: rgb(0, 255, 128);
  text-decoration: underline;
}

.auth-sep {
  color: rgba(255, 255, 255, 0.35);
}

/* =========================================================
  8. 掲示板へ戻る（共通）
========================================================= */
.back-to-board {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 9999;
}

.back-to-board__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 14px;
  border-radius: 12px;
  text-decoration: none;
  font-size: 14px;

  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.22);

  color: rgb(255, 255, 255);
  text-shadow: 0 1px 2px rgba(0,0,0,0.85);

  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.25),
    inset 0 0 10px rgba(255, 255, 255, 0.10);
}

.back-to-board__btn:hover {
  color: rgb(255, 213, 0);
  text-decoration: underline;
}

/* =========================================================
  9. フォーム（投稿/設定/Devise共通で使える）
========================================================= */
.form-group {
  margin-bottom: 16px;
}

input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.75);
}

textarea {
  resize: vertical;
}

.form-note {
  margin: 12px 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

.form-actions {
  margin-top: 16px;
  text-align: right;
}

.primary-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.12);
  cursor: pointer;
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.form-errors {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,0,0,0.35);
  background: rgba(255,0,0,0.08);
}

.form-footer-links {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.footer-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  color: rgba(0,0,0,0.85);
}

.footer-link:hover {
  color: rgb(0, 255, 128);
}

.footer-sep {
  opacity: 0.6;
}

/* =========================================================
  10. owl showページ
  - showページは縦スクロール許可
========================================================= */
body.owl-show-page {
  background-image: url("/assets/tisikinomori_winter-25c0ba62.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

html.owl-show-page,
body.owl-show-page {
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: auto !important;
  min-height: 100%;
}

/* =========================================================
  👤 ユーザー設定
========================================================= */

/* ヘッダーの色を強めて “ページ感” を出す */
.page-container.user-settings-index .page-header,
.page-container.user-settings-page .page-header {
  background: linear-gradient(200deg, #3f5bd9 0%, #2e3f9f 100%);
  border-bottom: 1px solid rgba(0,0,0,0.12);
}

.page-container.user-settings-index .page-header h1,
.page-container.user-settings-page .page-header h1 {
  text-align: center;
  color: #ffd000;
  text-shadow: 0 2px 5px rgba(0,0,0,0.25);
  letter-spacing: 0.05em;
}

.page-container.user-settings-page .notice,
.page-container.user-settings-page .alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 900;
  border: 1px solid rgba(0,0,0,0.12);
}

.page-container.user-settings-page .notice {
  background: rgba(0, 220, 120, 0.12);
  color: rgba(0,0,0,0.80);
}

.page-container.user-settings-page .alert {
  background: rgba(255, 80, 80, 0.10);
  color: rgba(0,0,0,0.80);
  border-color: rgba(255, 80, 80, 0.25);
}

/* 退会ページのボタンを“危険操作”っぽく */
.page-container.user-settings-page .danger-btn,
.page-container.user-settings-page .danger button,
.page-container.user-settings-page .danger input[type="submit"] {
  background: #ff5050;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.page-container.user-settings-page .danger-btn:hover,
.page-container.user-settings-page .danger button:hover,
.page-container.user-settings-page .danger input[type="submit"]:hover {
  filter: brightness(0.95);
}

/* =========================================================
  ⭐ お気に入り一覧（黄色寄り）
========================================================= */

.page-container.favorites-page {
  width: min(1040px, calc(100% - 32px));
  margin: 50px auto;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(0,0,0,0.14);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.page-container.favorites-page .page-header {
  background: linear-gradient(180deg, #ffe082 0%, #ffbf00 100%);
  padding: 14px 18px;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

.page-container.favorites-page .page-header h1{
  margin: 0;
  font-size: 24px;
  font-weight: 900;
  text-align: center;

  /*  共通 .page-container h1 の「黄色」を打ち消す */
  color: #111;
  text-shadow: none;
}

.page-container.favorites-page .page-body{
  padding: 18px 22px 20px;
}

.favorites-board{
  background: rgba(255, 214, 102, 0.22);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  padding: 14px;
}

/* 崩れの原因になりがちな ul/li のデフォルトを殺す */
.favorites-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.favorites-item{
  margin: 0;
}

/* カードを横幅100%で「ブロックリンク」に */
.favorite-card{
  display: block;
  width: 100%;
  text-decoration: none;

  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);

  /*  aタグの青/紫を消して中身の文字色を統一 */
  color: rgba(0,0,0,0.88);
}

.favorite-card:visited{
  color: rgba(0,0,0,0.88);
}

.favorite-card:hover{
  transform: translateY(-1px);
  color: rgba(0,0,0,0.88);
}

.favorite-meta{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.favorite-category{
  font-size: 12px;
  font-weight: 900;
  color: rgba(0,0,0,0.75);
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.10);
  padding: 3px 10px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.favorite-title{
  font-size: 14px;
  font-weight: 900;
  color: rgba(0,0,0,0.88);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* =========================================================
  📝 お悩み募集
========================================================= */
.page-container.advice-form {
  width: min(1040px, calc(100% - 32px));
  margin: 50px auto 50px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow: none;
}

/* 上の帯：えんじ〜赤茶 */
.page-container.advice-form .page-header {
  background: linear-gradient(180deg, #c73636 0%, #d21818 100%);
  padding: 14px 18px;
  border-radius: 10px 10px 0 0;
}

.page-container.advice-form .page-header h1 {
  margin: 0;
  font-size: 24px;
  color: #ffb700;
  text-shadow: none;
  font-weight: 800;
  text-align: center;
}

/* 本体余白 */
.page-container.advice-form .page-body {
  padding: 18px 22px 16px;
}

.page-container.advice-form .form-group {
  margin-bottom: 18px;
}

.page-container.advice-form .form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 800;
  color: #111;
}

.page-container.advice-form .form-control {
  width: 100%;
  border-radius: 0;
  border: 1px solid #666;
  background: #fff;
  padding: 10px 12px;
  font-size: 16px;
}

/* 本文はしっかり大きく */
.page-container.advice-form .form-textarea {
  min-height: 450px;
  max-height: 55vh;
}

/* 注意文 */
.page-container.advice-form .form-note {
  margin: 12px 0 16px;
  font-size: 13px;
  color: rgba(60, 0, 0, 0.65);
}

/* 投稿ボタン */
.page-container.advice-form .form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.page-container.advice-form .btn-submit {
  border: none;
  border-radius: 0;
  background: linear-gradient(180deg, #c73636 0%, #d21818 100%);
  color: #ffd000;
  padding: 12px 22px;
  font-weight: 800;
  cursor: pointer;
}

.page-container.advice-form .btn-submit:hover {
  filter: brightness(0.95);
}

/* 下部リンク：中央寄せ */
.page-container.advice-form .footer-links {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.15);
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.page-container.advice-form .footer-link {
  color: #111;
  text-decoration: none;
  font-weight: 700;
}

.page-container.advice-form .footer-link:hover {
  text-decoration: underline;
}

.page-container.advice-form .footer-sep {
  opacity: 0.7;
}

/* エラー：赤と馴染ませる */
.page-container.advice-form .form-errors {
  margin: 14px 18px 0;
  padding: 10px 12px;
  border: 1px solid rgba(127, 29, 29, 0.35);
  background: rgba(127, 29, 29, 0.06);
  border-radius: 6px;
}

/* =========================================================
  🧾 投稿一覧
========================================================= */

.page-container.submissions-page {
  width: min(1040px, calc(100% - 32px));
  margin: 50px auto 50px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.14);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.page-container.submissions-page .page-header {
  background: linear-gradient(180deg, #ffb224 0%, #ff9800 100%);
  padding: 14px 18px;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

.page-container.submissions-page .page-header h1 {
  margin: 0;
  font-size: 24px;
  color: #111;
  text-shadow: none;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.04em;
}

.page-container.submissions-page .page-body {
  padding: 18px 22px 20px;
}

.page-container.submissions-page .notice {
  margin: 0 0 12px;
  color: #2e7d32;
  font-weight: 800;
}

.submissions-board {
  background: linear-gradient(180deg, #ff843d 0%, #f0c901 100%);
  padding: 16px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.10);
}

.submissions-section {
  padding: 10px 10px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(0,0,0,0.08);
}

.submissions-section + .submissions-section {
  margin-top: 14px;
}

.submissions-section h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
  color: rgba(0,0,0,0.85);
  letter-spacing: 0.02em;
}

.submissions-list {
  background: rgba(255,255,255,0.92);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.10);

  min-height: 64px;
  max-height: 160px;
  overflow-y: auto;
}

.submissions-list::-webkit-scrollbar { width: 10px; }
.submissions-list::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.18);
  border-radius: 999px;
}
.submissions-list::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.06);
  border-radius: 999px;
}

/* カード*/
.submission-card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;

  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  padding: 10px 12px;
  padding-left: 30px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.submission-card + .submission-card { margin-top: 10px; }

.submission-card:hover {
  transform: translateY(-1px);
  filter: brightness(0.99);
}

/* 左ライン */
.submission-card::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 12px;
  width: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.12);
}

.submission-card.pending::before  { background: rgba(255, 205, 0, 0.95); }
.submission-card.approved::before { background: rgba(0, 220, 120, 0.85); }
.submission-card.rejected::before { background: rgba(255, 80, 80, 0.85); }

.submission-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  justify-content: space-between;
}

.submission-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 900;
  border-radius: 999px;
  color: #111;
  border: 1px solid rgba(0,0,0,0.10);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  white-space: nowrap;
}

.status-badge.pending  { background: rgba(255, 205, 0, 0.92); }
.status-badge.approved { background: rgba(0, 220, 120, 0.78); }
.status-badge.rejected { background: rgba(255, 80, 80, 0.78); }

.submission-meta .category {
  font-size: 12px;
  font-weight: 900;
  color: rgba(0,0,0,0.70);
  white-space: nowrap;
}

.submission-meta .author {
  font-size: 12px;
  font-weight: 900;
  color: rgba(0,0,0,0.70);
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.10);
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* 本文 */
.submission-body {
  margin: 0;
  color: rgba(0,0,0,0.88);
  text-shadow: none;
  font-size: 14px;
  line-height: 1.75;

  word-break: break-word;
  overflow-wrap: anywhere;
}

.submissions-section .empty {
  margin: 0;
  padding: 2px 0 6px;
  color: rgba(0,0,0,0.55);
  font-size: 12px;
}

.submissions-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* スマホ微調整 */
@media (max-width: 768px) {
  .submission-meta {
    gap: 8px;
  }
  .submission-meta .author {
    max-width: 50%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* =========================================================
  ⚙️ アプリ設定（青寄り）
========================================================= */
.page-container.app-settings-page {
  width: min(1040px, calc(100% - 32px));
  margin: 50px auto 50px;
  padding: 0;
  border-radius: 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.18);
  box-shadow: none;
}

.page-container.app-settings-page .page-header {
  background: linear-gradient(180deg, #6b8cff 0%, #3f5bd9 100%);
  padding: 14px 18px;
  border-radius: 10px 10px 0 0;
}

.page-container.app-settings-page .page-header h1 {
  margin: 0;
  font-size: 24px;
  color: #111;
  text-shadow: none;
  font-weight: 800;
  text-align: center;
}

.page-container.app-settings-page .page-body {
  padding: 18px 22px 20px;
}

.settings-panel {
  background: linear-gradient(180deg, #4b5e9e 0%, #374785 100%);
  padding: 16px;
  border-radius: 8px;
}

.settings-row {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: #f2f2f2;
  border: 1px solid rgba(0,0,0,0.2);
  padding: 14px 16px;
  margin: 0 0 12px;

  font-weight: 800;
  color: #111;
  cursor: pointer;
}

.settings-row:last-child { margin-bottom: 0; }

.settings-row.select-row { cursor: default; }

.settings-row select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.25);
  background: #fff;
  font-weight: 700;
}

.settings-value {
  display: inline-block;
  min-width: 44px;
  text-align: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(63, 91, 217, 0.12);
}

.settings-note {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(0,0,0,0.65);
}

/* =========================================================
  11. ページ別背景メモ
  - body_class で背景を切り替える用
========================================================= */

body.user-settings-page-bg {
  background-image: url("/assets/user_settings_bg-954635ad.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.favorites-page-bg {
  background-image: url("/assets/favorites_bg-5a3d832d.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.advice-form-page-bg {
  background-image: url("/assets/advice_form_bg-a2984398.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.submissions-page-bg {
  background-image: url("/assets/submissions_bg-dea52f35.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.app-settings-page-bg {
  background-image: url("/assets/app_settings_bg-29026d36.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* =========================================================
  📜 利用規約 / プライバシーポリシー 共通
========================================================= */

.page-container.policy-page {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  padding: 28px;
}

.page-container.policy-page h1 {
  text-align: center;
  margin: 0 0 20px;
  font-size: 30px;
  color: #111;
  text-shadow: none;
}

.page-container.policy-page .terms-content {
  text-align: left;
  color: rgba(0, 0, 0, 0.88);
  line-height: 1.9;
  font-size: 15px;
}

.page-container.policy-page .terms-content h2 {
  margin: 26px 0 10px;
  font-size: 18px;
  color: #111;
}

.page-container.policy-page .terms-content p {
  margin: 10px 0;
  text-shadow: none;
}

.page-container.policy-page .terms-content ul {
  margin: 10px 0 14px 18px;
  padding: 0;
}

.page-container.policy-page .terms-content li {
  margin: 6px 0;
}

.page-container.policy-page .terms-end {
  text-align: right;
  margin-top: 32px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* =========================================================
  📌 アドバイス詳細
========================================================= */

.page-container.advice-show-page{
  width: min(1040px, calc(100% - 32px));
  margin: 50px auto;
  padding: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(0,0,0,0.14);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.page-container.advice-show-page .page-header{
  background: linear-gradient(180deg, #ffb224 0%, #ff9800 100%);
  padding: 14px 18px;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

.page-container.advice-show-page .page-header h1{
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  text-align: center;

  /*  共通 .page-container h1 の「黄色」を打ち消す */
  color: #111;
  text-shadow: none;
}

.page-container.advice-show-page .page-body{
  padding: 18px 22px 20px;
}

.advice-show-meta{
  display: flex;
  justify-content: flex-start;
  margin-bottom: 10px;
}

.advice-show-badge{
  font-size: 12px;
  font-weight: 900;
  color: rgba(0,0,0,0.75);
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.10);
  padding: 3px 10px;
  border-radius: 999px;
}

.advice-show-board{
  background: rgba(255, 162, 0, 0.562);
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.18);
  padding: 18px;
}

/*  白文字が背景と喧嘩しやすいので、読みやすさ寄りに調整 */
.advice-show-body{
  color: rgba(0,0,0,0.88);
  text-shadow: none;
  line-height: 1.9;
  font-size: 15px;
  white-space: normal;

  /* 長文の安心 */
  word-break: break-word;
  overflow-wrap: anywhere;
}

.advice-show-actions{
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

/* =========================================================
  🛡️ Admin: 承認待ち一覧（管理者画面）
========================================================= */

.page-container.admin-advice-suggestions-page {
  width: min(1040px, calc(100% - 32px));
  margin: 50px auto 50px;
  padding: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: none;
  border: 1px solid rgba(0,0,0,0.14);
  box-shadow: 0 10px 22px rgba(0,0,0,0.10);
}

.page-container.admin-advice-suggestions-page .page-header {
  background: linear-gradient(180deg, #6f6f6f 0%, #555 100%);
  padding: 14px 18px;
  border-radius: 12px 12px 0 0;
  border-bottom: 1px solid rgba(0,0,0,0.10);
}

.page-container.admin-advice-suggestions-page .page-header h1 {
  margin: 0;
  font-size: 22px;
  color: #ffd000;
  text-shadow: none;
  font-weight: 900;
  text-align: center;
  letter-spacing: 0.04em;
}

.page-container.admin-advice-suggestions-page .page-body {
  padding: 18px 22px 20px;
}

.admin-section {
  margin-top: 14px;
}

.admin-section h2 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 900;
  color: rgba(0,0,0,0.85);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  overflow: hidden;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  vertical-align: top;
  font-size: 14px;
}

.admin-table th {
  background: rgba(0,0,0,0.05);
  font-weight: 900;
}

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.12);
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
  color: #111;
}

.admin-btn:hover { transform: translateY(-1px); }

.admin-btn.approve {
  background: rgba(0, 220, 120, 0.18);
}

.admin-btn.reject {
  background: rgba(255, 80, 80, 0.16);
}

.admin-btn.detail {
  background: rgba(0,0,0,0.06);
}

.admin-body-preview {
  color: rgba(0,0,0,0.85);
  line-height: 1.7;
}

.page-container.admin-advice-suggestions-page .notice {
  margin: 0 0 12px;
  color: #2e7d32;
  font-weight: 900;
}

.page-container.admin-advice-suggestions-page .empty {
  margin: 0;
  color: rgba(0,0,0,0.65);
  font-size: 13px;
}

.admin-detail-link {
  margin-top: 6px;
}

.admin-detail-link a {
  font-size: 12px;
  font-weight: 900;
  color: rgba(60, 0, 0, 0.75);
  background: rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.10);
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
  text-decoration: none;
}

.admin-detail-link a:hover {
  text-decoration: underline;
}

/* =========================================================
  🛡️ Admin: AdviceSuggestion 詳細（show）
========================================================= */

.page-container.admin-advice-suggestions-page.admin-advice-suggestion-show .page-body {
  padding: 18px 22px 24px;
}

.admin-show-meta {
  background: rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  padding: 14px 14px;
}

.admin-show-meta__row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 8px 6px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.admin-show-meta__row:last-child {
  border-bottom: none;
}

.admin-show-meta__row .label {
  font-weight: 900;
  color: rgba(0,0,0,0.65);
}

.admin-show-meta__row .value {
  color: rgba(0,0,0,0.88);
}

.admin-show-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
  color: rgba(0,0,0,0.85);
}

.admin-show-body {
  background: #fff;
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 10px;
  padding: 14px 14px;
  line-height: 1.85;
  color: rgba(0,0,0,0.88);

  /* 長文の安心 */
  word-break: break-word;
  overflow-wrap: anywhere;
}

.admin-show-actions {
  margin-top: 14px;
}

.admin-show-links {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================================================
  🦉 ローディングオーバーレイ
========================================================= */

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: flex;
  justify-content: center;
  align-items: center;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);

  opacity: 0;
  animation: loading-fade-in 0.2s ease forwards;
}

.loading-box {
  text-align: center;
  color: #fff;
  transform: scale(1.05);
}

/* フクちゃん + リングのラップ */
.loading-fukuchan-wrap {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
}

/* フクちゃん本体 */
.loading-fukuchan-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100px;
  height: auto;
  transform: translate(-50%, -50%);
  z-index: 2;
  animation: loading-float 2s ease-in-out infinite;
}

/* 回転リング */
.loading-ring {
  position: absolute;
  inset: 0;
  border: 5px solid rgba(255, 255, 255, 0.12);
  border-top: 5px solid rgba(255, 196, 0, 0.95);
  border-radius: 50%;
  animation: loading-spin 1s linear infinite;
  z-index: 1;
  box-shadow: 0 0 14px rgba(255, 196, 0, 0.18);
}

/* テキスト */
.loading-text {
  margin-top: 20px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #fff9d6;
  text-shadow:
    0 2px 6px rgba(0, 0, 0, 0.45),
    0 0 8px rgba(255, 196, 0, 0.25);
}

/* =========================
  アニメーション
========================= */

/* フェードイン */
@keyframes loading-fade-in {
  to {
    opacity: 1;
  }
}

/* 回転 */
@keyframes loading-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* フクちゃん浮遊 */
@keyframes loading-float {
  0%,
  100% {
    transform: translate(-50%, -50%);
  }
  50% {
    transform: translate(-50%, -55%);
  }
}
