:root {
  --bg: #0a0b10;
  --bg2: #12131c;
  --card: rgba(22, 24, 34, 0.72);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eef0f6;
  --muted: #8b90a3;
  --accent: #e5384d;
  --accent2: #ff6b5e;
  --gold: #e8c477;
  --ok: #46d191;
  --radius: 18px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* hidden 属性は display 指定より優先させる（account-bar や各フォームの表示制御用） */
[hidden] { display: none !important; }

body {
  min-height: 100vh;
  font-family: "Noto Sans JP", system-ui, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 700px at 50% -10%, #1a1c2b 0%, var(--bg) 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
  overflow-x: hidden;
}

/* 背景の演出 */
.bg-grid {
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  opacity: 0.5;
}
.bg-glow {
  position: fixed; z-index: -1;
  width: 520px; height: 520px; top: -160px; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(229, 56, 77, 0.30), transparent 65%);
  filter: blur(20px);
}

/* カード */
.card {
  width: 100%;
  max-width: 540px;
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 38px 34px 30px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.05);
}

.head { text-align: center; margin-bottom: 26px; }
.shuriken { width: 56px; height: 56px; fill: var(--accent); filter: drop-shadow(0 0 14px rgba(229,56,77,0.6)); }
.shuriken circle { fill: var(--bg); }
.title {
  font-family: "Yuji Syuku", serif;
  font-size: 38px; letter-spacing: 4px; margin: 10px 0 6px;
  background: linear-gradient(180deg, #fff 0%, #d4d7e3 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.subtitle { color: var(--muted); font-size: 13.5px; }

/* ビュー切替 */
.view { display: none; flex-direction: column; gap: 18px; }
.view.active { display: flex; animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ドロップゾーン */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  border: 2px dashed rgba(255,255,255,0.16);
  border-radius: 14px;
  padding: 38px 20px;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
  background: rgba(255,255,255,0.015);
}
.dropzone:hover { border-color: rgba(229,56,77,0.5); background: rgba(229,56,77,0.05); }
.dropzone.drag { border-color: var(--accent); background: rgba(229,56,77,0.10); transform: scale(1.01); }
.up-icon { width: 40px; height: 40px; fill: none; stroke: var(--accent2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dz-main { font-weight: 700; font-size: 15px; }
.dz-sub { color: var(--muted); font-size: 12px; }
.filename { color: var(--gold); font-size: 13px; font-weight: 700; margin-top: 6px; word-break: break-all; }

/* 強さセグメント */
.strength { display: flex; align-items: center; justify-content: space-between; }
.strength-label { color: var(--muted); font-size: 13px; }
.seg { display: inline-flex; background: rgba(255,255,255,0.05); border-radius: 10px; padding: 4px; gap: 2px; }
.seg-btn {
  border: none; background: transparent; color: var(--muted);
  font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 7px 18px; border-radius: 8px; cursor: pointer; transition: .18s;
}
.seg-btn.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(229,56,77,0.4); }

/* ボタン */
.btn-primary {
  display: flex; align-items: center; justify-content: center;
  width: 100%; border: none; cursor: pointer; text-decoration: none;
  font-family: inherit; font-weight: 700; font-size: 15.5px; color: #fff;
  padding: 15px; border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 10px 26px rgba(229,56,77,0.38);
  transition: transform .15s, box-shadow .15s, opacity .15s;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(229,56,77,0.5); }
.btn-primary:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  width: 100%; border: 1px solid var(--line); background: transparent; color: var(--muted);
  font-family: inherit; font-weight: 700; font-size: 14px; padding: 12px; border-radius: 12px; cursor: pointer; transition: .18s;
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.25); }
.note { color: var(--muted); font-size: 11.5px; text-align: center; line-height: 1.6; }
.usage-note {
  font-size: 12.5px; line-height: 1.8; color: var(--text);
  background: rgba(229,56,77,0.08); border: 1px solid rgba(229,56,77,0.28);
  border-radius: 12px; padding: 12px 14px;
}
.usage-note strong { color: var(--gold); }
.usage-note a { color: var(--accent2); font-weight: 700; }
.usage-note a:hover { text-decoration: underline; }

/* 処理中 */
#view-processing { align-items: center; }
.spinner { margin: 6px 0 4px; }
.spin { width: 72px; height: 72px; animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.stage { font-weight: 700; font-size: 17px; }
.progress { width: 100%; height: 12px; background: rgba(255,255,255,0.07); border-radius: 99px; overflow: hidden; }
.bar {
  height: 100%; width: 0%; border-radius: 99px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .4s ease;
}
.percent { font-variant-numeric: tabular-nums; font-weight: 900; font-size: 26px; letter-spacing: 1px; }

/* 完了 / エラー */
#view-done, #view-error { align-items: center; text-align: center; }
.done-mark, .error-mark {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center; font-size: 38px; font-weight: 900; margin: 4px 0;
}
.done-mark { background: rgba(70,209,145,0.14); color: var(--ok); box-shadow: 0 0 30px rgba(70,209,145,0.3); }
.error-mark { background: rgba(229,56,77,0.14); color: var(--accent2); }
.done-text { font-weight: 700; font-size: 18px; }
.result-img { max-width: 100%; max-height: 300px; border-radius: 12px; border: 1px solid var(--line); display: block; margin: 2px auto; object-fit: contain; }

/* ===== モーダル（アンケート等）===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(6, 7, 12, 0.72);
  animation: modal-fade .18s ease-out;
}
.modal-card {
  width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto;
  background: var(--card); backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255,255,255,0.05);
  animation: modal-in .24s cubic-bezier(.2,.8,.2,1);
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(16px) scale(.95); } to { opacity: 1; transform: none; } }
.modal-title { font-family: "Yuji Syuku", serif; font-size: 24px; letter-spacing: 2px; text-align: center; margin-bottom: 6px; }
.modal-lead { color: var(--muted); font-size: 12.5px; line-height: 1.7; text-align: center; margin-bottom: 16px; }
.survey-field { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.survey-sns { display: flex; flex-wrap: wrap; gap: 8px; }
.sns-chip {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line); border-radius: 99px; padding: 7px 13px; transition: .15s;
}
.sns-chip:hover { border-color: rgba(255,255,255,0.25); }
.sns-chip input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.sns-chip:has(input:checked) { color: var(--text); border-color: rgba(229,56,77,0.6); background: rgba(229,56,77,0.10); }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal-actions .btn-primary, .modal-actions .btn-ghost { width: auto; flex: 1; }
.error-msg { color: var(--muted); font-size: 13px; word-break: break-all; }

.foot { color: var(--muted); font-size: 11px; margin-top: 20px; letter-spacing: 1px; opacity: .7; text-align: center; line-height: 1.8; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); text-decoration: underline; }

/* 利用規約 同意チェック */
.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text); line-height: 1.6; }
.agree input { margin-top: 2px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); }
.agree a { color: var(--accent2); font-weight: 700; }

/* 利用規約ページ（法務テキスト） */
.legal { max-width: 720px; }
.legal-lead { color: var(--text); font-size: 13px; line-height: 1.9; background: rgba(255,255,255,0.03);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.legal-body { color: var(--text); }
.legal-body h2 { font-size: 15px; font-weight: 700; margin: 22px 0 8px; color: var(--gold); }
.legal-body p { font-size: 13px; line-height: 1.9; color: #d4d7e3; }
.legal-body ol { margin: 6px 0 6px 1.3em; }
.legal-body li { font-size: 13px; line-height: 1.9; color: #d4d7e3; margin-bottom: 4px; }
.legal-body strong { color: var(--accent2); }
.legal-body a { color: var(--accent2); font-weight: 700; }
.legal-meta { margin-top: 24px; color: var(--muted); font-size: 12px; line-height: 1.9; }

/* ナビリンク */
.topnav { margin-top: 14px; }
.navlink {
  color: var(--muted); font-size: 12.5px; font-weight: 700; text-decoration: none;
  border: 1px solid var(--line); border-radius: 99px; padding: 6px 14px; transition: .18s;
  display: inline-block; cursor: pointer;
}
.navlink:hover { color: var(--text); border-color: rgba(229,56,77,0.5); }
.navlink-board { display: inline-flex; align-items: center; gap: 7px; }
.navlink-icon {
  width: 15px; height: 15px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.navlink.as-btn { background: transparent; font-family: inherit; }

/* アカウントバー（ログイン中） */
.topnav { display: flex; gap: 10px; justify-content: center; align-items: center; flex-wrap: wrap; }
.account-bar { display: inline-flex; align-items: center; gap: 8px; }
.account-link {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px 4px 5px; transition: .18s;
}
.account-link:hover { border-color: rgba(229,56,77,0.5); }
.account-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.account-name { color: var(--gold); font-size: 12.5px; font-weight: 700; }

/* ログイン/新規登録ビュー */
.auth-lead { color: var(--muted); font-size: 13px; text-align: center; line-height: 1.6; }
.auth-form { margin-bottom: 0; }
.linkish {
  align-self: center; background: none; border: none; cursor: pointer;
  color: var(--accent2); font-family: inherit; font-size: 12px; font-weight: 700;
  text-decoration: underline; padding: 2px;
}
.flash {
  font-size: 13px; line-height: 1.7; text-align: center;
  color: var(--ok); background: rgba(70,209,145,0.12);
  border: 1px solid rgba(70,209,145,0.4); border-radius: 12px; padding: 11px 14px;
  margin-bottom: 18px;
}
.flash.error { color: var(--accent2); background: rgba(229,56,77,0.10); border-color: rgba(229,56,77,0.4); }

/* プロフィール編集 */
.field-label { color: var(--muted); font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.avatar-edit { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.avatar-preview {
  width: 110px; height: 110px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--line); background: rgba(255,255,255,0.03);
}
.avatar-pick { width: auto; padding: 9px 16px; }

/* ===== 掲示板 ===== */
/* 掲示板は投稿で縦に伸びるので中央寄せをやめ、上揃え＝自然にスクロールさせる */
body.page-board { justify-content: flex-start; padding-top: 40px; padding-bottom: 48px; }
.card-wide { max-width: 640px; }

.board-tabs { display: flex; gap: 8px; margin-bottom: 6px; }
.tab {
  flex: 1; border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  color: var(--muted); font-family: inherit; font-weight: 700; font-size: 14px;
  padding: 11px; border-radius: 12px; cursor: pointer; transition: .18s;
}
.tab:hover { color: var(--text); border-color: rgba(255,255,255,0.2); }
.tab.active {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  box-shadow: 0 8px 20px rgba(229,56,77,0.35);
}
.board-desc { color: var(--muted); font-size: 12.5px; line-height: 1.6; margin-bottom: 8px; }

/* 投稿フォーム */
.post-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.field {
  width: 100%; font-family: inherit; font-size: 14px; color: var(--text);
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; transition: border-color .18s, background .18s;
}
.field::placeholder { color: var(--muted); }
.field:focus { outline: none; border-color: rgba(229,56,77,0.6); background: rgba(229,56,77,0.05); }
textarea.field { resize: vertical; min-height: 70px; line-height: 1.6; }

.img-pick {
  display: block; text-align: center; cursor: pointer;
  border: 2px dashed rgba(255,255,255,0.16); border-radius: 12px;
  padding: 14px; color: var(--muted); font-size: 13px; font-weight: 700; transition: .18s;
}
.img-pick:hover { border-color: rgba(229,56,77,0.5); color: var(--text); background: rgba(229,56,77,0.04); }
.img-preview { max-width: 100%; max-height: 220px; border-radius: 12px; border: 1px solid var(--line); align-self: flex-start; }

.form-msg { font-size: 12.5px; color: var(--ok); min-height: 16px; text-align: center; }
.form-msg.error { color: var(--accent2); }

/* 投稿一覧 */
.feed { display: flex; flex-direction: column; gap: 14px; }
.feed-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 0; }
.post {
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  background: rgba(255,255,255,0.025);
}
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.post-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.post-avatar { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.post-avatar-empty { display: grid; place-items: center; background: rgba(255,255,255,0.05); color: var(--muted); }
.post-avatar-empty svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.post-name { font-weight: 700; font-size: 14.5px; color: var(--gold); word-break: break-all; }
.login-notice { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.login-notice a { color: var(--accent2); font-weight: 700; }
.post-time { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.post-body { font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.post-img { max-width: 100%; max-height: 360px; margin-top: 12px; border-radius: 12px; border: 1px solid var(--line); display: block; cursor: zoom-in; transition: filter .12s; }
.post-img:hover { filter: brightness(1.06); }

/* ビュー切替（スレッド一覧 / スレッド詳細） */
.bview { display: none; flex-direction: column; gap: 18px; }
.bview.active { display: flex; animation: fade 0.35s ease; }

/* 新規スレッド作成（折りたたみ） */
.new-thread { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.02); }
.new-thread > summary {
  cursor: pointer; padding: 13px 16px; font-weight: 700; font-size: 14px;
  color: var(--accent2); list-style: none;
}
.new-thread > summary::-webkit-details-marker { display: none; }
.new-thread[open] > summary { border-bottom: 1px solid var(--line); }
.new-thread .post-form { padding: 16px; margin-bottom: 0; }

/* スレッド一覧の各行 */
.thread-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  cursor: pointer; font-family: inherit;
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
  background: rgba(255,255,255,0.025); transition: border-color .15s, background .15s, transform .15s;
}
.thread-row:hover { border-color: rgba(229,56,77,0.45); background: rgba(229,56,77,0.05); transform: translateY(-1px); }
.thread-thumb { flex: 0 0 56px; width: 56px; height: 56px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.thread-thumb-empty { display: grid; place-items: center; background: rgba(255,255,255,0.04); color: var(--muted); }
.thread-thumb-empty svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.thread-row-main { display: flex; flex-direction: column; gap: 5px; min-width: 0; flex: 1; }
.thread-row-title { font-weight: 700; font-size: 15px; color: var(--text); word-break: break-word; }
.thread-row-meta { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }

/* スレッド詳細 */
.back-btn { align-self: flex-start; width: auto; padding: 8px 14px; }
.thread-head { display: flex; flex-direction: column; gap: 6px; }
.thread-board { color: var(--accent2); font-size: 11.5px; font-weight: 700; }
.thread-title { font-size: 19px; font-weight: 900; line-height: 1.4; word-break: break-word; }
.reply-form { border-top: 1px dashed var(--line); padding-top: 18px; margin-bottom: 0; }
.reply-label { font-weight: 700; font-size: 13.5px; color: var(--muted); }

/* ===== 管理画面 ===== */
.card-admin { max-width: 760px; }
.admin-title { font-size: 30px; letter-spacing: 2px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.admin-count { color: var(--muted); font-size: 13px; font-weight: 700; }
.reload-btn { width: auto; padding: 8px 16px; }

.admin-list { display: flex; flex-direction: column; gap: 10px; }
.admin-row {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: rgba(255,255,255,0.025); transition: opacity .2s, transform .2s;
}
.admin-row.removing { opacity: 0; transform: translateX(12px); }
.admin-thumb { flex: 0 0 48px; width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.admin-thumb.zoomable { cursor: zoom-in; transition: transform .12s; }
.admin-thumb.zoomable:hover { transform: scale(1.06); border-color: rgba(255,255,255,0.35); }

/* 画像の全画面拡大（ライトボックス） */
.lightbox {
  position: fixed; inset: 0; z-index: 100; cursor: zoom-out;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(0,0,0,0.86);
  animation: lb-in .12s ease-out;
}
.lightbox img {
  max-width: 95vw; max-height: 95vh; object-fit: contain;
  border-radius: 8px; box-shadow: 0 10px 50px rgba(0,0,0,0.6);
}
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.admin-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 11.5px; }
.admin-tag {
  color: #fff; font-weight: 700; font-size: 10.5px;
  background: rgba(229,56,77,0.85); border-radius: 6px; padding: 2px 7px;
}
.admin-thread { color: var(--gold); font-weight: 700; word-break: break-word; }
/* 投稿者（アバター＋名前。コメント一覧内。名前のすぐ左にアバター） */
.admin-poster { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.admin-poster-name { font-weight: 700; color: var(--text); word-break: break-all; }
.admin-poster-avatar { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.admin-poster-avatar.empty { display: grid; place-items: center; background: rgba(255,255,255,0.05); color: var(--muted); }
.admin-poster-avatar.empty svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.admin-who { color: var(--muted); font-variant-numeric: tabular-nums; }
.admin-body { font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* 登録ユーザー一覧 */
.admin-avatar { border-radius: 50%; }
.avatar-none {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.06); color: var(--muted);
  font-weight: 900; font-size: 20px; text-transform: uppercase;
}
.user-email { font-size: 13px; color: var(--muted); word-break: break-all; }
/* 一覧内のアンケート詳細ボタン（長文は開いて確認） */
.survey-detail-btn {
  align-self: flex-start; margin-top: 2px; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 11.5px; color: var(--gold);
  background: rgba(232,196,119,0.10); border: 1px solid rgba(232,196,119,0.4);
  border-radius: 8px; padding: 4px 10px; transition: .15s;
}
.survey-detail-btn:hover { background: rgba(232,196,119,0.2); }
/* 詳細モーダル内の表示 */
.sns-chip.is-static { cursor: default; color: var(--text); border-color: rgba(229,56,77,0.4); background: rgba(229,56,77,0.08); }
.survey-note-full {
  font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--text);
  background: rgba(255,255,255,0.03); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; margin: 8px 0 14px;
}
.del-btn {
  flex: 0 0 auto; align-self: center; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 13px; color: var(--accent2);
  background: rgba(229,56,77,0.10); border: 1px solid rgba(229,56,77,0.35);
  border-radius: 9px; padding: 8px 14px; transition: .15s;
}
.del-btn:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: transparent; }
.del-btn:disabled { opacity: .5; cursor: not-allowed; }

/* 検閲状態バッジ */
.img-badge { font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 2px 7px; }
.img-badge.is-pending { color: #ffce85; background: rgba(232,196,119,0.16); border: 1px solid rgba(232,196,119,0.45); }
.img-badge.is-pub { color: var(--ok); background: rgba(70,209,145,0.14); border: 1px solid rgba(70,209,145,0.4); }

/* 操作列（モデレーション＋削除） */
.admin-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.act-btn {
  cursor: pointer; text-align: center; text-decoration: none;
  font-family: inherit; font-weight: 700; font-size: 12px;
  border-radius: 8px; padding: 6px 12px; transition: .15s;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--text);
}
.act-btn:hover { border-color: rgba(255,255,255,0.3); }
.act-pub { color: var(--ok); border-color: rgba(70,209,145,0.4); background: rgba(70,209,145,0.10); }
.act-pub:hover { background: var(--ok); color: #08130d; }
.act-mute { color: var(--muted); }
.act-mosaic { color: var(--accent2); border-color: rgba(229,56,77,0.35); background: rgba(229,56,77,0.08); }
.act-orig { color: var(--gold); }

@media (max-width: 480px) {
  .card { padding: 28px 20px; }
  .title { font-size: 30px; }
  .admin-row { flex-wrap: wrap; }
}

/* ===================================================================
   背景を漂うモザイクタイル群（モザイクテーマの演出）
   タイルは JS(app.js spawnMosaic) で生成し、位置/サイズ/速度/色をランダム化する。
   =================================================================== */
.bg-mosaic { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
/* モザイク片：隣接した同サイズのセルを格子状に並べ、検閲モザイク（ピクセル化）のように見せる。
   セル間の gap がグリッド線になり、同系色×明度差で「画像を潰した塊」っぽくなる。 */
.mpatch {
  position: absolute; display: grid; gap: 0; opacity: 0;
  will-change: transform, opacity;
  animation: mosaic-apply var(--dur, 14s) ease-in-out infinite;
}
/* セルは角丸なしの“完全な四角”＝ピクセルらしく。微妙な明滅で動画モザイク風に。 */
.mcell { border-radius: 0; animation: mcell-flicker var(--f, 7s) ease-in-out infinite; }
@keyframes mcell-flicker { 0%, 100% { opacity: 1; } 50% { opacity: .72; } }
/* 移動せず、その場でモザイクが浮かび上がって消える（背景の各所に検閲がかかる感じ）。 */
@keyframes mosaic-apply {
  0%   { opacity: 0; transform: scale(0.9); }
  14%  { opacity: var(--op, .2); transform: scale(1); }
  86%  { opacity: var(--op, .2); transform: scale(1); }
  100% { opacity: 0; transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) { .bg-mosaic { display: none; } }

/* ===================================================================
   認証（ログイン / 新規登録）画面の演出強化
   =================================================================== */

/* カード入場（全ページ共通の軽い演出） */
@keyframes card-in {
  from { opacity: 0; transform: translateY(22px) scale(.985); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
.card { animation: card-in .55s cubic-bezier(.2,.75,.2,1) both; }

/* ヘッダーの手裏剣：ゆっくり回転＋発光の呼吸。ヘッダーにホバーで加速。
   （処理中ビューの .shuriken.spin には影響しないよう .head 配下に限定） */
@keyframes shuriken-spin { to { transform: rotate(360deg); } }
@keyframes shuriken-glow {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(229,56,77,0.5)); }
  50%      { filter: drop-shadow(0 0 24px rgba(229,56,77,0.95)); }
}
.head .shuriken {
  transform-origin: 50% 50%;
  animation: shuriken-spin 16s linear infinite, shuriken-glow 3.2s ease-in-out infinite;
}
.head:hover .shuriken { animation-duration: 2.4s, 3.2s; }

/* 背景：グリッドがゆっくり流れ、グロウが呼吸する */
@keyframes grid-drift { from { background-position: 0 0; } to { background-position: 44px 44px; } }
.bg-grid { animation: grid-drift 9s linear infinite; }
@keyframes glow-breathe {
  0%, 100% { opacity: .7; transform: translateX(-50%) scale(1); }
  50%      { opacity: 1;  transform: translateX(-50%) scale(1.18); }
}
.bg-glow { animation: glow-breathe 7s ease-in-out infinite; }

/* 入力欄：フォーカスで少し持ち上がり、赤いリングが灯る */
.field:focus {
  box-shadow: 0 0 0 3px rgba(229,56,77,0.18), 0 10px 26px rgba(229,56,77,0.14);
  transform: translateY(-1px);
}

/* タブ切替時、フォームの各行が下から順に立ち上がる（stagger） */
@keyframes field-rise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.auth-form.revealing > * {
  opacity: 0;
  animation: field-rise .5s cubic-bezier(.2,.75,.2,1) forwards;
}
.auth-form.revealing > *:nth-child(1) { animation-delay: .04s; }
.auth-form.revealing > *:nth-child(2) { animation-delay: .11s; }
.auth-form.revealing > *:nth-child(3) { animation-delay: .18s; }
.auth-form.revealing > *:nth-child(4) { animation-delay: .25s; }
.auth-form.revealing > *:nth-child(5) { animation-delay: .32s; }
.auth-form.revealing > *:nth-child(6) { animation-delay: .39s; }

/* 同意チェック：チェックすると枠が緑に灯る */
.agree { border-radius: 10px; padding: 4px; margin: -4px; transition: background .2s, box-shadow .2s; }
.agree:has(input:checked) {
  background: rgba(70,209,145,0.08);
  box-shadow: inset 0 0 0 1px rgba(70,209,145,0.35);
}

/* メインボタン：ほのかな発光の呼吸＋光沢が横切る */
@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 10px 26px rgba(229,56,77,0.38); }
  50%      { box-shadow: 0 14px 38px rgba(229,56,77,0.62); }
}
@keyframes btn-sheen {
  0%        { transform: translateX(-160%) skewX(-20deg); }
  55%, 100% { transform: translateX(360%)  skewX(-20deg); }
}
.btn-primary { position: relative; overflow: hidden; animation: btn-pulse 2.8s ease-in-out infinite; }
.btn-primary > span { position: relative; z-index: 1; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: btn-sheen 3.4s ease-in-out infinite;
  pointer-events: none;
}
.btn-primary:disabled { animation: none; }

/* 動きを控えたいユーザーには演出を止める（アクセシビリティ） */
@media (prefers-reduced-motion: reduce) {
  .card, .head .shuriken, .bg-grid, .bg-glow,
  .btn-primary, .btn-primary::after, .auth-form.revealing > * { animation: none !important; }
  .auth-form.revealing > * { opacity: 1; }
  .field:focus { transform: none; }
}
