* { box-sizing: border-box; }
body { font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif; margin: 0; background: #f5f6f8; color: #333; }
.topnav { display: flex; align-items: center; gap: 18px; background: #23303f; color: #fff; padding: 10px 20px; flex-wrap: wrap; }
.topnav a { color: #cfd8e3; text-decoration: none; }
.topnav a:hover { color: #fff; }
.topnav .brand { font-weight: 700; }
.topnav .spacer { flex: 1; }
.topnav .whoami { color: #9fb0c3; font-size: 13px; }
.container { max-width: 1080px; margin: 24px auto; padding: 0 16px; }
h1 { font-size: 22px; }
h2 { font-size: 18px; margin-top: 32px; }
.card { background: #fff; border: 1px solid #e2e6ec; border-radius: 8px; padding: 20px; margin-bottom: 20px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=number], input[type=month], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #c9d1da; border-radius: 6px; font-size: 14px; background: #fff;
}
textarea { min-height: 80px; }
.btn { display: inline-block; background: #2b6cb0; color: #fff; border: none; border-radius: 6px; padding: 9px 18px; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #245a94; }
.btn.gold { background: #b9973b; }
.btn.gray { background: #6b7683; }
.btn.danger { background: #b03030; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.alert.warn { background: #fff6e0; border: 1px solid #e8cf8a; color: #7a5b0d; }
.alert.ok { background: #e8f6ea; border: 1px solid #9fd3a8; color: #22662e; }
.alert.err { background: #fdecec; border: 1px solid #eba3a3; color: #8c2222; }
table.list { width: 100%; border-collapse: collapse; background: #fff; }
table.list th, table.list td { border: 1px solid #e2e6ec; padding: 8px 10px; font-size: 13px; text-align: left; vertical-align: middle; }
table.list th { background: #eef1f5; }
table.list img.thumb { width: 72px; height: 54px; object-fit: cover; border-radius: 4px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
@media (max-width: 700px) { .grid2 { grid-template-columns: 1fr; } }

/* 症例表示レイアウト */
.ba-heading { text-align: center; font-size: 22px; font-weight: 700; color: #b9973b; font-style: italic; margin: 18px 0 6px; }
.photo-row { display: flex; justify-content: center; gap: 12px; margin: 12px 0; }
.photo-cell { flex: 0 0 31%; max-width: 31%; text-align: center; }
.photo-cell img { max-width: 100%; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.photo-cell .slot-label { font-size: 11px; color: #98a2ae; }
.photo-cell.empty .ph { border: 2px dashed #d4dae2; border-radius: 6px; padding: 28% 0; color: #b6bfca; font-size: 12px; }

/* アップロード用スロット */
.slot-grid-row { display: flex; justify-content: center; gap: 10px; margin: 8px 0; }
.slot { flex: 0 0 31%; max-width: 31%; border: 2px dashed #c4ccd6; border-radius: 8px; text-align: center; padding: 8px; cursor: pointer; background: #fafbfc; position: relative; }
.slot:hover { border-color: #2b6cb0; }
.slot .letter { font-weight: 700; color: #7c8794; }
.slot img.preview { max-width: 100%; max-height: 110px; display: block; margin: 4px auto; }
.slot input[type=file] { display: none; }
.slot.filled { border-style: solid; border-color: #58a15f; background: #f2faf3; }
.fee-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px dashed #e6e9ee; font-size: 14px; }
.fee-row .price { color: #667; min-width: 110px; text-align: right; }
.fee-row input[type=number] { width: 90px; }
.fee-total { text-align: right; font-size: 16px; font-weight: 700; margin-top: 10px; }
.muted { color: #8a94a0; font-size: 12px; }

/* Lightbox */
.photo-cell img { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; background: rgba(10, 14, 20, .93); display: none; align-items: center; justify-content: center; flex-direction: column; z-index: 1000; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 4px; user-select: none; -webkit-user-drag: none; }
.lightbox .lb-caption { color: #d9c48a; font-size: 20px; font-weight: 700; font-style: italic; margin-top: 14px; }
.lightbox .lb-count { color: #8a94a0; font-size: 13px; margin-top: 4px; }
.lightbox .lb-btn { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: none; cursor: pointer; border-radius: 8px; font-size: 30px; line-height: 1; padding: 14px 18px; }
.lightbox .lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lightbox .lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-close { top: 14px; right: 16px; font-size: 26px; }
.login-box { max-width: 360px; margin: 80px auto; }
