:root {
  --brand: #2B6FAE;
  --brand-deep: #1E4F7A;
  --brand-soft: #EAF2FA;
  --ink: #2A3544;
}

body {
  font-family: "Zen Maru Gothic", "Noto Sans JP", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(43, 111, 174, 0.08), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(43, 111, 174, 0.05), transparent 50%),
    #ffffff;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(224, 242, 254, 0.8);
  backdrop-filter: blur(8px);
}

.site-header-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-deep);
  text-decoration: none;
}

.logo:hover { opacity: 0.8; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-left: 1.5rem;
}

.nav-link {
  position: relative;
  padding: 0 0 2px;
  color: #404040;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}

.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1.5px;
  background: var(--brand);
  transition: width 0.25s ease;
}

.nav-link:hover { color: var(--brand); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--brand); }

.header-logout {
  margin-left: auto;
  background: #fff;
  border: 1px solid #c5d7ea;
  color: var(--brand-deep);
  border-radius: 0.5rem;
  padding: 0.45rem 0.9rem;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
}

.header-logout:hover { border-color: var(--brand); color: var(--brand); }

.hamburger span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: currentColor;
}

.member-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
}

.eyebrow {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(43, 111, 174, 0.7);
  margin-bottom: 0.5rem;
}

.member-card {
  background: #fff;
  border: 1px solid #f5f5f4;
  border-radius: 1rem;
}

.member-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 0.75rem;
  padding: 0.85rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
}

.member-btn:hover { opacity: 0.9; }
.member-btn:disabled { opacity: 0.55; cursor: default; }
.member-btn-block { width: 100%; }

.mode-btn {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: #78716c;
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
}

.mode-btn.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.month-btn {
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: #57534e;
  font-size: 0.75rem;
  font-family: inherit;
  cursor: pointer;
}

.month-btn.is-on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.member-link {
  color: var(--brand);
  font-size: 0.8rem;
  text-decoration: underline;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

.member-link-danger { color: #e11d48; }

#forgot-btn {
  display: block;
  width: 100%;
  text-align: center;
  text-decoration: none;
  margin-top: 0.35rem;
}

.plan-line {
  margin-top: 0.35rem;
  font-size: 0.875rem;
  color: #64748b;
}

.page-lead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.page-lead h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #262626;
}

.page-actions { display: flex; align-items: center; gap: 1rem; }

.quiet-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.8rem;
  color: #78716c;
  cursor: pointer;
}

.quiet-btn:hover { color: var(--brand); }
.member-card .quiet-btn { display: inline-block; margin-top: 0.75rem; }

.auth-wrap {
  max-width: 24rem;
  margin: 2.5rem auto 3rem;
  padding: 0 1rem;
}

.field label {
  display: block;
  font-size: 0.75rem;
  color: #78716c;
  margin-bottom: 0.25rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  padding: 0.7rem 0.85rem;
  font-size: 0.875rem;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(43, 111, 174, 0.12);
}

.week-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem;
  border-bottom: 1px solid #f5f5f4;
  background: #fafafa;
}

.week-nav {
  flex: 0 0 auto;
  min-width: 5.5rem;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid #c5d7ea;
  background: #fff;
  color: var(--brand-deep);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.week-nav:hover { border-color: var(--brand); color: var(--brand); }

#cal-week-label {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: #44403c;
}

@media (max-width: 480px) {
  .week-nav { min-width: 4.75rem; padding: 0.7rem 0.7rem; font-size: 0.9rem; }
  #cal-week-label { font-size: 0.75rem; }
}

.cal-table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.cal-table th,
.cal-table td { border: 1px solid #e7e5e4; }
.cal-table td.slot { height: 44px; font-size: 0.95rem; font-weight: 600; }
.cal-table td.slot.open { cursor: pointer; background: #fff; color: #57534e; }
.cal-table td.slot.open:hover { background: var(--brand-soft); }
.cal-table td.slot.on { background: var(--brand); color: #fff; }
.cal-table td.slot.shut { background: #f8fafc; color: #a8a29e; cursor: default; font-weight: 500; }
.is-today { color: var(--brand); font-weight: 500; }

#loading {
  background:
    radial-gradient(900px 400px at 20% 0%, rgba(43, 111, 174, 0.08), transparent 55%),
    #ffffff;
}

.z-40 { z-index: 40; }
.h-10 { height: 2.5rem; }
.w-12 { width: 3rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.25rem; }
.border-stone-50 { border-color: #fafaf9; }
.text-\[10px\] { font-size: 10px; }
.text-\[11px\] { font-size: 11px; }
.min-h-\[32rem\] { min-height: 32rem; }
.last\:border-0:last-child { border-width: 0; }
@media (min-width: 768px) {
  .md\:p-5 { padding: 1.25rem; }
}

@media (max-width: 640px) {
  .site-header-inner { padding: 0 1rem; gap: 0.65rem; }
  .nav-menu { margin-left: 0.75rem; gap: 0.85rem; }
  .nav-link { font-size: 0.85rem; }
  .header-logout { padding: 0.4rem 0.65rem; font-size: 0.8rem; }
}

@media (min-width: 768px) {
  .site-header-inner {
    height: 4rem;
    padding: 0 3rem;
  }

  .nav-link { font-size: 1rem; }
}
