:root {
  --fg: #1f2328;
  --fg-muted: #59636e;
  --bg: #ffffff;
  --bg-soft: #f6f8fa;
  --accent: #0969da;
  --accent-strong: #0550ae;
  --border: #d0d7de;
  --error-bg: #ffebe9;
  --error-fg: #82071e;
  --error-border: #ffabaa;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Noto Sans JP",
    sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
}

a {
  color: var(--accent);
}
a:hover {
  color: var(--accent-strong);
}

/* ============================================================ */
/* レイアウト共通                                                 */
/* ============================================================ */

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.app__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.app__header-left h1 {
  margin: 0;
  font-size: 22px;
}

.app__subtitle {
  margin: 2px 0 0;
  color: var(--fg-muted);
  font-size: 13px;
}

.app__header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}

.app__user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--fg);
  white-space: nowrap;
}

.app__user__name {
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-left: 4px;
}
.badge--manager {
  background: #fff8c5;
  color: #7a4d00;
}

/* ============================================================ */
/* 認証画面（login / signup）                                     */
/* ============================================================ */

.auth {
  max-width: 380px;
  margin: 48px auto;
  padding: 24px 20px;
}

.auth__header {
  text-align: center;
  margin-bottom: 24px;
}
.auth__header h1 {
  margin: 0;
  font-size: 28px;
}
.auth__subtitle {
  margin: 4px 0 0;
  color: var(--fg-muted);
  font-size: 13px;
}

.auth h2 {
  margin: 0 0 16px;
  font-size: 18px;
  text-align: center;
}

.auth__alt {
  text-align: center;
  margin-top: 20px;
  color: var(--fg-muted);
  font-size: 14px;
}

/* ============================================================ */
/* フォーム                                                       */
/* ============================================================ */

.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__field > span {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}

.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: var(--bg);
  color: var(--fg);
}
.form input:focus,
.form textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

.form--inline {
  display: inline-flex;
  margin: 0;
}

/* ============================================================ */
/* ボタン                                                         */
/* ============================================================ */

.btn {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--fg);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover {
  background: var(--bg-soft);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.btn--ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--fg-muted);
  padding: 6px 12px;
  font-size: 13px;
}
.btn--ghost:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

/* ============================================================ */
/* エラー表示                                                     */
/* ============================================================ */

.errors {
  list-style: disc;
  padding: 12px 16px 12px 32px;
  margin: 0 0 16px;
  background: var(--error-bg);
  color: var(--error-fg);
  border: 1px solid var(--error-border);
  border-radius: 6px;
  font-size: 14px;
}
.errors li + li {
  margin-top: 4px;
}

/* ============================================================ */
/* ダッシュボード（仮）                                            */
/* ============================================================ */

.today {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}
.today__date {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.today__greeting {
  margin: 4px 0 0;
  color: var(--fg-muted);
  font-size: 14px;
}

/* ============================================================ */
/* セクション共通                                                 */
/* ============================================================ */

.section-title {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

/* ============================================================ */
/* フラッシュメッセージ                                           */
/* ============================================================ */

.flash {
  padding: 10px 14px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}
.flash--success {
  background: #dafbe1;
  color: #1a7f37;
  border: 1px solid #aceebb;
}

/* ============================================================ */
/* 日誌エディタ（今日 / 過去日共通）                              */
/* ============================================================ */

.entry-edit {
  margin-bottom: 32px;
}

.entry-edit__body {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.7;
  resize: vertical;
  min-height: 220px;
  background: var(--bg);
  color: var(--fg);
}
.entry-edit__body:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

.entry-edit__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.entry-edit__saved {
  font-size: 12px;
  color: var(--fg-muted);
}

/* ============================================================ */
/* 過去ログ                                                       */
/* ============================================================ */

.past {
  margin-top: 16px;
}

.past__sub {
  margin: 24px 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-muted);
}

/* ============================================================ */
/* カレンダー折りたたみカード                                     */
/* ============================================================ */

.cal-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  overflow: hidden;
  margin-bottom: 16px;
}

.cal-card[open] {
  border-color: var(--accent);
}

.cal-card__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  list-style: none;
  user-select: none;
}
.cal-card__summary::-webkit-details-marker {
  display: none;
}
.cal-card__summary:hover {
  background: var(--bg-soft);
}

.cal-card[open] .cal-card__summary {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.cal-card__icon {
  font-size: 18px;
}

.cal-card__label {
  /* main label */
}

.cal-card__hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: normal;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cal-card__hint-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.cal-card__chevron {
  margin-left: 6px;
  color: var(--fg-muted);
  transition: transform 0.15s ease;
}
.cal-card[open] .cal-card__chevron {
  transform: rotate(180deg);
}

.cal-card__body {
  padding: 0;
}
.cal-card__body .cal {
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}

@media (max-width: 600px) {
  .cal-card__hint {
    display: none;
  }
}

/* ============================================================ */
/* カレンダー                                                     */
/* ============================================================ */

.cal {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 14px;
  margin-bottom: 16px;
}

.cal__header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 12px;
}

.cal__nav {
  text-decoration: none;
  color: var(--accent);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  justify-self: start;
}
.cal__header > .cal__nav:last-child {
  justify-self: end;
}
.cal__nav:hover {
  background: var(--bg-soft);
}
.cal__nav--placeholder {
  visibility: hidden;
}

.cal__title {
  font-weight: 700;
  font-size: 17px;
  text-align: center;
}

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal__weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  padding: 6px 0 8px;
}
.cal__weekday--sun {
  color: #cf222e;
}
.cal__weekday--sat {
  color: #0969da;
}

.cal__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  font-size: 14px;
  text-decoration: none;
  color: var(--fg);
  background: transparent;
  border: 1px solid transparent;
  transition: background 0.1s ease;
}

.cal__cell--empty {
  background: transparent;
  border: none;
  pointer-events: none;
}

.cal__cell--sun {
  color: #cf222e;
}
.cal__cell--sat {
  color: #0969da;
}

a.cal__cell:hover {
  background: var(--bg-soft);
  border-color: var(--border);
}

.cal__cell--today {
  border-color: var(--accent);
  background: #eaf5ff;
  font-weight: 700;
}
a.cal__cell--today:hover {
  background: #dceeff;
}

.cal__day {
  line-height: 1;
}

.cal__mark {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}
.cal__cell--today .cal__mark {
  background: var(--accent-strong);
}

.cal__cell--future {
  color: #d0d7de;
  cursor: default;
  pointer-events: none;
  background: transparent;
}

@media (max-width: 480px) {
  .cal__cell {
    font-size: 12px;
    border-radius: 6px;
  }
  .cal__mark {
    width: 4px;
    height: 4px;
    bottom: 4px;
  }
}

.past__list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.past__item + .past__item {
  border-top: 1px solid var(--border);
}
.past__link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  text-decoration: none;
  color: var(--fg);
  background: var(--bg);
}
.past__link:hover {
  background: var(--bg-soft);
}
.past__date {
  font-size: 13px;
  color: var(--fg-muted);
  font-weight: 600;
}
.past__preview {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.past__empty {
  color: var(--fg-muted);
  font-size: 14px;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: 8px;
  text-align: center;
}

/* ============================================================ */
/* 詳細ページのナビゲーション                                     */
/* ============================================================ */

.entry-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.entry-nav__back {
  text-decoration: none;
}
.entry-nav__date {
  font-weight: 600;
}
.entry-nav__pager {
  display: flex;
  gap: 12px;
}
.entry-nav__pager a {
  text-decoration: none;
}
.entry-nav__pager-disabled {
  color: var(--border);
  cursor: not-allowed;
}

/* ============================================================ */
/* ヘッダーリンク・ロゴ                                           */
/* ============================================================ */

.app__logo {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}
.app__logo h1 {
  margin: 0;
  font-size: 22px;
}
.app__logo:hover h1 {
  color: var(--accent);
}

.app__nav-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  text-decoration: none;
  color: var(--fg-muted);
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  line-height: 1.2;
}
.app__nav-link:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.app__nav-link__icon {
  font-size: 14px;
  line-height: 1;
}

.btn--logout {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.btn--logout__icon {
  font-size: 14px;
  line-height: 1;
  display: none; /* デスクトップではテキストのみ */
}

/* ============================================================ */
/* スマホ向けヘッダー: ナビをアイコンのみ、ロゴと右側を縦に分ける */
/* ============================================================ */

@media (max-width: 640px) {
  .app__header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 18px;
  }
  .app__header-right {
    width: 100%;
    justify-content: flex-end;
    gap: 6px;
    margin-left: 0;
  }
  .app__nav-link__label {
    display: none; /* スマホでは emoji のみ */
  }
  .app__nav-link {
    padding: 7px 10px;
  }
  .app__nav-link__icon {
    font-size: 16px;
  }
  .app__user {
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--bg-soft);
  }
}

@media (max-width: 380px) {
  .app__user__name {
    display: none; /* 極小幅では名前を隠してアバター + バッジのみ */
  }
  .btn--logout__label {
    display: none;
  }
  .btn--logout__icon {
    display: inline;
  }
}

/* ============================================================ */
/* バッジ                                                         */
/* ============================================================ */

.badge--self {
  background: var(--bg-soft);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

/* ============================================================ */
/* フラッシュ（エラー）                                           */
/* ============================================================ */

.flash--error {
  background: var(--error-bg);
  color: var(--error-fg);
  border: 1px solid var(--error-border);
}

/* ============================================================ */
/* コメント（外箱 + 子ボックス最大2つ）                           */
/* ============================================================ */

.comments {
  margin-top: 28px;
  padding: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.comments__empty {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
  text-align: center;
  padding: 16px 0;
}

.comments__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.comment--mine {
  border-color: var(--accent);
  background: #f1f8ff;
}

.comment__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.comment__author {
  font-weight: 600;
  font-size: 14px;
}
.comment__time {
  font-size: 12px;
  color: var(--fg-muted);
}

.comment__body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg);
  white-space: pre-wrap;
}

.comment__textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  min-height: 100px;
  background: var(--bg);
  color: var(--fg);
}
.comment__textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  border-color: var(--accent);
}

.comment__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.btn--danger {
  background: transparent;
  border-color: var(--error-border);
  color: var(--error-fg);
}
.btn--danger:hover {
  background: var(--error-bg);
}

/* ============================================================ */
/* 他人の日誌の閲覧（manager 視点）                              */
/* ============================================================ */

.entry-view {
  margin-bottom: 16px;
}

.entry-view__body {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-wrap;
}

.entry-view__meta {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--fg-muted);
}

/* ============================================================ */
/* メンバー一覧                                                   */
/* ============================================================ */

.page-lead {
  margin: -8px 0 16px;
  color: var(--fg-muted);
  font-size: 14px;
}

.member-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.member-list__item + .member-list__item {
  border-top: 1px solid var(--border);
}

.member-list__link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-decoration: none;
  color: var(--fg);
  background: var(--bg);
  flex-wrap: wrap;
}
.member-list__link:hover {
  background: var(--bg-soft);
}

.member-list__name {
  font-weight: 600;
  font-size: 15px;
}

.member-list__meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--fg-muted);
  flex-wrap: wrap;
}

.member-list__last--today {
  color: #1a7f37;
  font-weight: 600;
}

.member-list__count {
  font-variant-numeric: tabular-nums;
}

/* 過去ログ内のコメント数バッジ */
.past__comment-count {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px;
  color: var(--fg-muted);
  font-weight: normal;
}

/* ============================================================ */
/* アバター（イニシャル丸）                                       */
/* ============================================================ */

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  color: #1f2328;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
}
.avatar--sm {
  width: 22px;
  height: 22px;
  font-size: 11px;
}
.avatar--md {
  width: 36px;
  height: 36px;
  font-size: 15px;
}
.avatar--lg {
  width: 56px;
  height: 56px;
  font-size: 24px;
}

/* .app__user は inline-flex + gap で間隔を取るため margin は不要 */

/* ============================================================ */
/* page-head（タイトル + 右ボタン）                               */
/* ============================================================ */

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.page-head .section-title {
  margin-bottom: 4px;
}
.page-head .page-lead {
  margin: 0;
}

.member-list__avatar {
  margin-right: 4px;
}

/* ============================================================ */
/* 管理画面（admin.php）                                          */
/* ============================================================ */

.admin-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  margin-bottom: 12px;
}

.admin-table__head,
.admin-table__row {
  display: grid;
  grid-template-columns: 2fr 1.4fr 0.7fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}

.admin-table__head {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
}

.admin-table__row + .admin-table__row {
  border-top: 1px solid var(--border);
}

.admin-table__col {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  min-width: 0;
}

.admin-table__name-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.admin-table__name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-table__email {
  font-size: 12px;
  color: var(--fg-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-table__col--meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 12px;
  color: var(--fg-muted);
}

.admin-table__locked {
  font-size: 12px;
  color: var(--fg-muted);
}

.admin-note {
  margin: 12px 0 0;
  padding: 12px;
  background: var(--bg-soft);
  border-radius: 6px;
  font-size: 13px;
  color: var(--fg-muted);
}

.btn--sm {
  padding: 5px 10px;
  font-size: 12px;
}

.badge--employee {
  background: var(--bg-soft);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

/* スマホでは縦積み */
@media (max-width: 600px) {
  .admin-table__head {
    display: none;
  }
  .admin-table__row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 16px;
  }
  .admin-table__col--meta,
  .admin-table__col--role,
  .admin-table__col--action {
    margin-left: 32px;
  }
}

/* ============================================================ */
/* パンくず                                                       */
/* ============================================================ */

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--fg-muted);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb__link {
  color: var(--accent);
  text-decoration: none;
}
.breadcrumb__link:hover {
  text-decoration: underline;
}
.breadcrumb__sep {
  color: var(--border);
}
.breadcrumb__current {
  color: var(--fg);
  font-weight: 600;
}

/* ============================================================ */
/* 部下の日誌「記事カード」                                       */
/* ============================================================ */

.post {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 16px;
}

.post__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.post__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.post__author {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.post__date {
  margin: 0;
  font-size: 13px;
  color: var(--fg-muted);
}
.post__updated {
  color: var(--fg-muted);
}

.post__body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--fg);
  white-space: pre-wrap;
  word-break: break-word;
}

.post__empty {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
  text-align: center;
  padding: 16px 0;
}

/* ============================================================ */
/* 日付ページャー（記事カード下）                                 */
/* ============================================================ */

.day-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 8px 4px;
  font-size: 14px;
}
.day-pager__btn {
  text-decoration: none;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 6px;
}
.day-pager__btn:hover {
  background: var(--bg-soft);
}
.day-pager__btn--disabled {
  color: var(--border);
  cursor: not-allowed;
}
.day-pager__current {
  font-weight: 600;
  color: var(--fg);
}

/* ============================================================ */
/* コメント領域（強化）                                           */
/* ============================================================ */

.comments__title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.comments__hint {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--fg-muted);
}

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

.compose {
  border-color: var(--accent);
  background: #f1f8ff;
  padding: 14px 16px;
}

.compose__hint {
  font-size: 12px;
  color: var(--fg-muted);
  margin-left: auto;
}

/* ============================================================ */
/* 管理画面：新規ユーザ追加カード                                 */
/* ============================================================ */

.user-create-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 16px;
  overflow: hidden;
}

.user-create-card[open] {
  border-color: var(--accent);
}

.user-create-card__summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  list-style: none;
  user-select: none;
}
.user-create-card__summary::-webkit-details-marker {
  display: none;
}
.user-create-card__summary:hover {
  background: var(--bg-soft);
}

.user-create-card[open] .user-create-card__summary {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.user-create-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  line-height: 1;
}
.user-create-card[open] .user-create-card__icon {
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.user-create-card__hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--fg-muted);
  font-weight: normal;
}

.user-create-form {
  padding: 16px;
}

.user-create-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.user-create-form__role {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.user-create-form__role legend {
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 6px;
}

.role-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  background: var(--bg);
}
.role-radio:hover {
  background: var(--bg-soft);
}
.role-radio input[type="radio"] {
  margin: 0;
}
.role-radio:has(input:checked) {
  border-color: var(--accent);
  background: #eaf5ff;
  color: var(--accent-strong);
  font-weight: 600;
}

.user-create-form__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.user-create-form__note {
  font-size: 12px;
  color: var(--fg-muted);
}

@media (max-width: 600px) {
  .user-create-form__grid {
    grid-template-columns: 1fr;
  }
  .user-create-card__hint {
    display: none;
  }
}
