/* Home 3-column dashboard */
.hd-app {
  background: #f7f7f5 !important;
  max-width: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  min-height: 100vh;
}
.hd-app .header {
  display: none;
}
.hd-shell {
  display: flex;
  min-height: 100vh;
  max-width: 1280px;
  margin: 0 auto;
}
.hd-side {
  width: 220px;
  flex-shrink: 0;
  padding: 20px 14px;
  border-right: 1px solid #ecece8;
  background: #fafaf8;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: none;
}
.hd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  color: #1a1a1a;
  margin-bottom: 22px;
  padding: 0 8px;
}
.hd-brand .mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.hd-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hd-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #52525b;
  text-decoration: none;
}
.hd-nav a:hover { background: #f0f0ec; color: #111; }
.hd-nav a.active {
  background: #e8f0e4;
  color: #1a3a12;
}
.hd-nav .ico { width: 20px; text-align: center; font-size: 15px; }
.hd-nav .sep {
  height: 1px;
  background: #ecece8;
  margin: 10px 8px;
}
.hd-side-foot {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #ecece8;
  font-size: 12px;
  color: #71717a;
  line-height: 1.5;
}

.hd-main {
  flex: 1;
  min-width: 0;
  padding: 20px 18px 100px;
}
.hd-main-head {
  margin-bottom: 16px;
}
.hd-main-head h1 {
  font-size: 22px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #18181b;
}
.hd-main-head p {
  margin: 0;
  font-size: 13px;
  color: #71717a;
}

.hd-feed-section { margin-bottom: 22px; }
.hd-feed-section h2 {
  font-size: 13px;
  font-weight: 700;
  color: #71717a;
  margin: 0 0 10px;
  letter-spacing: 0.02em;
}
.hd-events {
  display: grid;
  gap: 10px;
}
.hd-event {
  display: block;
  background: #fff;
  border: 1px solid #ecece8;
  border-radius: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}
.hd-event:hover { border-color: #d4d4d0; box-shadow: 0 4px 14px rgba(0,0,0,.04); }
.hd-event .d { font-size: 12px; color: #71717a; margin-bottom: 2px; }
.hd-event .t { font-size: 15px; font-weight: 700; color: #18181b; }
.hd-event .p { font-size: 12px; color: #a1a1aa; margin-top: 4px; }
.hd-event .tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px; }
.hd-event .tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #52525b;
  font-weight: 600;
}

.hd-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.hd-post {
  display: block;
  background: #fff;
  border: 1px solid #ecece8;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.hd-post:hover { box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.hd-post .thumb {
  aspect-ratio: 16/10;
  background: #f4f4f5;
  overflow: hidden;
}
.hd-post .thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hd-post .body { padding: 12px 14px; }
.hd-post .title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.hd-post .sub { font-size: 12px; color: #71717a; }

.hd-right {
  width: 100%;
  flex-shrink: 0;
  padding: 16px 14px 28px;
  border-left: none;
  background: #fafaf8;
  display: none;
  position: static;
  height: auto;
  overflow-y: visible;
  box-sizing: border-box;
}
.hd-card {
  background: #fff;
  border: 1px solid #ecece8;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.hd-card h3 {
  font-size: 12px;
  font-weight: 700;
  color: #71717a;
  margin: 0 0 10px;
  text-transform: none;
}
.hd-me {
  display: flex;
  align-items: center;
  gap: 12px;
}
.hd-me .avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: #111; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.hd-me .avatar img { width: 100%; height: 100%; object-fit: cover; }
.hd-me .name { font-weight: 700; font-size: 14px; }
.hd-me .role { font-size: 12px; color: #71717a; }
.hd-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}
.hd-actions a, .hd-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #ecece8;
  background: #fff;
  color: #18181b;
  cursor: pointer;
}
.hd-actions a.primary {
  background: #111;
  color: #fff;
  border-color: #111;
}
.hd-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hd-mini-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f4f4f5;
}
.hd-mini-list li:last-child { border-bottom: none; }
.hd-mini-list .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: #e4e4e7; color: #111;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; overflow: hidden; flex-shrink: 0;
}
.hd-mini-list .avatar img { width: 100%; height: 100%; object-fit: cover; }
.hd-mini-list .info { flex: 1; min-width: 0; }
.hd-mini-list .name {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hd-mini-list .meta { font-size: 11px; color: #a1a1aa; }
.hd-mini-list a.view {
  font-size: 11px; font-weight: 600; color: #52525b;
  text-decoration: none; padding: 4px 8px; border-radius: 6px;
  background: #f4f4f5;
}
.hd-pipe-item {
  padding: 8px 0;
  border-bottom: 1px solid #f4f4f5;
  font-size: 12px;
}
.hd-pipe-item:last-child { border-bottom: none; }
.hd-pipe-item .t { font-weight: 600; color: #18181b; }
.hd-pipe-item .s { color: #71717a; margin-top: 2px; }
.hd-empty {
  font-size: 12px;
  color: #a1a1aa;
  padding: 4px 0;
}

/* mobile top bar */
.hd-mobile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #ecece8;
  position: sticky;
  top: 0;
  z-index: 20;
}
.hd-mobile-bar h1 { font-size: 16px; margin: 0; font-weight: 800; }
.hd-mobile-bar button {
  border: none; background: transparent; font-size: 13px;
  font-weight: 600; color: #52525b; cursor: pointer;
}

/* mobile: show main only; right panel as bottom sections */
@media (max-width: 899px) {
  /* 横フレックスだと右カラム幅100%で中央が潰れるため縦積み */
  .hd-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
  }
  .hd-side {
    display: none !important;
  }
  .hd-main {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    min-width: 0 !important;
    padding: 14px 14px 20px;
    box-sizing: border-box;
  }
  .hd-right {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    position: static;
    height: auto;
    border-left: none;
    border-top: 1px solid #ecece8;
    padding: 16px 14px 28px;
    background: #f7f7f5;
    box-sizing: border-box;
  }
  .hd-posts {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .hd-events {
    width: 100%;
  }
  .hd-event, .hd-post {
    max-width: 100%;
    box-sizing: border-box;
  }
}

@media (min-width: 900px) {
  .hd-shell {
    flex-direction: row;
  }
  .hd-side { display: block; }
  .hd-mobile-bar { display: none; }
  .hd-app .bottom-nav { display: none; }
  .hd-main {
    flex: 1;
    min-width: 0;
    padding: 24px 22px 32px;
  }
  .hd-right {
    display: block;
    width: 300px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-left: 1px solid #ecece8;
    padding: 20px 16px 32px;
  }
  .hd-posts { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1100px) {
  .hd-side { width: 240px; }
  .hd-right { width: 320px; }
  .hd-posts { grid-template-columns: 1fr 1fr; }
}

.hd-app .bottom-nav { display: none !important; }


.hd-new-users {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid #ecece8;
  border-radius: 14px;
  overflow: hidden;
}
.hd-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f4f4f5;
}
.hd-user:last-child { border-bottom: none; }
.hd-user:hover { background: #fafafa; }
.hd-user .av {
  width: 40px; height: 40px; border-radius: 50%;
  background: #111; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; overflow: hidden; flex-shrink: 0;
  font-size: 15px;
}
.hd-user .av img { width: 100%; height: 100%; object-fit: cover; }
.hd-user .n { font-weight: 700; font-size: 14px; }
.hd-user .r { font-size: 12px; color: #71717a; margin-top: 2px; }

.hd-event { overflow: hidden; padding: 0; }
.hd-event .hd-ev-thumb {
  width: 100%; aspect-ratio: 16/9; background: #111; overflow: hidden;
}
.hd-event .hd-ev-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.hd-event .hd-ev-thumb.ph {
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  background: linear-gradient(135deg, #1e1b4b, #0f766e); color:#fff; gap:6px;
}
.hd-event .hd-ev-thumb.ph b { font-size:18px; font-weight:800; }
.hd-event .hd-ev-thumb.ph span { font-size:13px; font-weight:700; }
.hd-event .d, .hd-event .t, .hd-event .p, .hd-event .tags, .hd-event .short { padding-left: 14px; padding-right: 14px; }
.hd-event .d { padding-top: 10px; }
.hd-event .short { font-size:12px; font-weight:700; color:#6d28d9; }
.hd-event .tags { padding-bottom: 12px; }


.hd-nav .nav-group {
  font-size: 10px;
  font-weight: 800;
  color: #a1a1aa;
  letter-spacing: 0.04em;
  padding: 14px 12px 4px;
}

.hd-mobile-bar .sc-menu-btn {
  width: 40px; height: 40px; border: none; background: #f4f4f5;
  border-radius: 10px; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

.hd-link-more {
  font-size: 12px; font-weight: 700; color: #52525b; text-decoration: none;
}
.hd-link-more:hover { color: #111; }
.hd-todo-list .todo {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px; border: 1px solid #ecece8; border-radius: 12px;
  background: #fff; margin-bottom: 8px; text-decoration: none; color: inherit;
}
.hd-todo-list .todo .t { font-weight: 700; font-size: 14px; }
.hd-todo-list .todo .s { font-size: 12px; color: #71717a; margin-top: 2px; }
.hd-todo-list .badge {
  font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px;
  background: #f4f4f5; color: #52525b; white-space: nowrap;
}
.hd-todo-list .badge.late { background: #fee2e2; color: #b91c1c; }
.hd-todo-list .badge.work { background: #e0e7ff; color: #3730a3; }
.hd-todo-list .badge.req { background: #fef3c7; color: #92400e; }
.hd-todo-list .badge.ok { background: #dcfce7; color: #166534; }
.hd-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center;
}
.hd-stat .n { display: block; font-size: 20px; font-weight: 800; }
.hd-stat .l { font-size: 11px; color: #71717a; }
