/* =============================================================
   Yosuga Chat – Chill & Cute Design System
   ============================================================= */

/* ---------- カラーパレット (夜の窓辺・ローズのやわらかい灯り) --------------- */
:root {
  /* 背景 */
  --bg-start: #171424;
  --bg-mid: #2c314f;
  --bg-end: #7a5f55;

  /* サーフェス */
  --surface: rgba(255, 248, 242, 0.9);
  --surface-2: rgba(255, 242, 236, 0.86);
  --surface-hover: rgba(255, 232, 224, 0.94);

  /* テキスト */
  --text: #292034;
  --muted: #6b5f74;
  --text-on-photo: #fff7ec;

  /* ボーダー */
  --border: rgba(222, 178, 160, 0.38);

  /* アクセント（ランプの暖かさにローズとペリウィンクルを足す） */
  --accent-start: #e48fa4;
  --accent-end: #7d8edb;
  --accent-hover-start: #cf748e;
  --accent-hover-end: #6578c9;
  --accent-soft: #ffd7c8;
  --shadow-soft: rgba(35, 24, 42, 0.22);

  /* 危険・警告カラー */
  --danger-bg: #fff1f2;
  --danger-border: #fecdd3;
  --danger-text: #be123c;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  /* iOS PWAのノッチ・ホームインジケータ周辺に操作UIが重ならないようにする */
  --safe-area-top: env(safe-area-inset-top, 0px);
  --safe-area-right: env(safe-area-inset-right, 0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left: env(safe-area-inset-left, 0px);
}

/* ---------- リセット ---------------------------------- */
* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* ---------- ベース ------------------------------------ */
body {
  min-height: 100vh;
  min-height: 100dvh;
  /* 画像未読込時も夜の窓辺に近い低彩度の下地にする */
  background:
    radial-gradient(ellipse at 18% 22%, rgba(228, 143, 164, 0.28) 0%, transparent 46%),
    radial-gradient(ellipse at 78% 12%, rgba(125, 142, 219, 0.38) 0%, transparent 52%),
    linear-gradient(160deg, var(--bg-start) 0%, var(--bg-mid) 58%, var(--bg-end) 100%);
  background-attachment: fixed;
  font-family: "Nunito", "Manrope", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.6;
}

/* ---------- リンク ------------------------------------ */
a {
  color: #fff7ec;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(18, 14, 24, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #ffd1e0;
  text-decoration: none;
}

/* ---------- レイアウト -------------------------------- */
.page-shell {
  min-height: 100vh;
  min-height: 100dvh;
  padding:
    var(--safe-area-top)
    calc(16px + var(--safe-area-right))
    calc(36px + var(--safe-area-bottom))
    calc(16px + var(--safe-area-left));
  display: flex;
  justify-content: center;
  /* 背景画像は static/css からの相対パスで指定して本番の collectstatic 後も参照できるようにする */
  background-image: url("../images/backgrounds/chat_background.3b1554cba1e2.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
}

.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* 背景の絵柄を残しつつ、文字面のコントラストを底上げする */
  background:
    linear-gradient(180deg, rgba(14, 12, 22, 0.28), rgba(31, 24, 42, 0.16) 42%, rgba(14, 12, 22, 0.36)),
    linear-gradient(135deg, rgba(255, 184, 204, 0.12), transparent 38%, rgba(150, 164, 235, 0.14));
}

.page-shell>* {
  position: relative;
  z-index: 1;
}

.landing-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  /* LP背景もログイン後画面と同じく画面幅に合わせて拡大縮小する */
  background-image: url("../images/backgrounds/lp_background.4fa607de238d.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  padding-top: var(--safe-area-top);
  background: rgba(228, 186, 163, 0);
}

.landing-header__image {
  display: block;
  width: 100%;
  max-height: min(34vh, 320px);
  object-fit: cover;
}

.landing-page__content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 16px;
}

.landing-copy {
  width: min(720px, 100%);
  display: grid;
  gap: 18px;
  color: var(--text);
  font-size: clamp(0.86rem, 0.35vw + 0.8rem, 0.95rem);
  line-height: 1.9;
  text-align: left;
}

.landing-copy > p {
  position: relative;
  width: min(56%, 560px);
  margin: 0;
  padding: 16px 20px;
  border: 1.5px solid rgba(231, 195, 114, 0.5);
  border-radius: 42px;
  background: rgba(255, 239, 226, 0.74);
  /* backdrop-filter: blur(10px) saturate(0.95);
  -webkit-backdrop-filter: blur(10px) saturate(0.95); */
  text-shadow: none;
  box-shadow: 0 10px 26px rgba(18, 14, 24, 0.14);
}

/* .landing-copy p::after {
  content: "";
  position: absolute;
  bottom: -7px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: rgba(255, 246, 241, 0.72);
} */

.landing-copy > p:nth-of-type(odd) {
  justify-self: start;
}

.landing-copy > p:nth-of-type(odd)::after {
  left: 28px;
}

.landing-copy > p:nth-of-type(even) {
  justify-self: end;
}

.landing-copy > p:nth-of-type(even)::after {
  right: 28px;
}

.landing-copy > .landing-chat-preview.chat-log {
  width: min(100%, 640px);
  justify-self: center;
  margin-top: 40px;
  margin-bottom: 16px;
  gap: 16px;
}

.landing-chat-preview__intro {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.landing-chat-preview__heading {
  margin: 0;
  color: var(--text-on-photo);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 8px rgba(14, 12, 22, 0.58);
}

.landing-character-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.landing-character-tabs__button {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 2px;
  border: 1.5px solid rgba(222, 178, 160, 0.38);
  border-radius: 999px;
  background: rgba(255, 246, 241, 0.78);
  box-shadow: 0 4px 14px rgba(28, 22, 34, 0.16);
  cursor: pointer;
}

.landing-character-tabs__button.is-active,
.landing-character-tabs__button:hover,
.landing-character-tabs__button:focus-visible {
  border-color: rgba(228, 143, 164, 0.76);
  background: rgba(255, 246, 241, 0.94);
  box-shadow:
    0 0 0 3px rgba(228, 143, 164, 0.18),
    0 6px 16px rgba(28, 22, 34, 0.18);
}

.landing-character-tabs__button img {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  object-fit: cover;
}

.landing-reply-switcher {
  min-width: 0;
}

.landing-reply-switcher__items {
  display: grid;
  min-width: 0;
}

.landing-reply-switcher__items .chat-row {
  animation: none;
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0.28s ease;
  visibility: hidden;
}

.landing-reply-switcher__items .chat-row.is-active {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

.landing-reply-switcher .chat-bubble {
  max-width: min(68%, 500px);
}

@media (prefers-reduced-motion: reduce) {
  .landing-reply-switcher__items .chat-row {
    transition: none;
  }
}

.landing-actions {
  /* CTAボタンを画面中央にまとめて配置する */
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 0;
}

.landing-free-note {
  margin: 0 0 -8px;
  color: var(--text-on-photo);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.5;
  text-align: center;
  text-shadow: 0 2px 8px rgba(14, 12, 22, 0.58);
}

.landing-footer {
  flex-shrink: 0;
  padding: 24px 16px;
  background: rgba(255, 246, 241, 0.18);
}

.landing-footer__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  font-size: 0.9rem;
}

.shell {
  width: min(780px, 100%);
}

/* ---------- ブランドヘッダー -------------------------- */
.brand-header {
  position: relative;
  position: sticky;
  /* shell 内に置いたまま、ヘッダー背景だけ画面幅いっぱいに広げる */
  top: 0;
  z-index: 30;
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 90px;
  grid-template-areas: "utility title actions";
  column-gap: 16px;
  align-items: start;
  text-align: center;
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid rgba(255, 247, 236, 0.24);
  border-radius: 22px;
  background: rgba(255, 246, 241, 0.18);
  box-shadow: 0 10px 28px rgba(14, 12, 22, 0.16);
}

.header-utility-links {
  grid-area: utility;
  position: relative;
  z-index: 2;
  justify-self: start;
  display: grid;
  gap: 8px;
}

.header-utility-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: rgba(255, 248, 244, 0.92);
  backdrop-filter: blur(8px) saturate(0.95);
  -webkit-backdrop-filter: blur(8px) saturate(0.95);
  box-shadow: 0 2px 10px rgba(46, 35, 45, 0.12);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-shadow: none;
  white-space: nowrap;
  font-family: inherit;
  transition: none;
  cursor: pointer;
}

.header-utility-button:hover {
  background: rgba(255, 248, 244, 0.92);
  border-color: var(--border);
  color: var(--text);
  transform: none;
  text-decoration: none;
}

.header-actions {
  grid-area: actions;
  position: relative;
  z-index: 2;
  justify-self: end;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.header-site-title {
  grid-area: title;
  align-self: center;
  justify-self: center;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  color: #f8e7ff;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  font-family: "Nunito", "Manrope", "Segoe UI", sans-serif;
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  overflow-wrap: normal;
  filter:
    drop-shadow(0 2px 4px rgba(39, 35, 82, 0.88))
    drop-shadow(0 0 12px rgba(82, 72, 142, 0.62))
    drop-shadow(0 0 2px rgba(248, 231, 255, 0.42));
  white-space: nowrap;
}

.header-site-title__line {
  display: block;
  white-space: nowrap;
}

.header-site-title:lang(en) {
  gap: 0.18em;
}

.language-switcher {
  width: 90px;
}

.language-switcher select {
  width: 100%;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-align-last: center;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(46, 35, 45, 0.12);
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- ナビゲーション ---------------------------- */
.top-nav {
  display: grid;
  gap: 8px;
  min-width: 220px;
  margin: 12px 0 0;
  animation: float-in 0.2s ease both;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  /* フロストガラス風 */
  background: rgba(255, 246, 241, 0.8);
  backdrop-filter: blur(8px) saturate(0.95);
  -webkit-backdrop-filter: blur(8px) saturate(0.95);
  color: var(--text);
  font-size: 0.87rem;
  font-weight: 700;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
  box-shadow: 0 2px 10px rgba(46, 35, 45, 0.12);
}

.nav-link:hover {
  background: var(--surface-hover);
  border-color: rgba(228, 143, 164, 0.56);
  transform: translateY(-2px);
  color: var(--text);
  text-decoration: none;
}

.nav-logout-form {
  margin: 0;
}

.nav-logout-form .nav-link {
  width: 100%;
  cursor: pointer;
  font-family: inherit;
}

.nav-link--with-status {
  justify-content: space-between;
  gap: 10px;
}

.nav-link--unread::after,
.notice-list-link--unread::before,
.menu-toggle--unread::after {
  content: "";
  display: block;
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
}

.menu-drawer {
  position: relative;
  justify-self: end;
  width: 90px;
  z-index: 10;
}

.menu-drawer[open] .menu-toggle {
  background: var(--surface-hover);
  border-color: rgba(228, 143, 164, 0.56);
}

.menu-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 90px;
  height: 56px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 246, 241, 0.88);
  backdrop-filter: blur(10px) saturate(0.95);
  -webkit-backdrop-filter: blur(10px) saturate(0.95);
  box-shadow: 0 8px 22px var(--shadow-soft);
  cursor: pointer;
  list-style: none;
}

.menu-toggle::-webkit-details-marker {
  display: none;
}

.menu-toggle__icon {
  display: grid;
  gap: 4px;
}

.menu-toggle__line {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
}

.menu-toggle--unread::after {
  position: absolute;
  top: 9px;
  right: 9px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-drawer .top-nav {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 220px;
  margin: 0;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 246, 241, 0.94);
  backdrop-filter: blur(16px) saturate(0.95);
  -webkit-backdrop-filter: blur(16px) saturate(0.95);
  box-shadow:
    0 14px 36px var(--shadow-soft),
    0 4px 10px rgba(183, 98, 121, 0.12);
}

.menu-drawer .top-nav .nav-link {
  width: 100%;
  justify-content: flex-start;
  padding: 10px 14px;
  border-radius: 16px;
}

/* ---------- カード ------------------------------------ */
/* 背景画像をそのまま見せるため、メインカード面は無効化している */
/* .card.soft {
  border-radius: 24px;
  border: 1.5px solid var(--border);
  background: rgba(255, 246, 241, 0.88);
  backdrop-filter: blur(14px) saturate(0.95);
  -webkit-backdrop-filter: blur(14px) saturate(0.95);
  box-shadow:
    0 14px 34px var(--shadow-soft),
    0 2px 10px rgba(183, 98, 121, 0.12);
  animation: float-in 0.5s 0.05s ease both;
} */

.card-content {
  padding: 28px;
  color: var(--text-on-photo);
  text-shadow: 0 2px 8px rgba(14, 12, 22, 0.58);
}

/* 面を持つUI内では背景用の文字影を消して文字をにじませない */
button,
.button,
.nav-link,
input,
select,
textarea,
.notification,
.message,
.notice-list-link,
.notice-content,
.faq-item,
.information-disclosure__trigger,
.profile-card,
.shop-item,
.chat-bubble,
.status-pill {
  text-shadow: none;
}

.notification a,
.message a,
.notice-content a,
.faq-item a,
.profile-card a,
.shop-item a {
  color: #6578c9;
  text-shadow: none;
}

.notification a:hover,
.message a:hover,
.notice-content a:hover,
.faq-item a:hover,
.profile-card a:hover,
.shop-item a:hover {
  color: #cf748e;
}

/* ---------- 見出し ------------------------------------ */
h1,
h2,
.title {
  margin-top: 0;
  margin-bottom: 12px;
  color: var(--text-on-photo);
  text-shadow:
    0 2px 8px rgba(12, 10, 18, 0.78),
    0 0 18px rgba(255, 196, 214, 0.32);
  line-height: 1.25;
}

.title.is-3 {
  font-size: clamp(1.7rem, 2vw + 1rem, 2.2rem);
  font-weight: 800;
  margin-bottom: 8px;
}

.title.is-4,
h2 {
  font-size: clamp(1.2rem, 1.4vw + 0.95rem, 1.5rem);
  font-weight: 800;
}

.subtitle {
  margin: 0;
  color: #FFF0E9;
  font-size: 0.95rem;
  text-shadow: 0 2px 8px rgba(14, 12, 22, 0.58);
}

/* ---------- フッターメモ ------------------------------ */
.site-footnote {
  text-align: center;
  margin-top: 16px;
  color: #FFF0E9;
  font-size: 0.82rem;
  opacity: 0.85;
  text-shadow: 0 2px 8px rgba(14, 12, 22, 0.58);
}

/* ---------- フラッシュメッセージ ---------------------- */
.messages {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 100;
  width: min(520px, calc(100vw - 24px));
  list-style: none;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
  pointer-events: none;
}

.messages .notification {
  pointer-events: auto;
}

.messages li {
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

/* ---------- フォーム ---------------------------------- */
form {
  display: grid;
  gap: 14px;
}

.field,
form p {
  margin: 0;
  display: grid;
  gap: 6px;
}

.label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-on-photo);
  text-shadow: 0 2px 8px rgba(14, 12, 22, 0.58);
}

input,
select,
textarea {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  font: inherit;
  color: var(--text);
  background: rgba(255, 248, 244, 0.92);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent-start);
  box-shadow: 0 0 0 3px rgba(228, 143, 164, 0.24);
}

input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin-right: 6px;
  accent-color: #e48fa4;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ログイン状態保持の選択肢は、チェックボックスを文言の左側に大きく表示する */
.login-remember label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.login-remember input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
  margin: 0;
  flex: 0 0 auto;
  cursor: pointer;
}

/* ---------- ボタン ------------------------------------ */
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  padding: 10px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

/* デフォルトボタン */
button {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 246, 241, 0.84);
  backdrop-filter: blur(8px) saturate(0.95);
  -webkit-backdrop-filter: blur(8px) saturate(0.95);
}

button:hover {
  background: var(--surface-hover);
  border-color: rgba(228, 143, 164, 0.56);
  transform: translateY(-2px);
  text-decoration: none;
}

button:active {
  transform: translateY(0);
}

button:disabled,
.button:disabled {
  background: #fff6f1;
  color: #756b5f;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

button:disabled:hover,
.button:disabled:hover {
  background: #fff6f1;
  transform: none;
  box-shadow: none;
}

/* ライトボタン */
.button.is-light {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 246, 241, 0.84);
  backdrop-filter: blur(8px) saturate(0.95);
  -webkit-backdrop-filter: blur(8px) saturate(0.95);
}

.button.is-light:hover {
  background: var(--surface-hover);
  border-color: rgba(228, 143, 164, 0.56);
  transform: translateY(-2px);
}

.button.is-fullwidth {
  width: 100%;
}

/* ---------- 通知 -------------------------------------- */
.notification {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  padding: 10px 14px;
  color: var(--text);
}

.notification__message {
  min-width: 0;
}

.notification__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.64);
  color: currentColor;
  cursor: pointer;
  font: inherit;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1;
}

.notification__close:hover {
  background: rgba(255, 255, 255, 0.9);
}

.notification.is-danger,
.notification.is-error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
  color: var(--danger-text);
}

.notification.is-warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}

.notification.information-empty-notification {
  border-color: var(--border);
  background: rgba(255, 246, 241, 0.86);
  color: var(--text);
}

/* ---------- ヘルプ・エラー ---------------------------- */
.help,
.errorlist {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.84rem;
}

.help.is-danger,
.errorlist {
  color: var(--danger-text);
}

/* ---------- コンテンツエリア -------------------------- */
.content {
  display: grid;
  gap: 12px;
}

.content ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

/* 外部アカウント接続先をアンカーのままボタン風に表示する */
.social-provider-list a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30%;
  min-height: 40px;
  padding: 5px 9px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 246, 241, 0.92);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(37, 32, 51, 0.12);
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.15s ease;
}

.social-provider-list a:hover {
  border-color: rgba(228, 143, 164, 0.56);
  background: var(--surface-hover);
  box-shadow: 0 8px 22px rgba(228, 143, 164, 0.24);
  transform: translateY(-2px);
  text-decoration: none;
}

.social-provider-list a:focus-visible {
  outline: 3px solid rgba(228, 143, 164, 0.32);
  outline-offset: 2px;
}

.animal-list-page {
  text-align: center;
}

/* 見出しと並び替えを同じ行に配置する */
.animal-list-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 16px;
  margin-bottom: 12px;
}

.animal-list-header .title {
  margin-bottom: 0;
}

.animal-list-page .content {
  justify-items: center;
}

.animal-list-sort {
  width: min(100%, 240px);
  margin: 0;
  text-align: left;
}

.animal-list-sort select {
  padding: 8px 12px;
  font-size: 0.9rem;
  cursor: pointer;
}

.animal-list-page .content ul {
  width: min(100%, 520px);
}

.animal-list-page .content li {
  display: flex;
  justify-content: center;
}

.animal-list-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 90%;
}

.animal-profile-popover {
  position: relative;
  flex: 0 0 40px;
}

.animal-profile-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  list-style: none;
  border: 1.5px solid rgba(228, 143, 164, 0.38);
  border-radius: 9999px;
  background: rgba(255, 246, 241, 0.88);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.animal-profile-toggle::-webkit-details-marker {
  display: none;
}

.animal-profile-toggle::marker {
  content: "";
}

.animal-profile-toggle:hover,
.animal-profile-popover[open] .animal-profile-toggle {
  border-color: rgba(228, 143, 164, 0.62);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.animal-profile-toggle:focus-visible {
  outline: 3px solid rgba(228, 143, 164, 0.32);
  outline-offset: 2px;
}

.animal-profile-bubble {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: calc(100% + 12px);
  width: min(280px, 72vw);
  padding: 12px 14px;
  border: 1.5px solid rgba(228, 143, 164, 0.44);
  border-radius: 14px;
  background: rgba(255, 246, 241, 0.88);
  box-shadow: 0 12px 32px rgba(104, 66, 75, 0.16);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  text-shadow: none;
  transform: translateY(-50%);
}

.animal-profile-bubble::before {
  position: absolute;
  top: 50%;
  left: -7px;
  width: 12px;
  height: 12px;
  border-bottom: 1.5px solid rgba(228, 143, 164, 0.44);
  border-left: 1.5px solid rgba(228, 143, 164, 0.44);
  background: rgba(255, 246, 241, 0.88);
  content: "";
  transform: translateY(-50%) rotate(45deg);
}

.animal-profile-spacer {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
}

.animal-list-link {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex: 1 1 auto;
  min-width: 0;
  border-radius: 16px;
  padding: 16px 8px;
  background: transparent;
  /* color: var(--text); */
  font-size: 1.12rem;
  font-weight: 700;
  text-align: left;
  transition: background 0.2s ease, transform 0.15s ease;
}

.animal-list-thumbnail {
  width: 72px;
  height: 72px;
  min-width: 72px;
  min-height: 72px;
  max-width: 72px;
  max-height: 72px;
  flex: 0 0 72px;
  margin: 0;
}

.animal-list-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  object-fit: cover;
}

.animal-list-link:hover {
  background: rgba(255, 209, 224, 0.24);
  transform: translateY(-3px) scale(1.01);
  text-decoration: none;
}

/* ---------- お知らせ ---------------------------------- */
.notice-page,
.faq-page {
  display: grid;
  gap: 16px;
}

.notice-list {
  display: grid;
  gap: 12px;
  width: 100%;
}

.notice-list-item {
  display: grid;
  gap: 8px;
}

.notice-list-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 246, 241, 0.86);
  color: var(--text);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.notice-list-link:hover {
  background: var(--surface-hover);
  border-color: rgba(228, 143, 164, 0.56);
  color: var(--text);
  transform: translateY(-2px);
  text-decoration: none;
}

.notice-content {
  color: var(--text);
  text-align: left;
}

.notice-content__inner {
  padding: 16px 18px 18px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 246, 241, 0.86);
}

.notice-content p:first-child {
  margin-top: 0;
}

.notice-content p:last-child {
  margin-bottom: 0;
}

/* ---------- 法務ページ ------------------------------- */
.legal-page {
  width: min(860px, 100%);
  margin: 0 auto;
}

.legal-page__header {
  margin-bottom: 18px;
}

.legal-page__body {
  display: grid;
  gap: 22px;
  padding: 18px;
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 246, 241, 0.86);
  font-size: 0.95rem;
  line-height: 1.85;
}

.legal-page__body p {
  margin: 0 0 10px;
}

.legal-section {
  display: grid;
  gap: 8px;
}

.legal-section h3 {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.45;
}

.legal-section ul {
  margin: 0 0 10px;
  padding-left: 1.2rem;
  list-style: disc;
}

.legal-section li {
  margin: 4px 0;
}

/* ---------- FAQ --------------------------------------- */
.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  border: 1.5px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 246, 241, 0.86);
  color: var(--text);
  text-align: left;
  overflow: hidden;
}

.faq-question {
  margin: 0;
  color: #6578c9;
  font-size: 1.05rem;
  font-weight: 800;
}

.faq-question__button {
  width: 100%;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #6578c9;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: left;
}

.faq-question__button:hover {
  background: var(--surface-hover);
  border-color: transparent;
}

.information-disclosure__trigger {
  justify-content: space-between;
}

.information-disclosure__trigger > span:first-child {
  flex: 1 1 auto;
}

.information-disclosure__icon {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.information-disclosure--open .information-disclosure__icon {
  transform: rotate(225deg);
}

.information-disclosure__body {
  overflow: hidden;
  height: 0;
  opacity: 0;
  transition: height 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
  will-change: height, opacity;
}

.information-disclosure__body:not([hidden]) {
  opacity: 1;
}

.faq-answer {
  padding: 0 18px;
}

.faq-answer .information-disclosure__body-inner {
  padding: 16px 0 18px;
}

.faq-answer p:first-child {
  margin-top: 0;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ---------- プロフィール ------------------------------ */
.profile-page {
  gap: 18px;
}

.profile-page__lead {
  margin-top: -2px;
}

.profile-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 246, 241, 0.86);
}

.profile-card__row {
  display: grid;
  gap: 6px;
}

.profile-card__nickname-form {
  margin: 0;
}

.profile-card__label {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.profile-card__value {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

.profile-card__edit-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  max-width: 100%;
}

.profile-card__field {
  display: inline-flex;
  flex: 1 1 14rem;
  min-width: 0;
  max-width: 24rem;
}

.profile-card__input {
  width: 100%;
  min-width: 0;
}

.profile-card__edit-button {
  flex: 0 0 auto;
  min-width: 5.5rem;
  white-space: nowrap;
}

.profile-card__note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.profile-card__actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-card__actions--split {
  justify-content: space-between;
}

.profile-card__confirm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--danger-text);
  text-shadow: none;
}

.profile-card__confirm input {
  flex: 0 0 auto;
}

.profile-card__danger-link {
  color: var(--danger-text);
}

.profile-card__danger-link:hover {
  color: #9f1239;
}

.profile-card--danger {
  border-color: var(--danger-border);
  background: rgba(255, 241, 242, 0.9);
}

.profile-card--danger .profile-card__note {
  color: var(--danger-text);
}

.button.is-danger {
  border-color: var(--border);
  background: rgba(255, 246, 241, 0.84);
  color: #be185d;
  backdrop-filter: blur(8px) saturate(0.95);
  -webkit-backdrop-filter: blur(8px) saturate(0.95);
}

.button.is-danger:hover {
  background: var(--surface-hover);
  border-color: rgba(228, 143, 164, 0.56);
  color: #9d174d;
}

.profile-card--danger .button.is-light:hover {
  color: var(--text);
}

.profile-card--danger .button.is-danger:hover {
  color: #be185d;
}

/* ---------- メッセージボックス ------------------------ */
.message {
  margin: 0;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.message.is-info {
  border-color: rgba(125, 142, 219, 0.34);
  background: rgba(241, 238, 255, 0.9);
}

.message.is-light {
  border-color: var(--border);
  background: var(--surface-2);
}

.message-body {
  padding: 10px 14px;
}

/* ---------- ショップ ---------------------------------- */
.shop-page {
  display: grid;
  gap: 18px;
}

.page-heading {
  text-align: center;
  margin-bottom: 4px;
}

.page-heading h2 {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.page-heading p {
  margin: 0;
  color: #FFF0E9;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(14, 12, 22, 0.58);
}

.shop-item {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  background: rgba(255, 246, 241, 0.86);
  box-shadow: 0 8px 24px var(--shadow-soft);
}

.shop-item__header h3 {
  margin: 0 0 6px;
  /* 商品名は明るいカード上で確実に読めるよう黒色に固定する */
  color: #000;
  font-size: 1.35rem;
}

.shop-item__header p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.shop-item__header .shop-item__price {
  /* ヘッダー内の段落リセットより優先して価格の余白を確保する */
  margin-top: 12px;
}

.shop-item__price-note {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--muted);
}

.shop-item__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  min-width: 136px;
  padding: 6px 18px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: rgba(255, 246, 241, 0.86);
  color: var(--text);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.status-pill--inactive {
  /* 未加入状態は操作ボタンに見えないよう、彩度を抑えたグレーで表示する */
  border-color: rgba(148, 138, 156, 0.34);
  background: rgba(233, 229, 235, 0.88);
  color: var(--muted);
}

.status-pill--active {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.status-pill--warning {
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: var(--warning-text);
}

.status-note {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.shop-item__actions {
  display: flex;
  justify-content: flex-start;
}

.shop-item__legal-links {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.4;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 246, 241, 0.84);
  color: var(--text);
  backdrop-filter: blur(8px) saturate(0.95);
  -webkit-backdrop-filter: blur(8px) saturate(0.95);
  font-family: inherit;
  font-weight: 900;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.15s ease;
}

.button:hover {
  background: var(--surface-hover);
  border-color: rgba(228, 143, 164, 0.56);
  color: var(--text);
  transform: translateY(-2px);
}

.button--secondary {
  background: rgba(255, 246, 241, 0.84);
  color: var(--text);
  border: 1.5px solid var(--border);
}

/* ---------- PWA --------------------------------------- */
.offline-page {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(520px, 100%);
  margin: 0 auto;
  text-align: center;
}

.offline-page .message {
  width: 100%;
  color: var(--text);
}

.pwa-install-prompt {
  position: fixed;
  left: 50%;
  bottom: calc(16px + var(--safe-area-bottom));
  z-index: 120;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(440px, calc(100vw - 24px - var(--safe-area-left) - var(--safe-area-right)));
  padding: 14px;
  border: 1.5px solid rgba(255, 248, 244, 0.62);
  border-radius: 18px;
  background: rgba(255, 246, 241, 0.94);
  box-shadow: 0 12px 34px rgba(18, 14, 24, 0.28);
  color: var(--text);
  transform: translateX(-50%);
}

.pwa-install-prompt__body {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.pwa-install-prompt__title {
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1.35;
}

.pwa-install-prompt__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.5;
}

.pwa-install-prompt__close {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- ユーティリティ ----------------------------- */
.has-text-centered {
  text-align: center;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 1.25rem;
}

.mt-4 {
  margin-top: 1rem;
}

.is-size-7 {
  font-size: 0.82rem;
}

/* ---------- レスポンシブ ------------------------------ */
@media (max-width: 640px) {
  .page-shell {
    padding:
      var(--safe-area-top)
      calc(12px + var(--safe-area-right))
      calc(20px + var(--safe-area-bottom))
      calc(12px + var(--safe-area-left));
  }

  .brand-header {
    top: 0;
    grid-template-columns: 90px minmax(0, 1fr) 90px;
    grid-template-areas: "utility title actions";
    column-gap: 10px;
    padding: 16px 14px;
  }

  .header-site-title {
    display: grid;
    gap: 2px;
    font-size: 1.6rem;
  }

  .menu-drawer,
  .menu-toggle {
    width: 90px;
    height: 48px;
  }

  .header-utility-button {
    width: 90px;
    min-height: 36px;
    padding: 7px 12px;
    font-size: 0.8rem;
  }

  .menu-drawer .top-nav {
    width: min(220px, calc(100vw - 24px));
  }

  .language-switcher {
    width: 90px;
  }

  .pwa-install-prompt {
    bottom: calc(12px + var(--safe-area-bottom));
    align-items: start;
  }

  .pwa-install-prompt__close {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.82rem;
  }

}
