/* 右上のサインイン（member.js。2026-11-25） */
header.site { position: relative; }
/* 2026-11-29：サインイン（ID）はメニューの左どなり（member.js が .head-right で包む） */
.head-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.head-right nav.site { min-width: 0; }
.member-box { position: relative; z-index: 20; flex: none; }
.member-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid #c9d6e3; background: #fff; color: var(--navy-d, #102f52);
  font: inherit; font-size: 13.5px; font-weight: 700; line-height: 1.3; cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 76, 118, .08);
}
.member-btn:hover { border-color: var(--accent, #b8860b); }
.member-btn--in { background: #f4f8fc; }
.member-id { max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-menu {
  position: absolute; left: 0; top: calc(100% + 6px); min-width: 200px;
  background: #fff; border: 1px solid #dde3e9; border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(16, 47, 82, .16); font-size: 13px; line-height: 1.6;
}
.member-menu p { margin: 0 0 10px; color: #5a6570; }
.member-menu b { color: #1c1c1c; font-size: 15px; word-break: break-all; }
.member-out {
  width: 100%; padding: 7px 0; border-radius: 8px; border: 1px solid #c9d6e3;
  background: #fff; color: #102f52; font: inherit; font-weight: 700; cursor: pointer;
}
.member-out:hover { background: #f4f8fc; }
.member-info {
  display: block; margin-bottom: 8px; padding: 7px 0; border-radius: 8px; border: 1px solid #c9d6e3;
  background: #fff; color: #102f52; font-weight: 700; text-align: center; text-decoration: none;
}
.member-info:hover { background: #f4f8fc; }

.member-dialog {
  border: 0; border-radius: 16px; padding: 0; width: min(400px, calc(100vw - 32px));
  box-shadow: 0 6px 24px rgb(10 28 42 / 12%), 0 24px 60px rgba(16, 47, 82, .25);
}
.member-dialog::backdrop { background: rgba(16, 47, 82, .45); }
/* 中身は /signin（app/globals.css の .member-card）と同じ見た目（2026-11-29） */
.member-dialog .member-form { padding: 32px 28px 28px; display: grid; gap: 6px; color: #14213d; }
.member-dialog .member-cancel {
  justify-self: start; display: inline-flex; align-items: center; min-height: 36px; margin: -8px 0 8px -4px; padding: 0 14px;
  border: 1.5px solid #2447a8; border-radius: 999px; background: #fff; color: #2447a8;
  font: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
}
.member-dialog .member-cancel:hover { background: #eef2fb; }
.member-dialog h2 { margin: 0 0 14px; font-size: 24px; font-weight: 800; text-align: center; color: #14213d; }
.member-dialog .member-notice { margin: 0 0 6px; padding: 8px 10px; border-radius: 8px; background: #e8f4ea; color: #1d6b33; font-size: 14px; line-height: 1.6; }
.member-dialog label { margin-top: 8px; font-size: 14px; font-weight: 700; color: #14213d; }
.member-dialog input {
  width: 100%; box-sizing: border-box; min-height: 48px; padding: 0 12px;
  border: 1.5px solid #b8c4de; border-radius: 10px; background: #fff; font: inherit; font-size: 16px;
}
.member-dialog input:focus { outline: 3px solid rgb(36 71 168 / 30%); border-color: #2447a8; }
.member-dialog .member-error { margin: 8px 0 0; color: #a02a10; font-size: 14px; line-height: 1.6; }
.member-dialog .member-error:empty { display: none; }
.member-dialog .member-error:not(:empty) { padding: 8px 10px; border-radius: 8px; background: #fff3f0; }
.member-dialog .member-submit {
  min-height: 48px; margin-top: 16px; border: 0; border-radius: 10px; background: #2447a8; color: #fff;
  font: inherit; font-size: 16px; font-weight: 800; cursor: pointer;
}
.member-dialog .member-submit:disabled { opacity: .5; cursor: wait; }
.member-dialog .member-switch { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid #e3e8f2; text-align: center; font-size: 15px; }
.member-dialog .member-switch a { color: #2447a8; font-weight: 700; text-decoration: none; }

/* 狭い画面：小さく。メニューが横にはみ出るときは、メニューだけ横に動かせる */
@media (max-width: 1040px) { .head-right { width: 100%; } .head-right nav.site { flex: 1; } }
@media (max-width: 760px) {
  .member-btn { padding: 6px 10px; font-size: 12.5px; }
  .member-id { max-width: 8em; }
}
/* スマホ：IDと3つのメニューが1行におさまるように（2026-11-29） */
@media (max-width: 520px) {
  .head-right { gap: 6px; }
  .head-right .member-btn { padding: 5px 8px; font-size: 12px; gap: 4px; }
  .head-right .member-id { max-width: 6.5em; }
  .head-right nav.site ul { gap: 2px; }
  .head-right nav.site a { padding: 6px 7px; font-size: 12px; }
}

/* 管理者だけ：IDのプルダウンの、ID の下・利用者情報の上に「管理画面」（2026-11-30 田中さん） */
.member-admin { display: block; margin-bottom: 10px; padding: 8px 0; border-radius: 8px; background: #8a5a00; color: #fff !important; font-weight: 700; text-align: center; text-decoration: none; }
.member-admin:hover { background: #6f4800; }
