/* ============================================================
   団員専用サイト「ぬっくズ」専用スタイル
   （ぬっくズのページ表示時のみ読み込まれる。公開ページには影響しない）
   BEM記法・nukkus プレフィックス
   ============================================================ */

.nukkus {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

.nukkus__inner {
  width: 100%;
}

.nukkus__title {
  font-size: 1.6rem;
  margin: 12px 0 20px;
  text-align: center;
}

.nukkus__subtitle {
  font-size: 1.2rem;
  margin: 28px 0 12px;
  border-left: 5px solid #6366f1;
  padding-left: 10px;
}

.nukkus__subtitle--sm {
  font-size: 1.05rem;
  border-left-width: 3px;
  margin-top: 20px;
}

.nukkus__lead {
  color: #555;
  margin-bottom: 16px;
  line-height: 1.7;
}

/* ---- ユーザーバー ---- */
.nukkus-userbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  font-size: 0.85rem;
  color: #666;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

/* ---- ナビ ---- */
.nukkus-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 20px;
}

.nukkus-nav__link {
  display: inline-block;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 0.9rem;
  text-decoration: none;
  color: #334155;
}

.nukkus-nav__link:hover {
  background: #e2e8f0;
}

/* ---- 通知 ---- */
.nukkus-notice {
  padding: 10px 14px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 0.9rem;
}

.nukkus-notice--success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.nukkus-notice--error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.nukkus-notice--warn {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.nukkus-empty {
  padding: 24px;
  text-align: center;
  color: #888;
  background: #fafafa;
  border-radius: 8px;
}

/* ---- ボタン ---- */
.nukkus-btn {
  display: inline-block;
  padding: 8px 18px;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
}

.nukkus-btn--primary {
  background: #6366f1;
  color: #fff;
}

.nukkus-btn--primary:hover {
  background: #4f46e5;
}

.nukkus-btn--ghost {
  background: #f1f5f9;
  color: #334155;
}

.nukkus-btn--danger {
  background: #ef4444;
  color: #fff;
}

.nukkus-btn--xs {
  padding: 4px 10px;
  font-size: 0.78rem;
}

/* ---- ログインフォーム ---- */
.nukkus-login {
  max-width: 420px;
  margin: 40px auto;
  padding: 28px 24px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
}

.nukkus-login__title {
  text-align: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}

.nukkus-login__label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.nukkus-login__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  margin-top: 6px;
  box-sizing: border-box;
}

/* ---- ポータルのカード ---- */
.nukkus-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.nukkus-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition:
    box-shadow 0.15s,
    transform 0.15s;
}

.nukkus-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.nukkus-card__title {
  font-weight: 700;
  font-size: 1.1rem;
}

.nukkus-card__desc {
  font-size: 0.85rem;
  color: #666;
}

/* ---- バッジ（ジャンル色） ---- */
.nukkus-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.nukkus-badge--sm {
  padding: 1px 8px;
  font-size: 0.7rem;
}

.nukkus-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0;
}

/* ---- 全一覧テーブル ---- */
.nukkus-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0;
}

/* 表の上部に出す横スクロールバー（JSで本体と同期） */
.nukkus-scroll-top {
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 12px;
}

.nukkus-scroll-top__inner {
  height: 1px;
}

.nukkus-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.8rem;
}

.nukkus-table th,
.nukkus-table td {
  border: 1px solid #e5e7eb;
  padding: 6px 8px;
  text-align: center;
  white-space: nowrap;
}

/* 転置表はコンパクト表示 */
.nukkus-table--rensuke {
  font-size: 0.72rem;
}

.nukkus-table--rensuke th,
.nukkus-table--rensuke td {
  padding: 2px 4px;
}

.nukkus-table__corner {
  background: #f8fafc;
  position: sticky;
  left: 0;
  z-index: 2;
}

.nukkus-table__member {
  background: #f8fafc;
  text-align: center;
  font-size: 0.7rem;
  writing-mode: vertical-rl;
  text-orientation: upright;
  white-space: nowrap;
  padding: 4px 2px;
  height: 5em;
  vertical-align: bottom;
}

.nukkus-table__member a {
  text-decoration: none;
  color: #4f46e5;
  font-weight: 600;
}

/* 転置表：日程列を左に固定。行全体の色は tr の背景で表現し、
   セル自体は白背景にして左端に太いジャンル色バーを出す */
.nukkus-table--rensuke .nukkus-table__date {
  position: sticky;
  left: 0;
  z-index: 1;
  text-align: left;
  min-width: 130px;
  max-width: 180px;
  white-space: normal;
  background: #fff;
}

.nukkus-table__date a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.nukkus-table__date-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.3;
}

.nukkus-table__date-venue,
.nukkus-table__date-time,
.nukkus-table__date-note {
  display: block;
  font-size: 0.68rem;
  color: #475569;
  line-height: 1.3;
}

.nukkus-table__date-note {
  color: #64748b;
}

.nukkus-table__part {
  background: #eef2ff;
  text-align: center;
  font-size: 0.72rem;
  color: #4338ca;
}

/* 出席セルはジャンルの行色を活かすため背景を持たせない。
   ◯は青文字、✕は赤文字のみで区別する */
.nukkus-table__cell {
  background: transparent;
}

.nukkus-table__cell.is-yes {
  color: #2563eb;
  font-weight: 700;
}

.nukkus-table__cell.is-no {
  color: #dc2626;
  font-weight: 700;
}

.nukkus-table__cell.is-none {
  color: #cbd5e1;
}

/* パートの区切り縦線 */
.nukkus-table--rensuke .is-part-start {
  border-left: 2px solid #94a3b8;
}

.nukkus-table--rensuke .nukkus-table__part {
  border-left: 2px solid #94a3b8;
}

.nukkus-table--admin th,
.nukkus-table--admin td {
  text-align: left;
  white-space: normal;
}

.nukkus-table__ops {
  white-space: nowrap;
  display: flex;
  gap: 6px;
  align-items: center;
}

/* ---- 出欠登録 ---- */
.nukkus-entry-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nukkus-entry {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.nukkus-entry__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.nukkus-entry__date {
  font-weight: 700;
}

.nukkus-entry__time,
.nukkus-entry__venue {
  font-size: 0.85rem;
  color: #555;
}

.nukkus-entry__note {
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 8px;
}

.nukkus-entry__choices {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.nukkus-radio {
  font-size: 0.9rem;
  cursor: pointer;
}

/* ---- フォーム ---- */
.nukkus-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 14px;
}

.nukkus-form__row label {
  flex: 1;
  min-width: 160px;
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nukkus-form__full {
  flex-basis: 100%;
}

.nukkus-form input[type="text"],
.nukkus-form input[type="date"],
.nukkus-form input[type="time"],
.nukkus-form textarea,
.nukkus-form select,
.nukkus-inline-form input,
.nukkus-inline-form select {
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
}

.nukkus-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 10px 0 20px;
}

.nukkus-admin-block {
  margin-bottom: 36px;
  padding-bottom: 12px;
  border-bottom: 1px dashed #e5e7eb;
}

.nukkus-quick-entry {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px dashed #e5e7eb;
}

/* ---- 今日の出席者 ---- */
.nukkus-today-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #f8fafc;
  border-radius: 10px;
  margin: 12px 0 20px;
}

.nukkus-today-head__date {
  font-size: 1.15rem;
  font-weight: 700;
}

.nukkus-today-head__note {
  flex-basis: 100%;
  margin: 4px 0 0;
  color: #666;
  font-size: 0.85rem;
}

.nukkus-today-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.nukkus-today-col {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.nukkus-today-col__title {
  font-size: 1.1rem;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
}

.nukkus-today-col--yes .nukkus-today-col__title {
  color: #166534;
}

.nukkus-today-col--no .nukkus-today-col__title {
  color: #991b1b;
}

.nukkus-today-part {
  margin-bottom: 12px;
}

.nukkus-today-part__title {
  font-size: 0.9rem;
  color: #4338ca;
  margin: 0 0 4px;
}

.nukkus-today-part__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nukkus-today-part__list li {
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.88rem;
}

.nukkus-today-part__part {
  color: #888;
  font-size: 0.78rem;
}

.nukkus-today-part__empty {
  color: #cbd5e1;
  margin: 0;
}

/* ---- ぬっくの思い出 ---- */
.nukkus-memories {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 16px;
}

.nukkus-memory {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  background: #fff;
}

.nukkus-memory__head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.nukkus-memory__thumb img {
  width: 140px;
  height: auto;
  border-radius: 8px;
}

.nukkus-memory__title {
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.nukkus-memory__date {
  color: #666;
  font-size: 0.85rem;
  margin: 0;
}

.nukkus-memory__body img {
  max-width: 100%;
  height: auto;
}

.nukkus-memory__body iframe {
  max-width: 100%;
}

/* ---- レスポンシブ ---- */
@media (max-width: 600px) {
  .nukkus-today-cols {
    grid-template-columns: 1fr;
  }

  .nukkus-memory__head {
    flex-direction: column;
  }

  .nukkus-memory__thumb img {
    width: 100%;
  }
}
